@defisaver/sdk 1.1.6 → 1.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { AccessListItem, EthAddress } from './types';
2
- type ParamTypes = Array<string | Array<any>>;
3
- type Args = Array<any>;
2
+ declare type ParamTypes = Array<string | Array<any>>;
3
+ declare type Args = Array<any>;
4
4
  /**
5
5
  * Single action that can be executed directly, or combined into a set (ie. supply a vault)
6
6
  *
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import Dec from 'decimal.js';
11
10
  import AbiCoder from 'web3-eth-abi';
12
11
  import { Action } from './Action';
13
12
  import ActionAbi from './abis/Action.json';
@@ -42,8 +41,6 @@ export class ActionWithL2 extends Action {
42
41
  return hexNumber.padStart(2, '0');
43
42
  }
44
43
  numberToBytes32(number) {
45
- let hexNumber = new Dec(number).toHex();
46
- hexNumber = hexNumber.slice(2);
47
- return hexNumber.padStart(64, '0');
44
+ return AbiCoder.encodeParameter('bytes32', AbiCoder.encodeParameter('uint256', number)).slice(2);
48
45
  }
49
46
  }
@@ -6,7 +6,7 @@ import { ActionWithL2 } from '../../ActionWithL2';
6
6
  *
7
7
  * @category Flashloans
8
8
  */
9
- type SpecificFlashLoanAction = (Action & FlashLoanId) | (ActionWithL2 & FlashLoanId);
9
+ declare type SpecificFlashLoanAction = (Action & FlashLoanId) | (ActionWithL2 & FlashLoanId);
10
10
  export declare class FLAction extends Action {
11
11
  #private;
12
12
  constructor(specificFLAction: SpecificFlashLoanAction);
@@ -214,6 +214,7 @@ export declare const actionAddresses: {
214
214
  AaveV3RatioTrigger?: undefined;
215
215
  GasFeeTakerL2?: undefined;
216
216
  AaveV3RatioCheck?: undefined;
217
+ MorphoBlueView?: undefined;
217
218
  } | {
218
219
  DFSSell: string;
219
220
  DFSSellTEMP: string;
@@ -428,6 +429,7 @@ export declare const actionAddresses: {
428
429
  LlamaLendLevCreate?: undefined;
429
430
  LlamaLendSelfLiquidateWithColl?: undefined;
430
431
  MerklClaim?: undefined;
432
+ MorphoBlueView?: undefined;
431
433
  } | {
432
434
  DFSSell: string;
433
435
  DFSSellTEMP: string;
@@ -642,6 +644,7 @@ export declare const actionAddresses: {
642
644
  MerklClaim?: undefined;
643
645
  AaveV3DelegateCredit?: undefined;
644
646
  AaveV3RatioTrigger?: undefined;
647
+ MorphoBlueView?: undefined;
645
648
  } | {
646
649
  DFSSell: string;
647
650
  DFSSellTEMP: string;
@@ -678,6 +681,15 @@ export declare const actionAddresses: {
678
681
  CompV3Supply: string;
679
682
  CompV3Transfer: string;
680
683
  CompV3Withdraw: string;
684
+ MorphoBlueSupply: string;
685
+ MorphoBlueSupplyCollateral: string;
686
+ MorphoBlueWithdraw: string;
687
+ MorphoBlueWithdrawCollateral: string;
688
+ MorphoBlueBorrow: string;
689
+ MorphoBluePayback: string;
690
+ MorphoBlueSetAuth: string;
691
+ MorphoBlueSetAuthWithSig: string;
692
+ MorphoBlueView: string;
681
693
  AutomationV2Unsub?: undefined;
682
694
  SendTokenAndUnwrap?: undefined;
683
695
  ToggleSub?: undefined;
@@ -832,14 +844,6 @@ export declare const actionAddresses: {
832
844
  CurveUsdGetDebt?: undefined;
833
845
  CurveUsdCollRatioTrigger?: undefined;
834
846
  CurveUsdCollRatioCheck?: undefined;
835
- MorphoBlueSupply?: undefined;
836
- MorphoBlueSupplyCollateral?: undefined;
837
- MorphoBlueWithdraw?: undefined;
838
- MorphoBlueWithdrawCollateral?: undefined;
839
- MorphoBlueBorrow?: undefined;
840
- MorphoBluePayback?: undefined;
841
- MorphoBlueSetAuth?: undefined;
842
- MorphoBlueSetAuthWithSig?: undefined;
843
847
  LlamaLendCreate?: undefined;
844
848
  LlamaLendSupply?: undefined;
845
849
  LlamaLendBorrow?: undefined;
@@ -3,8 +3,8 @@ export const actionAddresses = {
3
3
  [NETWORKS.ethereum.chainId]: {
4
4
  // utils
5
5
  WrapEth: '0x8EbBd35f84D7f0DFCBEf08fD30CD09176133251A',
6
- UnwrapEth: '0xDB6C8cFDd7c1C0F8895CDBC01Dbf4A6D4B6d2a29',
7
- PullToken: '0x254cA89a00d53ab61de2Ba5641DBDC01aE48aed4',
6
+ UnwrapEth: '0x3298C6652beD903d3DfB6466A2C272eDe8ff741D',
7
+ PullToken: '0x29Bb266A72E585C661e292F7D8CA7C4581a0AF72',
8
8
  SendToken: '0x5c19aF6F5de91209c3bc2Ba447b1f5eb53c50759',
9
9
  SumInputs: '0x70907d840aBBc984Fd949311d2f005e6aC4a4D7a',
10
10
  SubInputs: '0xe1804b756188F63f723d2FECc02988D0Cc1aB823',
@@ -50,8 +50,8 @@ export const actionAddresses = {
50
50
  // aave
51
51
  AaveBorrow: '0x1B95E800a869bc3F89914470a7901D93D1401cD1',
52
52
  AavePayback: '0x066225964999F1D07C888c5Ac4a6C885bDa88b9A',
53
- AaveSupply: '0xEbB200a529058B561B42Eab510DA157a63243CEc',
54
- AaveWithdraw: '0x754C58fA92246414a448c1ed44ea3D1AD446d482',
53
+ AaveSupply: '0x3DbdC87d2299768AD82DDCAc13021A29681b8520',
54
+ AaveWithdraw: '0xee274301e8b06d2284c4c7ebfbd8f3a368ce24f2',
55
55
  AaveCollateralSwitch: '0xFf5dfF1B90bd5Aa6E12768AB497dB90cc9DE6F5d',
56
56
  AaveUnstake: '0x2FE4024e350cD2c64D2fd0Db5d16F5cE54Ca0E09',
57
57
  AaveClaimAAVE: '0xd52855bD011F3D87565f9040DdE2A59fB1b27b15',
@@ -206,8 +206,8 @@ export const actionAddresses = {
206
206
  CompV3Transfer: '0xeD7450e9C17146476137b77198DFfB17857906c4',
207
207
  CompV3Withdraw: '0xf1406deC224750CEfA709e4bcA6a3a3f458F0f7B',
208
208
  // crvUSD
209
- CurveUsdBorrow: '0x2512A976227a82Ef0F6bDdb463cBcD5B732596BF',
210
- CurveUsdCreate: '0x715B40970dac1cfAf0bB85C4Fe64921b44b3f73e',
209
+ CurveUsdBorrow: '0x9D82989715114D35903caf4077BC3e5b5DD70eA7',
210
+ CurveUsdCreate: '0xd44f3984249772fd5a667889e7a478d6beb912c9',
211
211
  CurveUsdPayback: '0x3Aa0F8Ff9419Cd5f6e73F3274b8bF86965Cd282c',
212
212
  CurveUsdSupply: '0xa55B3CE5ae7E59002f53b2153ABe326823ccCDE2',
213
213
  CurveUsdAdjust: '0x6f69A7d0B1BE7602381d9cCE6B29F05B9D0b85e6',
@@ -357,7 +357,7 @@ export const actionAddresses = {
357
357
  LlamaLendBoost: '0xc52a3af27696f8cf999463f3455e23440a376f8d',
358
358
  LlamaLendRepay: '0x320fdfa922ee33c1cc8a042ada855c9dfe9bed06',
359
359
  LlamaLendLevCreate: '0xe5cbdcbe494246c21851eea0642ff0791f95cc86',
360
- LlamaLendSelfLiquidateWithColl: '0x4faef2cd1680ea00f9398a0525c536b2466a887b',
360
+ LlamaLendSelfLiquidateWithColl: '0xebf090e5e83f4cd63d84db013ac8271761a953cf',
361
361
  },
362
362
  [NETWORKS.base.chainId]: {
363
363
  // Basic
@@ -399,6 +399,16 @@ export const actionAddresses = {
399
399
  CompV3Supply: '0x94b63bf925C2Ab17F7df6914E110E969cC36A93e',
400
400
  CompV3Transfer: '0xdCAF9C6Bccc062Bc1b8704AA37005897FeA257a0',
401
401
  CompV3Withdraw: '0x8543133c3827D29b67D2b012101f463c870C1790',
402
+ // MorphoBlue
403
+ MorphoBlueSupply: '0xB4e67A3aF1707567D410f1E18B0CF7DCc38e03BA',
404
+ MorphoBlueSupplyCollateral: '0x57757974d4c4f4a3cfcd054401482672342b26b2',
405
+ MorphoBlueWithdraw: '0xaaccc17d850b48507c2478a9ad628c6f4132ede3',
406
+ MorphoBlueWithdrawCollateral: '0xe1778d05b274fa4193c8ecc50b0c45230f9ba1d3',
407
+ MorphoBlueBorrow: '0x8395eafe5633bcdedbf71893e24d4e86afd55436',
408
+ MorphoBluePayback: '0x245f9c1f8401f28da82afc50e4d242224991c4b3',
409
+ MorphoBlueSetAuth: '0xb565630c6ddd1fae169c453667f5aa52ef4e2e39',
410
+ MorphoBlueSetAuthWithSig: '0x80be65342f6172a6cd0b6a2653e8a887e3f46cab',
411
+ MorphoBlueView: '0xdbcacf59c5063da8b15481f88e7d70e13c92f2a1',
402
412
  },
403
413
  };
404
414
  export const otherAddresses = {
@@ -225,6 +225,7 @@ declare const actionAddressesAllChains: {
225
225
  AaveV3RatioTrigger?: undefined;
226
226
  GasFeeTakerL2?: undefined;
227
227
  AaveV3RatioCheck?: undefined;
228
+ MorphoBlueView?: undefined;
228
229
  } | {
229
230
  DFSSell: string;
230
231
  DFSSellTEMP: string;
@@ -439,6 +440,7 @@ declare const actionAddressesAllChains: {
439
440
  LlamaLendLevCreate?: undefined;
440
441
  LlamaLendSelfLiquidateWithColl?: undefined;
441
442
  MerklClaim?: undefined;
443
+ MorphoBlueView?: undefined;
442
444
  } | {
443
445
  DFSSell: string;
444
446
  DFSSellTEMP: string;
@@ -653,6 +655,7 @@ declare const actionAddressesAllChains: {
653
655
  MerklClaim?: undefined;
654
656
  AaveV3DelegateCredit?: undefined;
655
657
  AaveV3RatioTrigger?: undefined;
658
+ MorphoBlueView?: undefined;
656
659
  } | {
657
660
  DFSSell: string;
658
661
  DFSSellTEMP: string;
@@ -689,6 +692,15 @@ declare const actionAddressesAllChains: {
689
692
  CompV3Supply: string;
690
693
  CompV3Transfer: string;
691
694
  CompV3Withdraw: string;
695
+ MorphoBlueSupply: string;
696
+ MorphoBlueSupplyCollateral: string;
697
+ MorphoBlueWithdraw: string;
698
+ MorphoBlueWithdrawCollateral: string;
699
+ MorphoBlueBorrow: string;
700
+ MorphoBluePayback: string;
701
+ MorphoBlueSetAuth: string;
702
+ MorphoBlueSetAuthWithSig: string;
703
+ MorphoBlueView: string;
692
704
  AutomationV2Unsub?: undefined;
693
705
  SendTokenAndUnwrap?: undefined;
694
706
  ToggleSub?: undefined;
@@ -843,14 +855,6 @@ declare const actionAddressesAllChains: {
843
855
  CurveUsdGetDebt?: undefined;
844
856
  CurveUsdCollRatioTrigger?: undefined;
845
857
  CurveUsdCollRatioCheck?: undefined;
846
- MorphoBlueSupply?: undefined;
847
- MorphoBlueSupplyCollateral?: undefined;
848
- MorphoBlueWithdraw?: undefined;
849
- MorphoBlueWithdrawCollateral?: undefined;
850
- MorphoBlueBorrow?: undefined;
851
- MorphoBluePayback?: undefined;
852
- MorphoBlueSetAuth?: undefined;
853
- MorphoBlueSetAuthWithSig?: undefined;
854
858
  LlamaLendCreate?: undefined;
855
859
  LlamaLendSupply?: undefined;
856
860
  LlamaLendBorrow?: undefined;
@@ -1083,6 +1087,7 @@ declare const actionAddresses: (chainId?: null) => {
1083
1087
  AaveV3RatioTrigger?: undefined;
1084
1088
  GasFeeTakerL2?: undefined;
1085
1089
  AaveV3RatioCheck?: undefined;
1090
+ MorphoBlueView?: undefined;
1086
1091
  } | {
1087
1092
  DFSSell: string;
1088
1093
  DFSSellTEMP: string;
@@ -1297,6 +1302,7 @@ declare const actionAddresses: (chainId?: null) => {
1297
1302
  LlamaLendLevCreate?: undefined;
1298
1303
  LlamaLendSelfLiquidateWithColl?: undefined;
1299
1304
  MerklClaim?: undefined;
1305
+ MorphoBlueView?: undefined;
1300
1306
  } | {
1301
1307
  DFSSell: string;
1302
1308
  DFSSellTEMP: string;
@@ -1511,6 +1517,7 @@ declare const actionAddresses: (chainId?: null) => {
1511
1517
  MerklClaim?: undefined;
1512
1518
  AaveV3DelegateCredit?: undefined;
1513
1519
  AaveV3RatioTrigger?: undefined;
1520
+ MorphoBlueView?: undefined;
1514
1521
  } | {
1515
1522
  DFSSell: string;
1516
1523
  DFSSellTEMP: string;
@@ -1547,6 +1554,15 @@ declare const actionAddresses: (chainId?: null) => {
1547
1554
  CompV3Supply: string;
1548
1555
  CompV3Transfer: string;
1549
1556
  CompV3Withdraw: string;
1557
+ MorphoBlueSupply: string;
1558
+ MorphoBlueSupplyCollateral: string;
1559
+ MorphoBlueWithdraw: string;
1560
+ MorphoBlueWithdrawCollateral: string;
1561
+ MorphoBlueBorrow: string;
1562
+ MorphoBluePayback: string;
1563
+ MorphoBlueSetAuth: string;
1564
+ MorphoBlueSetAuthWithSig: string;
1565
+ MorphoBlueView: string;
1550
1566
  AutomationV2Unsub?: undefined;
1551
1567
  SendTokenAndUnwrap?: undefined;
1552
1568
  ToggleSub?: undefined;
@@ -1701,14 +1717,6 @@ declare const actionAddresses: (chainId?: null) => {
1701
1717
  CurveUsdGetDebt?: undefined;
1702
1718
  CurveUsdCollRatioTrigger?: undefined;
1703
1719
  CurveUsdCollRatioCheck?: undefined;
1704
- MorphoBlueSupply?: undefined;
1705
- MorphoBlueSupplyCollateral?: undefined;
1706
- MorphoBlueWithdraw?: undefined;
1707
- MorphoBlueWithdrawCollateral?: undefined;
1708
- MorphoBlueBorrow?: undefined;
1709
- MorphoBluePayback?: undefined;
1710
- MorphoBlueSetAuth?: undefined;
1711
- MorphoBlueSetAuthWithSig?: undefined;
1712
1720
  LlamaLendCreate?: undefined;
1713
1721
  LlamaLendSupply?: undefined;
1714
1722
  LlamaLendBorrow?: undefined;
@@ -2084,6 +2092,7 @@ declare const _default: {
2084
2092
  AaveV3RatioTrigger?: undefined;
2085
2093
  GasFeeTakerL2?: undefined;
2086
2094
  AaveV3RatioCheck?: undefined;
2095
+ MorphoBlueView?: undefined;
2087
2096
  } | {
2088
2097
  DFSSell: string;
2089
2098
  DFSSellTEMP: string;
@@ -2298,6 +2307,7 @@ declare const _default: {
2298
2307
  LlamaLendLevCreate?: undefined;
2299
2308
  LlamaLendSelfLiquidateWithColl?: undefined;
2300
2309
  MerklClaim?: undefined;
2310
+ MorphoBlueView?: undefined;
2301
2311
  } | {
2302
2312
  DFSSell: string;
2303
2313
  DFSSellTEMP: string;
@@ -2512,6 +2522,7 @@ declare const _default: {
2512
2522
  MerklClaim?: undefined;
2513
2523
  AaveV3DelegateCredit?: undefined;
2514
2524
  AaveV3RatioTrigger?: undefined;
2525
+ MorphoBlueView?: undefined;
2515
2526
  } | {
2516
2527
  DFSSell: string;
2517
2528
  DFSSellTEMP: string;
@@ -2548,6 +2559,15 @@ declare const _default: {
2548
2559
  CompV3Supply: string;
2549
2560
  CompV3Transfer: string;
2550
2561
  CompV3Withdraw: string;
2562
+ MorphoBlueSupply: string;
2563
+ MorphoBlueSupplyCollateral: string;
2564
+ MorphoBlueWithdraw: string;
2565
+ MorphoBlueWithdrawCollateral: string;
2566
+ MorphoBlueBorrow: string;
2567
+ MorphoBluePayback: string;
2568
+ MorphoBlueSetAuth: string;
2569
+ MorphoBlueSetAuthWithSig: string;
2570
+ MorphoBlueView: string;
2551
2571
  AutomationV2Unsub?: undefined;
2552
2572
  SendTokenAndUnwrap?: undefined;
2553
2573
  ToggleSub?: undefined;
@@ -2702,14 +2722,6 @@ declare const _default: {
2702
2722
  CurveUsdGetDebt?: undefined;
2703
2723
  CurveUsdCollRatioTrigger?: undefined;
2704
2724
  CurveUsdCollRatioCheck?: undefined;
2705
- MorphoBlueSupply?: undefined;
2706
- MorphoBlueSupplyCollateral?: undefined;
2707
- MorphoBlueWithdraw?: undefined;
2708
- MorphoBlueWithdrawCollateral?: undefined;
2709
- MorphoBlueBorrow?: undefined;
2710
- MorphoBluePayback?: undefined;
2711
- MorphoBlueSetAuth?: undefined;
2712
- MorphoBlueSetAuthWithSig?: undefined;
2713
2725
  LlamaLendCreate?: undefined;
2714
2726
  LlamaLendSupply?: undefined;
2715
2727
  LlamaLendBorrow?: undefined;
@@ -2942,6 +2954,7 @@ declare const _default: {
2942
2954
  AaveV3RatioTrigger?: undefined;
2943
2955
  GasFeeTakerL2?: undefined;
2944
2956
  AaveV3RatioCheck?: undefined;
2957
+ MorphoBlueView?: undefined;
2945
2958
  } | {
2946
2959
  DFSSell: string;
2947
2960
  DFSSellTEMP: string;
@@ -3156,6 +3169,7 @@ declare const _default: {
3156
3169
  LlamaLendLevCreate?: undefined;
3157
3170
  LlamaLendSelfLiquidateWithColl?: undefined;
3158
3171
  MerklClaim?: undefined;
3172
+ MorphoBlueView?: undefined;
3159
3173
  } | {
3160
3174
  DFSSell: string;
3161
3175
  DFSSellTEMP: string;
@@ -3370,6 +3384,7 @@ declare const _default: {
3370
3384
  MerklClaim?: undefined;
3371
3385
  AaveV3DelegateCredit?: undefined;
3372
3386
  AaveV3RatioTrigger?: undefined;
3387
+ MorphoBlueView?: undefined;
3373
3388
  } | {
3374
3389
  DFSSell: string;
3375
3390
  DFSSellTEMP: string;
@@ -3406,6 +3421,15 @@ declare const _default: {
3406
3421
  CompV3Supply: string;
3407
3422
  CompV3Transfer: string;
3408
3423
  CompV3Withdraw: string;
3424
+ MorphoBlueSupply: string;
3425
+ MorphoBlueSupplyCollateral: string;
3426
+ MorphoBlueWithdraw: string;
3427
+ MorphoBlueWithdrawCollateral: string;
3428
+ MorphoBlueBorrow: string;
3429
+ MorphoBluePayback: string;
3430
+ MorphoBlueSetAuth: string;
3431
+ MorphoBlueSetAuthWithSig: string;
3432
+ MorphoBlueView: string;
3409
3433
  AutomationV2Unsub?: undefined;
3410
3434
  SendTokenAndUnwrap?: undefined;
3411
3435
  ToggleSub?: undefined;
@@ -3560,14 +3584,6 @@ declare const _default: {
3560
3584
  CurveUsdGetDebt?: undefined;
3561
3585
  CurveUsdCollRatioTrigger?: undefined;
3562
3586
  CurveUsdCollRatioCheck?: undefined;
3563
- MorphoBlueSupply?: undefined;
3564
- MorphoBlueSupplyCollateral?: undefined;
3565
- MorphoBlueWithdraw?: undefined;
3566
- MorphoBlueWithdrawCollateral?: undefined;
3567
- MorphoBlueBorrow?: undefined;
3568
- MorphoBluePayback?: undefined;
3569
- MorphoBlueSetAuth?: undefined;
3570
- MorphoBlueSetAuthWithSig?: undefined;
3571
3587
  LlamaLendCreate?: undefined;
3572
3588
  LlamaLendSupply?: undefined;
3573
3589
  LlamaLendBorrow?: undefined;
@@ -1,17 +1,17 @@
1
- type AccessListItem = {
1
+ declare type AccessListItem = {
2
2
  address: EthAddress;
3
3
  storageKeys: Array<any>;
4
4
  };
5
- type AccessList = Array<Array<any>>;
6
- type AccessLists = {
5
+ declare type AccessList = Array<Array<any>>;
6
+ declare type AccessLists = {
7
7
  [key: string]: AccessList;
8
8
  };
9
- type Config = {
9
+ declare type Config = {
10
10
  chainId: number;
11
11
  testingMode: boolean;
12
12
  [key: string]: any;
13
13
  };
14
- type Network = {
14
+ declare type Network = {
15
15
  chainId: number;
16
16
  chainName: string;
17
17
  blockExplorerUrls: Array<string>;
@@ -23,24 +23,24 @@ type Network = {
23
23
  symbol: string;
24
24
  };
25
25
  };
26
- type Networks = {
26
+ declare type Networks = {
27
27
  ethereum: Network;
28
28
  optimism: Network;
29
29
  arbitrum: Network;
30
30
  base: Network;
31
31
  };
32
- type EthAddress = string;
33
- type bytes32 = string;
34
- type bytes = string | Array<any>;
35
- type uint256 = string;
36
- type uint32 = string;
37
- type uint160 = string;
38
- type uint128 = string;
39
- type uint80 = string;
40
- type uint64 = string;
41
- type uint24 = string;
42
- type uint16 = string;
43
- type uint8 = string;
44
- type int256 = string;
45
- type int24 = string;
32
+ declare type EthAddress = string;
33
+ declare type bytes32 = string;
34
+ declare type bytes = string | Array<any>;
35
+ declare type uint256 = string;
36
+ declare type uint32 = string;
37
+ declare type uint160 = string;
38
+ declare type uint128 = string;
39
+ declare type uint80 = string;
40
+ declare type uint64 = string;
41
+ declare type uint24 = string;
42
+ declare type uint16 = string;
43
+ declare type uint8 = string;
44
+ declare type int256 = string;
45
+ declare type int24 = string;
46
46
  export { AccessList, AccessListItem, AccessLists, Config, Network, Networks, EthAddress, bytes32, bytes, uint256, uint160, uint32, uint128, uint80, uint64, uint24, uint16, uint8, int256, int24, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/sdk",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "",
5
5
  "main": "./umd/index.js",
6
6
  "module": "./esm/src/index.js",
@@ -40,9 +40,9 @@ export class ActionWithL2 extends Action {
40
40
  }
41
41
 
42
42
  numberToBytes32(number:number) {
43
- let hexNumber = new Dec(number).toHex();
44
- hexNumber = hexNumber.slice(2);
45
-
46
- return hexNumber.padStart(64, '0');
43
+ return AbiCoder.encodeParameter(
44
+ 'bytes32',
45
+ AbiCoder.encodeParameter('uint256', number),
46
+ ).slice(2);
47
47
  }
48
48
  }
package/src/addresses.ts CHANGED
@@ -5,8 +5,8 @@ export const actionAddresses = {
5
5
  [NETWORKS.ethereum.chainId]: {
6
6
  // utils
7
7
  WrapEth: '0x8EbBd35f84D7f0DFCBEf08fD30CD09176133251A',
8
- UnwrapEth: '0xDB6C8cFDd7c1C0F8895CDBC01Dbf4A6D4B6d2a29',
9
- PullToken: '0x254cA89a00d53ab61de2Ba5641DBDC01aE48aed4',
8
+ UnwrapEth: '0x3298C6652beD903d3DfB6466A2C272eDe8ff741D',
9
+ PullToken: '0x29Bb266A72E585C661e292F7D8CA7C4581a0AF72',
10
10
  SendToken: '0x5c19aF6F5de91209c3bc2Ba447b1f5eb53c50759',
11
11
  SumInputs: '0x70907d840aBBc984Fd949311d2f005e6aC4a4D7a',
12
12
  SubInputs: '0xe1804b756188F63f723d2FECc02988D0Cc1aB823',
@@ -57,8 +57,8 @@ export const actionAddresses = {
57
57
  // aave
58
58
  AaveBorrow: '0x1B95E800a869bc3F89914470a7901D93D1401cD1',
59
59
  AavePayback: '0x066225964999F1D07C888c5Ac4a6C885bDa88b9A',
60
- AaveSupply: '0xEbB200a529058B561B42Eab510DA157a63243CEc',
61
- AaveWithdraw: '0x754C58fA92246414a448c1ed44ea3D1AD446d482',
60
+ AaveSupply: '0x3DbdC87d2299768AD82DDCAc13021A29681b8520',
61
+ AaveWithdraw: '0xee274301e8b06d2284c4c7ebfbd8f3a368ce24f2',
62
62
  AaveCollateralSwitch: '0xFf5dfF1B90bd5Aa6E12768AB497dB90cc9DE6F5d',
63
63
  AaveUnstake: '0x2FE4024e350cD2c64D2fd0Db5d16F5cE54Ca0E09',
64
64
  AaveClaimAAVE: '0xd52855bD011F3D87565f9040DdE2A59fB1b27b15',
@@ -241,8 +241,8 @@ export const actionAddresses = {
241
241
  CompV3Withdraw: '0xf1406deC224750CEfA709e4bcA6a3a3f458F0f7B',
242
242
 
243
243
  // crvUSD
244
- CurveUsdBorrow: '0x2512A976227a82Ef0F6bDdb463cBcD5B732596BF',
245
- CurveUsdCreate: '0x715B40970dac1cfAf0bB85C4Fe64921b44b3f73e',
244
+ CurveUsdBorrow: '0x9D82989715114D35903caf4077BC3e5b5DD70eA7',
245
+ CurveUsdCreate: '0xd44f3984249772fd5a667889e7a478d6beb912c9',
246
246
  CurveUsdPayback: '0x3Aa0F8Ff9419Cd5f6e73F3274b8bF86965Cd282c',
247
247
  CurveUsdSupply: '0xa55B3CE5ae7E59002f53b2153ABe326823ccCDE2',
248
248
  CurveUsdAdjust: '0x6f69A7d0B1BE7602381d9cCE6B29F05B9D0b85e6',
@@ -410,7 +410,7 @@ export const actionAddresses = {
410
410
  LlamaLendBoost: '0xc52a3af27696f8cf999463f3455e23440a376f8d',
411
411
  LlamaLendRepay: '0x320fdfa922ee33c1cc8a042ada855c9dfe9bed06',
412
412
  LlamaLendLevCreate: '0xe5cbdcbe494246c21851eea0642ff0791f95cc86',
413
- LlamaLendSelfLiquidateWithColl: '0x4faef2cd1680ea00f9398a0525c536b2466a887b',
413
+ LlamaLendSelfLiquidateWithColl: '0xebf090e5e83f4cd63d84db013ac8271761a953cf',
414
414
  },
415
415
  [NETWORKS.base.chainId]: {
416
416
  // Basic
@@ -455,6 +455,17 @@ export const actionAddresses = {
455
455
  CompV3Supply: '0x94b63bf925C2Ab17F7df6914E110E969cC36A93e',
456
456
  CompV3Transfer: '0xdCAF9C6Bccc062Bc1b8704AA37005897FeA257a0',
457
457
  CompV3Withdraw: '0x8543133c3827D29b67D2b012101f463c870C1790',
458
+
459
+ // MorphoBlue
460
+ MorphoBlueSupply: '0xB4e67A3aF1707567D410f1E18B0CF7DCc38e03BA',
461
+ MorphoBlueSupplyCollateral: '0x57757974d4c4f4a3cfcd054401482672342b26b2',
462
+ MorphoBlueWithdraw: '0xaaccc17d850b48507c2478a9ad628c6f4132ede3',
463
+ MorphoBlueWithdrawCollateral: '0xe1778d05b274fa4193c8ecc50b0c45230f9ba1d3',
464
+ MorphoBlueBorrow: '0x8395eafe5633bcdedbf71893e24d4e86afd55436',
465
+ MorphoBluePayback: '0x245f9c1f8401f28da82afc50e4d242224991c4b3',
466
+ MorphoBlueSetAuth: '0xb565630c6ddd1fae169c453667f5aa52ef4e2e39',
467
+ MorphoBlueSetAuthWithSig: '0x80be65342f6172a6cd0b6a2653e8a887e3f46cab',
468
+ MorphoBlueView: '0xdbcacf59c5063da8b15481f88e7d70e13c92f2a1',
458
469
  },
459
470
  };
460
471
 
@@ -0,0 +1,27 @@
1
+ const dfs = require('../umd');
2
+ const {encodeForDsProxyCall, encodeForRecipe} = require('./_actionUtils');
3
+ const {assert} = require('chai');
4
+
5
+ const MAXUINT = '115792089237316195423570985008687907853269984665640564039457584007913129639935';
6
+ const MAXUINT_HEX = 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff';
7
+ describe('ActionWithL2', () => {
8
+
9
+ context('Basic', () => {
10
+ let action;
11
+ it('Constructor', () => {
12
+ action = new dfs.ActionWithL2('MockSwap', '0x0a80C3C540eEF99811f4579fa7b1A0617294e06f', ['uint256', 'address'], [MAXUINT, '0x6b175474e89094c44da98b954eedeac495271d0f'])
13
+ })
14
+ it('numberToBytes32', () => {
15
+ assert(MAXUINT_HEX === action.numberToBytes32(MAXUINT));
16
+ });
17
+ });
18
+ context('AaveV3WithdrawAction', () => {
19
+ let action;
20
+ it('Constructor', () => {
21
+ action = new dfs.actions.aaveV3.AaveV3WithdrawAction(true, '0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb', MAXUINT, "0x6b175474e89094c44da98b954eedeac495271d0f", 9);
22
+ })
23
+ it('numberToBytes32', () => {
24
+ assert(action.encodeForL2DsProxyCall() === '0x2895f3aa000901ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6b175474e89094c44da98b954eedeac495271d0f');
25
+ });
26
+ });
27
+ })