@defisaver/sdk 1.0.21 → 1.0.23-dev

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.
Files changed (41) hide show
  1. package/esm/src/Action.js +2 -1
  2. package/esm/src/actions/basic/ApproveTokenAction.d.ts +14 -0
  3. package/esm/src/actions/basic/ApproveTokenAction.js +22 -0
  4. package/esm/src/actions/basic/LSVSellAction.d.ts +23 -0
  5. package/esm/src/actions/basic/LSVSellAction.js +61 -0
  6. package/esm/src/actions/basic/index.d.ts +2 -0
  7. package/esm/src/actions/basic/index.js +2 -0
  8. package/esm/src/actions/index.d.ts +2 -1
  9. package/esm/src/actions/index.js +2 -1
  10. package/esm/src/actions/lsv/LSVBorrowAction.d.ts +14 -0
  11. package/esm/src/actions/lsv/LSVBorrowAction.js +16 -0
  12. package/esm/src/actions/lsv/LSVPaybackAction.d.ts +13 -0
  13. package/esm/src/actions/lsv/LSVPaybackAction.js +15 -0
  14. package/esm/src/actions/lsv/LSVSupplyAction.d.ts +15 -0
  15. package/esm/src/actions/lsv/LSVSupplyAction.js +17 -0
  16. package/esm/src/actions/lsv/LSVWithdrawAction.d.ts +15 -0
  17. package/esm/src/actions/lsv/LSVWithdrawAction.js +17 -0
  18. package/esm/src/actions/lsv/index.d.ts +4 -0
  19. package/esm/src/actions/lsv/index.js +4 -0
  20. package/esm/src/actions/morpho/aaveV3/MorphoAaveV3SetManagerAction.d.ts +14 -0
  21. package/esm/src/actions/morpho/aaveV3/MorphoAaveV3SetManagerAction.js +20 -0
  22. package/esm/src/actions/morpho/index.d.ts +1 -0
  23. package/esm/src/actions/morpho/index.js +1 -0
  24. package/esm/src/addresses.d.ts +21 -0
  25. package/esm/src/addresses.js +12 -4
  26. package/esm/src/index.d.ts +84 -0
  27. package/package.json +1 -1
  28. package/src/Action.ts +2 -1
  29. package/src/actions/basic/ApproveTokenAction.ts +29 -0
  30. package/src/actions/basic/LSVSellAction.ts +61 -0
  31. package/src/actions/basic/index.ts +2 -0
  32. package/src/actions/index.ts +2 -0
  33. package/src/actions/lsv/LSVBorrowAction.ts +18 -0
  34. package/src/actions/lsv/LSVPaybackAction.ts +17 -0
  35. package/src/actions/lsv/LSVSupplyAction.ts +19 -0
  36. package/src/actions/lsv/LSVWithdrawAction.ts +19 -0
  37. package/src/actions/lsv/index.ts +4 -0
  38. package/src/actions/morpho/aaveV3/MorphoAaveV3SetManagerAction.ts +28 -0
  39. package/src/actions/morpho/index.ts +1 -0
  40. package/src/addresses.ts +13 -4
  41. package/umd/index.js +1063 -776
@@ -26,6 +26,7 @@ declare const actionAddressesAllChains: {
26
26
  UpdateSub: string;
27
27
  TransferNFT: string;
28
28
  CreateSub: string;
29
+ ApproveToken: string;
29
30
  DFSSell: string;
30
31
  McdGenerate: string;
31
32
  McdGive: string;
@@ -60,6 +61,11 @@ declare const actionAddressesAllChains: {
60
61
  AaveV3Borrow: string;
61
62
  AaveV3ATokenPayback: string;
62
63
  AaveV3View: string;
64
+ LSVWithdraw: string;
65
+ LSVBorrow: string;
66
+ LSVSupply: string;
67
+ LSVPayback: string;
68
+ LSVSell: string;
63
69
  MorphoAaveV2Borrow: string;
64
70
  MorphoAaveV2Payback: string;
65
71
  MorphoAaveV2Supply: string;
@@ -69,6 +75,7 @@ declare const actionAddressesAllChains: {
69
75
  MorphoAaveV3Payback: string;
70
76
  MorphoAaveV3Supply: string;
71
77
  MorphoAaveV3Withdraw: string;
78
+ MorphoAaveV3SetManager: string;
72
79
  CompBorrow: string;
73
80
  CompClaim: string;
74
81
  CompPayback: string;
@@ -192,6 +199,7 @@ declare const actionAddressesAllChains: {
192
199
  UpdateSub?: undefined;
193
200
  TransferNFT?: undefined;
194
201
  CreateSub?: undefined;
202
+ ApproveToken?: undefined;
195
203
  McdGenerate?: undefined;
196
204
  McdGive?: undefined;
197
205
  McdMerge?: undefined;
@@ -216,6 +224,11 @@ declare const actionAddressesAllChains: {
216
224
  AaveWithdraw?: undefined;
217
225
  AaveCollateralSwitch?: undefined;
218
226
  AaveV3View?: undefined;
227
+ LSVWithdraw?: undefined;
228
+ LSVBorrow?: undefined;
229
+ LSVSupply?: undefined;
230
+ LSVPayback?: undefined;
231
+ LSVSell?: undefined;
219
232
  MorphoAaveV2Borrow?: undefined;
220
233
  MorphoAaveV2Payback?: undefined;
221
234
  MorphoAaveV2Supply?: undefined;
@@ -225,6 +238,7 @@ declare const actionAddressesAllChains: {
225
238
  MorphoAaveV3Payback?: undefined;
226
239
  MorphoAaveV3Supply?: undefined;
227
240
  MorphoAaveV3Withdraw?: undefined;
241
+ MorphoAaveV3SetManager?: undefined;
228
242
  CompBorrow?: undefined;
229
243
  CompClaim?: undefined;
230
244
  CompPayback?: undefined;
@@ -334,6 +348,7 @@ declare const actionAddressesAllChains: {
334
348
  UpdateSub?: undefined;
335
349
  TransferNFT?: undefined;
336
350
  CreateSub?: undefined;
351
+ ApproveToken?: undefined;
337
352
  McdGenerate?: undefined;
338
353
  McdGive?: undefined;
339
354
  McdMerge?: undefined;
@@ -359,6 +374,11 @@ declare const actionAddressesAllChains: {
359
374
  AaveCollateralSwitch?: undefined;
360
375
  AaveV3ClaimRewards?: undefined;
361
376
  AaveV3View?: undefined;
377
+ LSVWithdraw?: undefined;
378
+ LSVBorrow?: undefined;
379
+ LSVSupply?: undefined;
380
+ LSVPayback?: undefined;
381
+ LSVSell?: undefined;
362
382
  MorphoAaveV2Borrow?: undefined;
363
383
  MorphoAaveV2Payback?: undefined;
364
384
  MorphoAaveV2Supply?: undefined;
@@ -368,6 +388,7 @@ declare const actionAddressesAllChains: {
368
388
  MorphoAaveV3Payback?: undefined;
369
389
  MorphoAaveV3Supply?: undefined;
370
390
  MorphoAaveV3Withdraw?: undefined;
391
+ MorphoAaveV3SetManager?: undefined;
371
392
  CompBorrow?: undefined;
372
393
  CompClaim?: undefined;
373
394
  CompPayback?: undefined;
@@ -460,6 +481,7 @@ declare const actionAddresses: (chainId?: null) => {
460
481
  UpdateSub: string;
461
482
  TransferNFT: string;
462
483
  CreateSub: string;
484
+ ApproveToken: string;
463
485
  DFSSell: string;
464
486
  McdGenerate: string;
465
487
  McdGive: string;
@@ -494,6 +516,11 @@ declare const actionAddresses: (chainId?: null) => {
494
516
  AaveV3Borrow: string;
495
517
  AaveV3ATokenPayback: string;
496
518
  AaveV3View: string;
519
+ LSVWithdraw: string;
520
+ LSVBorrow: string;
521
+ LSVSupply: string;
522
+ LSVPayback: string;
523
+ LSVSell: string;
497
524
  MorphoAaveV2Borrow: string;
498
525
  MorphoAaveV2Payback: string;
499
526
  MorphoAaveV2Supply: string;
@@ -503,6 +530,7 @@ declare const actionAddresses: (chainId?: null) => {
503
530
  MorphoAaveV3Payback: string;
504
531
  MorphoAaveV3Supply: string;
505
532
  MorphoAaveV3Withdraw: string;
533
+ MorphoAaveV3SetManager: string;
506
534
  CompBorrow: string;
507
535
  CompClaim: string;
508
536
  CompPayback: string;
@@ -626,6 +654,7 @@ declare const actionAddresses: (chainId?: null) => {
626
654
  UpdateSub?: undefined;
627
655
  TransferNFT?: undefined;
628
656
  CreateSub?: undefined;
657
+ ApproveToken?: undefined;
629
658
  McdGenerate?: undefined;
630
659
  McdGive?: undefined;
631
660
  McdMerge?: undefined;
@@ -650,6 +679,11 @@ declare const actionAddresses: (chainId?: null) => {
650
679
  AaveWithdraw?: undefined;
651
680
  AaveCollateralSwitch?: undefined;
652
681
  AaveV3View?: undefined;
682
+ LSVWithdraw?: undefined;
683
+ LSVBorrow?: undefined;
684
+ LSVSupply?: undefined;
685
+ LSVPayback?: undefined;
686
+ LSVSell?: undefined;
653
687
  MorphoAaveV2Borrow?: undefined;
654
688
  MorphoAaveV2Payback?: undefined;
655
689
  MorphoAaveV2Supply?: undefined;
@@ -659,6 +693,7 @@ declare const actionAddresses: (chainId?: null) => {
659
693
  MorphoAaveV3Payback?: undefined;
660
694
  MorphoAaveV3Supply?: undefined;
661
695
  MorphoAaveV3Withdraw?: undefined;
696
+ MorphoAaveV3SetManager?: undefined;
662
697
  CompBorrow?: undefined;
663
698
  CompClaim?: undefined;
664
699
  CompPayback?: undefined;
@@ -768,6 +803,7 @@ declare const actionAddresses: (chainId?: null) => {
768
803
  UpdateSub?: undefined;
769
804
  TransferNFT?: undefined;
770
805
  CreateSub?: undefined;
806
+ ApproveToken?: undefined;
771
807
  McdGenerate?: undefined;
772
808
  McdGive?: undefined;
773
809
  McdMerge?: undefined;
@@ -793,6 +829,11 @@ declare const actionAddresses: (chainId?: null) => {
793
829
  AaveCollateralSwitch?: undefined;
794
830
  AaveV3ClaimRewards?: undefined;
795
831
  AaveV3View?: undefined;
832
+ LSVWithdraw?: undefined;
833
+ LSVBorrow?: undefined;
834
+ LSVSupply?: undefined;
835
+ LSVPayback?: undefined;
836
+ LSVSell?: undefined;
796
837
  MorphoAaveV2Borrow?: undefined;
797
838
  MorphoAaveV2Payback?: undefined;
798
839
  MorphoAaveV2Supply?: undefined;
@@ -802,6 +843,7 @@ declare const actionAddresses: (chainId?: null) => {
802
843
  MorphoAaveV3Payback?: undefined;
803
844
  MorphoAaveV3Supply?: undefined;
804
845
  MorphoAaveV3Withdraw?: undefined;
846
+ MorphoAaveV3SetManager?: undefined;
805
847
  CompBorrow?: undefined;
806
848
  CompClaim?: undefined;
807
849
  CompPayback?: undefined;
@@ -991,6 +1033,7 @@ declare const _default: {
991
1033
  UpdateSub: string;
992
1034
  TransferNFT: string;
993
1035
  CreateSub: string;
1036
+ ApproveToken: string;
994
1037
  DFSSell: string;
995
1038
  McdGenerate: string;
996
1039
  McdGive: string;
@@ -1025,6 +1068,11 @@ declare const _default: {
1025
1068
  AaveV3Borrow: string;
1026
1069
  AaveV3ATokenPayback: string;
1027
1070
  AaveV3View: string;
1071
+ LSVWithdraw: string;
1072
+ LSVBorrow: string;
1073
+ LSVSupply: string;
1074
+ LSVPayback: string;
1075
+ LSVSell: string;
1028
1076
  MorphoAaveV2Borrow: string;
1029
1077
  MorphoAaveV2Payback: string;
1030
1078
  MorphoAaveV2Supply: string;
@@ -1034,6 +1082,7 @@ declare const _default: {
1034
1082
  MorphoAaveV3Payback: string;
1035
1083
  MorphoAaveV3Supply: string;
1036
1084
  MorphoAaveV3Withdraw: string;
1085
+ MorphoAaveV3SetManager: string;
1037
1086
  CompBorrow: string;
1038
1087
  CompClaim: string;
1039
1088
  CompPayback: string;
@@ -1157,6 +1206,7 @@ declare const _default: {
1157
1206
  UpdateSub?: undefined;
1158
1207
  TransferNFT?: undefined;
1159
1208
  CreateSub?: undefined;
1209
+ ApproveToken?: undefined;
1160
1210
  McdGenerate?: undefined;
1161
1211
  McdGive?: undefined;
1162
1212
  McdMerge?: undefined;
@@ -1181,6 +1231,11 @@ declare const _default: {
1181
1231
  AaveWithdraw?: undefined;
1182
1232
  AaveCollateralSwitch?: undefined;
1183
1233
  AaveV3View?: undefined;
1234
+ LSVWithdraw?: undefined;
1235
+ LSVBorrow?: undefined;
1236
+ LSVSupply?: undefined;
1237
+ LSVPayback?: undefined;
1238
+ LSVSell?: undefined;
1184
1239
  MorphoAaveV2Borrow?: undefined;
1185
1240
  MorphoAaveV2Payback?: undefined;
1186
1241
  MorphoAaveV2Supply?: undefined;
@@ -1190,6 +1245,7 @@ declare const _default: {
1190
1245
  MorphoAaveV3Payback?: undefined;
1191
1246
  MorphoAaveV3Supply?: undefined;
1192
1247
  MorphoAaveV3Withdraw?: undefined;
1248
+ MorphoAaveV3SetManager?: undefined;
1193
1249
  CompBorrow?: undefined;
1194
1250
  CompClaim?: undefined;
1195
1251
  CompPayback?: undefined;
@@ -1299,6 +1355,7 @@ declare const _default: {
1299
1355
  UpdateSub?: undefined;
1300
1356
  TransferNFT?: undefined;
1301
1357
  CreateSub?: undefined;
1358
+ ApproveToken?: undefined;
1302
1359
  McdGenerate?: undefined;
1303
1360
  McdGive?: undefined;
1304
1361
  McdMerge?: undefined;
@@ -1324,6 +1381,11 @@ declare const _default: {
1324
1381
  AaveCollateralSwitch?: undefined;
1325
1382
  AaveV3ClaimRewards?: undefined;
1326
1383
  AaveV3View?: undefined;
1384
+ LSVWithdraw?: undefined;
1385
+ LSVBorrow?: undefined;
1386
+ LSVSupply?: undefined;
1387
+ LSVPayback?: undefined;
1388
+ LSVSell?: undefined;
1327
1389
  MorphoAaveV2Borrow?: undefined;
1328
1390
  MorphoAaveV2Payback?: undefined;
1329
1391
  MorphoAaveV2Supply?: undefined;
@@ -1333,6 +1395,7 @@ declare const _default: {
1333
1395
  MorphoAaveV3Payback?: undefined;
1334
1396
  MorphoAaveV3Supply?: undefined;
1335
1397
  MorphoAaveV3Withdraw?: undefined;
1398
+ MorphoAaveV3SetManager?: undefined;
1336
1399
  CompBorrow?: undefined;
1337
1400
  CompClaim?: undefined;
1338
1401
  CompPayback?: undefined;
@@ -1425,6 +1488,7 @@ declare const _default: {
1425
1488
  UpdateSub: string;
1426
1489
  TransferNFT: string;
1427
1490
  CreateSub: string;
1491
+ ApproveToken: string;
1428
1492
  DFSSell: string;
1429
1493
  McdGenerate: string;
1430
1494
  McdGive: string;
@@ -1459,6 +1523,11 @@ declare const _default: {
1459
1523
  AaveV3Borrow: string;
1460
1524
  AaveV3ATokenPayback: string;
1461
1525
  AaveV3View: string;
1526
+ LSVWithdraw: string;
1527
+ LSVBorrow: string;
1528
+ LSVSupply: string;
1529
+ LSVPayback: string;
1530
+ LSVSell: string;
1462
1531
  MorphoAaveV2Borrow: string;
1463
1532
  MorphoAaveV2Payback: string;
1464
1533
  MorphoAaveV2Supply: string;
@@ -1468,6 +1537,7 @@ declare const _default: {
1468
1537
  MorphoAaveV3Payback: string;
1469
1538
  MorphoAaveV3Supply: string;
1470
1539
  MorphoAaveV3Withdraw: string;
1540
+ MorphoAaveV3SetManager: string;
1471
1541
  CompBorrow: string;
1472
1542
  CompClaim: string;
1473
1543
  CompPayback: string;
@@ -1591,6 +1661,7 @@ declare const _default: {
1591
1661
  UpdateSub?: undefined;
1592
1662
  TransferNFT?: undefined;
1593
1663
  CreateSub?: undefined;
1664
+ ApproveToken?: undefined;
1594
1665
  McdGenerate?: undefined;
1595
1666
  McdGive?: undefined;
1596
1667
  McdMerge?: undefined;
@@ -1615,6 +1686,11 @@ declare const _default: {
1615
1686
  AaveWithdraw?: undefined;
1616
1687
  AaveCollateralSwitch?: undefined;
1617
1688
  AaveV3View?: undefined;
1689
+ LSVWithdraw?: undefined;
1690
+ LSVBorrow?: undefined;
1691
+ LSVSupply?: undefined;
1692
+ LSVPayback?: undefined;
1693
+ LSVSell?: undefined;
1618
1694
  MorphoAaveV2Borrow?: undefined;
1619
1695
  MorphoAaveV2Payback?: undefined;
1620
1696
  MorphoAaveV2Supply?: undefined;
@@ -1624,6 +1700,7 @@ declare const _default: {
1624
1700
  MorphoAaveV3Payback?: undefined;
1625
1701
  MorphoAaveV3Supply?: undefined;
1626
1702
  MorphoAaveV3Withdraw?: undefined;
1703
+ MorphoAaveV3SetManager?: undefined;
1627
1704
  CompBorrow?: undefined;
1628
1705
  CompClaim?: undefined;
1629
1706
  CompPayback?: undefined;
@@ -1733,6 +1810,7 @@ declare const _default: {
1733
1810
  UpdateSub?: undefined;
1734
1811
  TransferNFT?: undefined;
1735
1812
  CreateSub?: undefined;
1813
+ ApproveToken?: undefined;
1736
1814
  McdGenerate?: undefined;
1737
1815
  McdGive?: undefined;
1738
1816
  McdMerge?: undefined;
@@ -1758,6 +1836,11 @@ declare const _default: {
1758
1836
  AaveCollateralSwitch?: undefined;
1759
1837
  AaveV3ClaimRewards?: undefined;
1760
1838
  AaveV3View?: undefined;
1839
+ LSVWithdraw?: undefined;
1840
+ LSVBorrow?: undefined;
1841
+ LSVSupply?: undefined;
1842
+ LSVPayback?: undefined;
1843
+ LSVSell?: undefined;
1761
1844
  MorphoAaveV2Borrow?: undefined;
1762
1845
  MorphoAaveV2Payback?: undefined;
1763
1846
  MorphoAaveV2Supply?: undefined;
@@ -1767,6 +1850,7 @@ declare const _default: {
1767
1850
  MorphoAaveV3Payback?: undefined;
1768
1851
  MorphoAaveV3Supply?: undefined;
1769
1852
  MorphoAaveV3Withdraw?: undefined;
1853
+ MorphoAaveV3SetManager?: undefined;
1770
1854
  CompBorrow?: undefined;
1771
1855
  CompClaim?: undefined;
1772
1856
  CompPayback?: undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/sdk",
3
- "version": "1.0.21",
3
+ "version": "1.0.23-dev",
4
4
  "description": "",
5
5
  "main": "./umd/index.js",
6
6
  "module": "./esm/src/index.js",
package/src/Action.ts CHANGED
@@ -146,7 +146,8 @@ export class Action {
146
146
  }
147
147
 
148
148
  encodeForL2DsProxyCall() {
149
- return this._encodeForCall()[0];
149
+ const executeActionDirectAbi : any = (ActionAbi.find(({ name }:{ name: string }) => name === 'executeActionDirect'))!;
150
+ return AbiCoder.encodeFunctionCall(executeActionDirectAbi, this._encodeForCall());
150
151
  }
151
152
 
152
153
  encodeForL2Recipe() {
@@ -0,0 +1,29 @@
1
+ import { Action } from '../../Action';
2
+ import { requireAddress } from '../../utils/general';
3
+ import { getAddr } from '../../addresses';
4
+ import { EthAddress, uint256 } from '../../types';
5
+
6
+ /**
7
+ *
8
+ * @category BasicActions
9
+ */
10
+ export class ApproveTokenAction extends Action {
11
+ /**
12
+ * @param token Token address
13
+ * @param spender
14
+ * @param amount Transfer amount (-1 for whole Recipe (DsProxy) balance)
15
+ */
16
+ constructor(token: EthAddress, spender: EthAddress, amount:uint256) {
17
+ requireAddress(spender);
18
+ super(
19
+ 'ApproveToken',
20
+ getAddr('ApproveToken'),
21
+ [
22
+ 'address',
23
+ 'address',
24
+ 'uint',
25
+ ],
26
+ [token, spender, amount],
27
+ );
28
+ }
29
+ }
@@ -0,0 +1,61 @@
1
+ import AbiCoder from 'web3-eth-abi';
2
+ import { getAssetInfoByAddress } from '@defisaver/tokens';
3
+ import ActionAbi from '../../abis/Action.json';
4
+ import { ActionWithL2 } from '../../ActionWithL2';
5
+ import { requireAddress } from '../../utils/general';
6
+ import { getAddr } from '../../addresses';
7
+ import { EthAddress } from '../../types';
8
+
9
+ /**
10
+ * Sells token on DeFi Saver exchange aggregator without fee
11
+ *
12
+ * @category BasicActions
13
+ */
14
+ export class LSVSellAction extends ActionWithL2 {
15
+ protocolFee:string;
16
+
17
+ /**
18
+ * @param exchangeOrder Standard DFS Exchange data
19
+ * @param from Order sender
20
+ * @param to Order recipient
21
+ * @param protocolFee 0x fee (amount of ETH in Wei)
22
+ */
23
+ constructor(exchangeOrder:Array<any>, from:EthAddress, to:EthAddress, protocolFee = '0') {
24
+ requireAddress(to);
25
+ super(
26
+ 'LSVSell',
27
+ getAddr('LSVSell'),
28
+ [
29
+ ['address', 'address', 'uint256', 'uint256', 'uint256', 'uint256', 'address', 'address', 'bytes', ['address', 'address', 'address', 'uint256', 'uint256', 'bytes']],
30
+ 'address',
31
+ 'address',
32
+ ],
33
+ [exchangeOrder, from, to],
34
+ );
35
+
36
+ this.protocolFee = protocolFee;
37
+
38
+ this.mappableArgs = [
39
+ this.args[0][0],
40
+ this.args[0][1],
41
+ this.args[0][2],
42
+ this.args[1],
43
+ this.args[2],
44
+ ];
45
+ }
46
+
47
+ encodeInputs() {
48
+ const executeActionDirectAbi: any = (ActionAbi.find(({ name }) => name === 'executeActionDirect'))!;
49
+ return AbiCoder.encodeFunctionCall(executeActionDirectAbi, this._encodeForCall());
50
+ }
51
+
52
+ async getAssetsToApprove() {
53
+ const asset = getAssetInfoByAddress(this.args[0][0]);
54
+ if (asset.symbol !== 'ETH') return [{ asset: this.args[0][0], owner: this.args[1] }];
55
+ return [];
56
+ }
57
+
58
+ async getEthValue() {
59
+ return this.protocolFee || '0';
60
+ }
61
+ }
@@ -16,3 +16,5 @@ export * from './GasFeeActionL2';
16
16
  export * from './TransferNFTAction';
17
17
  export * from './SendTokensAction';
18
18
  export * from './CreateSubAction';
19
+ export * from './LSVSellAction';
20
+ export * from './ApproveTokenAction';
@@ -23,6 +23,7 @@ import * as chickenBonds from './chickenBonds';
23
23
  import * as compoundV3 from './compoundV3';
24
24
  import * as morpho from './morpho';
25
25
  import * as bprotocol from './bprotocol';
26
+ import * as lsv from './lsv';
26
27
 
27
28
  export {
28
29
  aave,
@@ -50,4 +51,5 @@ export {
50
51
  compoundV3,
51
52
  morpho,
52
53
  bprotocol,
54
+ lsv,
53
55
  };
@@ -0,0 +1,18 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ import { EthAddress, uint256, uint8 } from '../../types';
4
+
5
+ /**
6
+ *
7
+ *
8
+ * @category LSV
9
+ */
10
+ export class LSVBorrowAction extends Action {
11
+ /**
12
+ * @param protocol
13
+ * @param amount
14
+ */
15
+ constructor(protocol:uint8, amount:uint256) {
16
+ super('LSVBorrow', getAddr('LSVBorrow'), ['uint8', 'uint256'], [protocol, amount]);
17
+ }
18
+ }
@@ -0,0 +1,17 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ import { uint8, uint256 } from '../../types';
4
+
5
+ /**
6
+ *
7
+ * @category LSV
8
+ */
9
+ export class LSVPaybackAction extends Action {
10
+ /**
11
+ * @param protocol
12
+ * @param amount
13
+ */
14
+ constructor(protocol:uint8, amount:uint256) {
15
+ super('LSVPayback', getAddr('LSVPayback'), ['uint8', 'uint256'], [protocol, amount]);
16
+ }
17
+ }
@@ -0,0 +1,19 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ import { EthAddress, uint256, uint8 } from '../../types';
4
+
5
+ /**
6
+ *
7
+ *
8
+ * @category LSV
9
+ */
10
+ export class LSVSupplyAction extends Action {
11
+ /**
12
+ * @param protocol
13
+ * @param token
14
+ * @param amount
15
+ */
16
+ constructor(protocol:uint8, token:EthAddress, amount:uint256) {
17
+ super('LSVSupply', getAddr('LSVSupply'), ['uint8', 'address', 'uint256'], [protocol, token, amount]);
18
+ }
19
+ }
@@ -0,0 +1,19 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ import { EthAddress, uint256, uint8 } from '../../types';
4
+
5
+ /**
6
+ *
7
+ * @category LSV
8
+ */
9
+ export class LSVWithdrawAction extends Action {
10
+ /**
11
+ * @param protocol
12
+ * @param token
13
+ * @param amount
14
+ * @param isPositionClosing
15
+ */
16
+ constructor(protocol:uint8, token:EthAddress, amount:uint256, isPositionClosing:boolean) {
17
+ super('LSVWithdraw', getAddr('LSVWithdraw'), ['uint8', 'address', 'uint256', 'bool'], [protocol, token, amount, isPositionClosing]);
18
+ }
19
+ }
@@ -0,0 +1,4 @@
1
+ export * from './LSVPaybackAction';
2
+ export * from './LSVWithdrawAction';
3
+ export * from './LSVSupplyAction';
4
+ export * from './LSVBorrowAction';
@@ -0,0 +1,28 @@
1
+ import { Action } from '../../../Action';
2
+ import { getAddr } from '../../../addresses';
3
+ import { EthAddress, uint256 } from '../../../types';
4
+
5
+
6
+ /**
7
+ *
8
+ * @category MorphoAaveV3
9
+ */
10
+ export class MorphoAaveV3SetManagerAction extends Action {
11
+ /**
12
+ * @param emodeId
13
+ * @param manager
14
+ * @param isAllowed
15
+ */
16
+ constructor(emodeId: uint256, manager: EthAddress, isAllowed:boolean) {
17
+ super(
18
+ 'MorphoAaveV3SetManager',
19
+ getAddr('MorphoAaveV3SetManager'),
20
+ [
21
+ 'uint256',
22
+ 'address',
23
+ 'bool',
24
+ ],
25
+ [emodeId, manager, isAllowed],
26
+ );
27
+ }
28
+ }
@@ -7,3 +7,4 @@ export * from './aaveV3/MorphoAaveV3SupplyAction';
7
7
  export * from './aaveV3/MorphoAaveV3WithdrawAction';
8
8
  export * from './aaveV3/MorphoAaveV3BorrowAction';
9
9
  export * from './aaveV3/MorphoAaveV3PaybackAction';
10
+ export * from './aaveV3/MorphoAaveV3SetManagerAction';
package/src/addresses.ts CHANGED
@@ -18,6 +18,7 @@ export const actionAddresses = {
18
18
  UpdateSub: '0xF6Cb8f7e61a64075ec8FAC3f298745605E543233',
19
19
  TransferNFT: '0x861e893E1796F81248e75F06C0b09Abdc8fe2f6F',
20
20
  CreateSub: '0x7308e88BB21B934478E75bB6A2143b8cfDFf2961',
21
+ ApproveToken: '0x0000000000000000000000000000000000000000',
21
22
  // exchange
22
23
  DFSSell: '0x951D7B421f45FF0e4A8ddE0288aE3f9C2C69b784',
23
24
 
@@ -64,6 +65,13 @@ export const actionAddresses = {
64
65
  AaveV3ATokenPayback: '0xDe5c012cd1878D86E91309593764895a3adb380E',
65
66
  AaveV3View: '0x9ECB0645b357fDD7B92789B91595160862Bd45d0',
66
67
 
68
+ // LSV action
69
+ LSVWithdraw: '0x0000000000000000000000000000000000000000',
70
+ LSVBorrow: '0x0000000000000000000000000000000000000000',
71
+ LSVSupply: '0x0000000000000000000000000000000000000000',
72
+ LSVPayback: '0x0000000000000000000000000000000000000000',
73
+ LSVSell: '0x0000000000000000000000000000000000000000',
74
+
67
75
  // morpho aave v2
68
76
  MorphoAaveV2Borrow: '0xa85C3E41Bf9F75a381927e1Aa9b00f77C4631109',
69
77
  MorphoAaveV2Payback: '0x5dd0E0835acbb08aa4A4599d70fB2d93969fa7b7',
@@ -72,10 +80,11 @@ export const actionAddresses = {
72
80
  MorphoClaim: '0xa269C841E26EA8Ee1F0350a2E5905F71446998dC',
73
81
 
74
82
  // morpho aave v3
75
- MorphoAaveV3Borrow: '0x4a177af7640e087dc819c52b28eaa9f672bcd362',
76
- MorphoAaveV3Payback: '0x31d38b7ece8c68b0cbdc9f6db93a0251841c1ad6',
77
- MorphoAaveV3Supply: '0x5befc2b35721aafaccd3c63916e8dc99b8aeab53',
78
- MorphoAaveV3Withdraw: '0xb5305db14b7290266aa3790ffe828900c4cfb6a7',
83
+ MorphoAaveV3Borrow: '0x487719C57b88477F19423aB0652b3E26b96baA7F',
84
+ MorphoAaveV3Payback: '0x36b8b968c81D97cBfAa642e206b634A6f378d287',
85
+ MorphoAaveV3Supply: '0x51fA8FBc6F0aDEfe2FBA06104FCA39f5beD69291',
86
+ MorphoAaveV3Withdraw: '0xdc3e74C4cD577275296ceFE36A3D082223AfF206',
87
+ MorphoAaveV3SetManager: '0x0000000000000000000000000000000000000000',
79
88
 
80
89
  // compound
81
90
  CompBorrow: '0x8495579BF6Ae848f7E59686536F834f1d2CCd79C',