@defisaver/sdk 1.0.41 → 1.0.42-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.
- package/esm/src/Action.d.ts +2 -2
- package/esm/src/actions/aave/AaveClaimAAVEAction.d.ts +14 -0
- package/esm/src/actions/aave/AaveClaimAAVEAction.js +22 -0
- package/esm/src/actions/aave/AaveSupplyAction.js +1 -0
- package/esm/src/actions/aave/index.d.ts +1 -0
- package/esm/src/actions/aave/index.js +1 -0
- package/esm/src/actions/basic/ApproveTokenAction.d.ts +14 -0
- package/esm/src/actions/basic/ApproveTokenAction.js +27 -0
- package/esm/src/actions/basic/LSVSellAction.d.ts +23 -0
- package/esm/src/actions/basic/LSVSellAction.js +61 -0
- package/esm/src/actions/basic/index.d.ts +2 -0
- package/esm/src/actions/basic/index.js +2 -0
- package/esm/src/actions/index.d.ts +2 -1
- package/esm/src/actions/index.js +2 -1
- package/esm/src/actions/lsv/LSVBorrowAction.d.ts +14 -0
- package/esm/src/actions/lsv/LSVBorrowAction.js +19 -0
- package/esm/src/actions/lsv/LSVPaybackAction.d.ts +13 -0
- package/esm/src/actions/lsv/LSVPaybackAction.js +18 -0
- package/esm/src/actions/lsv/LSVSupplyAction.d.ts +15 -0
- package/esm/src/actions/lsv/LSVSupplyAction.js +21 -0
- package/esm/src/actions/lsv/LSVWithdrawAction.d.ts +15 -0
- package/esm/src/actions/lsv/LSVWithdrawAction.js +21 -0
- package/esm/src/actions/lsv/index.d.ts +4 -0
- package/esm/src/actions/lsv/index.js +4 -0
- package/esm/src/actions/morpho/aaveV3/MorphoAaveV3SetManagerAction.d.ts +14 -0
- package/esm/src/actions/morpho/aaveV3/MorphoAaveV3SetManagerAction.js +24 -0
- package/esm/src/actions/morpho/index.d.ts +1 -0
- package/esm/src/actions/morpho/index.js +1 -0
- package/esm/src/addresses.d.ts +24 -0
- package/esm/src/addresses.js +9 -0
- package/esm/src/index.d.ts +96 -0
- package/esm/src/types.d.ts +20 -20
- package/package.json +1 -1
- package/src/actions/aave/AaveClaimAAVEAction.ts +29 -0
- package/src/actions/aave/AaveSupplyAction.ts +1 -0
- package/src/actions/aave/index.ts +2 -1
- package/src/actions/basic/ApproveTokenAction.ts +34 -0
- package/src/actions/basic/LSVSellAction.ts +61 -0
- package/src/actions/basic/index.ts +2 -0
- package/src/actions/index.ts +2 -0
- package/src/actions/lsv/LSVBorrowAction.ts +21 -0
- package/src/actions/lsv/LSVPaybackAction.ts +20 -0
- package/src/actions/lsv/LSVSupplyAction.ts +23 -0
- package/src/actions/lsv/LSVWithdrawAction.ts +23 -0
- package/src/actions/lsv/index.ts +4 -0
- package/src/actions/morpho/aaveV3/MorphoAaveV3SetManagerAction.ts +32 -0
- package/src/actions/morpho/index.ts +1 -0
- package/src/addresses.ts +10 -1
- package/umd/index.js +841 -563
package/esm/src/index.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ declare const actionAddressesAllChains: {
|
|
|
26
26
|
UpdateSub: string;
|
|
27
27
|
TransferNFT: string;
|
|
28
28
|
CreateSub: string;
|
|
29
|
+
ApproveToken: string;
|
|
29
30
|
SDaiWrap: string;
|
|
30
31
|
SDaiUnwrap: string;
|
|
31
32
|
TokenizedVaultAdapter: string;
|
|
@@ -54,6 +55,7 @@ declare const actionAddressesAllChains: {
|
|
|
54
55
|
AaveWithdraw: string;
|
|
55
56
|
AaveCollateralSwitch: string;
|
|
56
57
|
AaveUnstake: string;
|
|
58
|
+
AaveClaimAAVE: string;
|
|
57
59
|
AaveV3Withdraw: string;
|
|
58
60
|
AaveV3SwapBorrowRateMode: string;
|
|
59
61
|
AaveV3Supply: string;
|
|
@@ -64,6 +66,11 @@ declare const actionAddressesAllChains: {
|
|
|
64
66
|
AaveV3Borrow: string;
|
|
65
67
|
AaveV3ATokenPayback: string;
|
|
66
68
|
AaveV3View: string;
|
|
69
|
+
LSVWithdraw: string;
|
|
70
|
+
LSVBorrow: string;
|
|
71
|
+
LSVSupply: string;
|
|
72
|
+
LSVPayback: string;
|
|
73
|
+
LSVSell: string;
|
|
67
74
|
MorphoAaveV2Borrow: string;
|
|
68
75
|
MorphoAaveV2Payback: string;
|
|
69
76
|
MorphoAaveV2Supply: string;
|
|
@@ -73,6 +80,7 @@ declare const actionAddressesAllChains: {
|
|
|
73
80
|
MorphoAaveV3Payback: string;
|
|
74
81
|
MorphoAaveV3Supply: string;
|
|
75
82
|
MorphoAaveV3Withdraw: string;
|
|
83
|
+
MorphoAaveV3SetManager: string;
|
|
76
84
|
SparkBorrow: string;
|
|
77
85
|
SparkClaimRewards: string;
|
|
78
86
|
SparkCollateralSwitch: string;
|
|
@@ -219,6 +227,7 @@ declare const actionAddressesAllChains: {
|
|
|
219
227
|
UpdateSub?: undefined;
|
|
220
228
|
TransferNFT?: undefined;
|
|
221
229
|
CreateSub?: undefined;
|
|
230
|
+
ApproveToken?: undefined;
|
|
222
231
|
SDaiWrap?: undefined;
|
|
223
232
|
SDaiUnwrap?: undefined;
|
|
224
233
|
McdGenerate?: undefined;
|
|
@@ -245,7 +254,13 @@ declare const actionAddressesAllChains: {
|
|
|
245
254
|
AaveWithdraw?: undefined;
|
|
246
255
|
AaveCollateralSwitch?: undefined;
|
|
247
256
|
AaveUnstake?: undefined;
|
|
257
|
+
AaveClaimAAVE?: undefined;
|
|
248
258
|
AaveV3View?: undefined;
|
|
259
|
+
LSVWithdraw?: undefined;
|
|
260
|
+
LSVBorrow?: undefined;
|
|
261
|
+
LSVSupply?: undefined;
|
|
262
|
+
LSVPayback?: undefined;
|
|
263
|
+
LSVSell?: undefined;
|
|
249
264
|
MorphoAaveV2Borrow?: undefined;
|
|
250
265
|
MorphoAaveV2Payback?: undefined;
|
|
251
266
|
MorphoAaveV2Supply?: undefined;
|
|
@@ -255,6 +270,7 @@ declare const actionAddressesAllChains: {
|
|
|
255
270
|
MorphoAaveV3Payback?: undefined;
|
|
256
271
|
MorphoAaveV3Supply?: undefined;
|
|
257
272
|
MorphoAaveV3Withdraw?: undefined;
|
|
273
|
+
MorphoAaveV3SetManager?: undefined;
|
|
258
274
|
SparkBorrow?: undefined;
|
|
259
275
|
SparkClaimRewards?: undefined;
|
|
260
276
|
SparkCollateralSwitch?: undefined;
|
|
@@ -387,6 +403,7 @@ declare const actionAddressesAllChains: {
|
|
|
387
403
|
UpdateSub?: undefined;
|
|
388
404
|
TransferNFT?: undefined;
|
|
389
405
|
CreateSub?: undefined;
|
|
406
|
+
ApproveToken?: undefined;
|
|
390
407
|
SDaiWrap?: undefined;
|
|
391
408
|
SDaiUnwrap?: undefined;
|
|
392
409
|
McdGenerate?: undefined;
|
|
@@ -413,8 +430,14 @@ declare const actionAddressesAllChains: {
|
|
|
413
430
|
AaveWithdraw?: undefined;
|
|
414
431
|
AaveCollateralSwitch?: undefined;
|
|
415
432
|
AaveUnstake?: undefined;
|
|
433
|
+
AaveClaimAAVE?: undefined;
|
|
416
434
|
AaveV3ClaimRewards?: undefined;
|
|
417
435
|
AaveV3View?: undefined;
|
|
436
|
+
LSVWithdraw?: undefined;
|
|
437
|
+
LSVBorrow?: undefined;
|
|
438
|
+
LSVSupply?: undefined;
|
|
439
|
+
LSVPayback?: undefined;
|
|
440
|
+
LSVSell?: undefined;
|
|
418
441
|
MorphoAaveV2Borrow?: undefined;
|
|
419
442
|
MorphoAaveV2Payback?: undefined;
|
|
420
443
|
MorphoAaveV2Supply?: undefined;
|
|
@@ -424,6 +447,7 @@ declare const actionAddressesAllChains: {
|
|
|
424
447
|
MorphoAaveV3Payback?: undefined;
|
|
425
448
|
MorphoAaveV3Supply?: undefined;
|
|
426
449
|
MorphoAaveV3Withdraw?: undefined;
|
|
450
|
+
MorphoAaveV3SetManager?: undefined;
|
|
427
451
|
SparkBorrow?: undefined;
|
|
428
452
|
SparkClaimRewards?: undefined;
|
|
429
453
|
SparkCollateralSwitch?: undefined;
|
|
@@ -538,6 +562,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
538
562
|
UpdateSub: string;
|
|
539
563
|
TransferNFT: string;
|
|
540
564
|
CreateSub: string;
|
|
565
|
+
ApproveToken: string;
|
|
541
566
|
SDaiWrap: string;
|
|
542
567
|
SDaiUnwrap: string;
|
|
543
568
|
TokenizedVaultAdapter: string;
|
|
@@ -566,6 +591,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
566
591
|
AaveWithdraw: string;
|
|
567
592
|
AaveCollateralSwitch: string;
|
|
568
593
|
AaveUnstake: string;
|
|
594
|
+
AaveClaimAAVE: string;
|
|
569
595
|
AaveV3Withdraw: string;
|
|
570
596
|
AaveV3SwapBorrowRateMode: string;
|
|
571
597
|
AaveV3Supply: string;
|
|
@@ -576,6 +602,11 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
576
602
|
AaveV3Borrow: string;
|
|
577
603
|
AaveV3ATokenPayback: string;
|
|
578
604
|
AaveV3View: string;
|
|
605
|
+
LSVWithdraw: string;
|
|
606
|
+
LSVBorrow: string;
|
|
607
|
+
LSVSupply: string;
|
|
608
|
+
LSVPayback: string;
|
|
609
|
+
LSVSell: string;
|
|
579
610
|
MorphoAaveV2Borrow: string;
|
|
580
611
|
MorphoAaveV2Payback: string;
|
|
581
612
|
MorphoAaveV2Supply: string;
|
|
@@ -585,6 +616,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
585
616
|
MorphoAaveV3Payback: string;
|
|
586
617
|
MorphoAaveV3Supply: string;
|
|
587
618
|
MorphoAaveV3Withdraw: string;
|
|
619
|
+
MorphoAaveV3SetManager: string;
|
|
588
620
|
SparkBorrow: string;
|
|
589
621
|
SparkClaimRewards: string;
|
|
590
622
|
SparkCollateralSwitch: string;
|
|
@@ -731,6 +763,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
731
763
|
UpdateSub?: undefined;
|
|
732
764
|
TransferNFT?: undefined;
|
|
733
765
|
CreateSub?: undefined;
|
|
766
|
+
ApproveToken?: undefined;
|
|
734
767
|
SDaiWrap?: undefined;
|
|
735
768
|
SDaiUnwrap?: undefined;
|
|
736
769
|
McdGenerate?: undefined;
|
|
@@ -757,7 +790,13 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
757
790
|
AaveWithdraw?: undefined;
|
|
758
791
|
AaveCollateralSwitch?: undefined;
|
|
759
792
|
AaveUnstake?: undefined;
|
|
793
|
+
AaveClaimAAVE?: undefined;
|
|
760
794
|
AaveV3View?: undefined;
|
|
795
|
+
LSVWithdraw?: undefined;
|
|
796
|
+
LSVBorrow?: undefined;
|
|
797
|
+
LSVSupply?: undefined;
|
|
798
|
+
LSVPayback?: undefined;
|
|
799
|
+
LSVSell?: undefined;
|
|
761
800
|
MorphoAaveV2Borrow?: undefined;
|
|
762
801
|
MorphoAaveV2Payback?: undefined;
|
|
763
802
|
MorphoAaveV2Supply?: undefined;
|
|
@@ -767,6 +806,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
767
806
|
MorphoAaveV3Payback?: undefined;
|
|
768
807
|
MorphoAaveV3Supply?: undefined;
|
|
769
808
|
MorphoAaveV3Withdraw?: undefined;
|
|
809
|
+
MorphoAaveV3SetManager?: undefined;
|
|
770
810
|
SparkBorrow?: undefined;
|
|
771
811
|
SparkClaimRewards?: undefined;
|
|
772
812
|
SparkCollateralSwitch?: undefined;
|
|
@@ -899,6 +939,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
899
939
|
UpdateSub?: undefined;
|
|
900
940
|
TransferNFT?: undefined;
|
|
901
941
|
CreateSub?: undefined;
|
|
942
|
+
ApproveToken?: undefined;
|
|
902
943
|
SDaiWrap?: undefined;
|
|
903
944
|
SDaiUnwrap?: undefined;
|
|
904
945
|
McdGenerate?: undefined;
|
|
@@ -925,8 +966,14 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
925
966
|
AaveWithdraw?: undefined;
|
|
926
967
|
AaveCollateralSwitch?: undefined;
|
|
927
968
|
AaveUnstake?: undefined;
|
|
969
|
+
AaveClaimAAVE?: undefined;
|
|
928
970
|
AaveV3ClaimRewards?: undefined;
|
|
929
971
|
AaveV3View?: undefined;
|
|
972
|
+
LSVWithdraw?: undefined;
|
|
973
|
+
LSVBorrow?: undefined;
|
|
974
|
+
LSVSupply?: undefined;
|
|
975
|
+
LSVPayback?: undefined;
|
|
976
|
+
LSVSell?: undefined;
|
|
930
977
|
MorphoAaveV2Borrow?: undefined;
|
|
931
978
|
MorphoAaveV2Payback?: undefined;
|
|
932
979
|
MorphoAaveV2Supply?: undefined;
|
|
@@ -936,6 +983,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
936
983
|
MorphoAaveV3Payback?: undefined;
|
|
937
984
|
MorphoAaveV3Supply?: undefined;
|
|
938
985
|
MorphoAaveV3Withdraw?: undefined;
|
|
986
|
+
MorphoAaveV3SetManager?: undefined;
|
|
939
987
|
SparkBorrow?: undefined;
|
|
940
988
|
SparkClaimRewards?: undefined;
|
|
941
989
|
SparkCollateralSwitch?: undefined;
|
|
@@ -1151,6 +1199,7 @@ declare const _default: {
|
|
|
1151
1199
|
UpdateSub: string;
|
|
1152
1200
|
TransferNFT: string;
|
|
1153
1201
|
CreateSub: string;
|
|
1202
|
+
ApproveToken: string;
|
|
1154
1203
|
SDaiWrap: string;
|
|
1155
1204
|
SDaiUnwrap: string;
|
|
1156
1205
|
TokenizedVaultAdapter: string;
|
|
@@ -1179,6 +1228,7 @@ declare const _default: {
|
|
|
1179
1228
|
AaveWithdraw: string;
|
|
1180
1229
|
AaveCollateralSwitch: string;
|
|
1181
1230
|
AaveUnstake: string;
|
|
1231
|
+
AaveClaimAAVE: string;
|
|
1182
1232
|
AaveV3Withdraw: string;
|
|
1183
1233
|
AaveV3SwapBorrowRateMode: string;
|
|
1184
1234
|
AaveV3Supply: string;
|
|
@@ -1189,6 +1239,11 @@ declare const _default: {
|
|
|
1189
1239
|
AaveV3Borrow: string;
|
|
1190
1240
|
AaveV3ATokenPayback: string;
|
|
1191
1241
|
AaveV3View: string;
|
|
1242
|
+
LSVWithdraw: string;
|
|
1243
|
+
LSVBorrow: string;
|
|
1244
|
+
LSVSupply: string;
|
|
1245
|
+
LSVPayback: string;
|
|
1246
|
+
LSVSell: string;
|
|
1192
1247
|
MorphoAaveV2Borrow: string;
|
|
1193
1248
|
MorphoAaveV2Payback: string;
|
|
1194
1249
|
MorphoAaveV2Supply: string;
|
|
@@ -1198,6 +1253,7 @@ declare const _default: {
|
|
|
1198
1253
|
MorphoAaveV3Payback: string;
|
|
1199
1254
|
MorphoAaveV3Supply: string;
|
|
1200
1255
|
MorphoAaveV3Withdraw: string;
|
|
1256
|
+
MorphoAaveV3SetManager: string;
|
|
1201
1257
|
SparkBorrow: string;
|
|
1202
1258
|
SparkClaimRewards: string;
|
|
1203
1259
|
SparkCollateralSwitch: string;
|
|
@@ -1344,6 +1400,7 @@ declare const _default: {
|
|
|
1344
1400
|
UpdateSub?: undefined;
|
|
1345
1401
|
TransferNFT?: undefined;
|
|
1346
1402
|
CreateSub?: undefined;
|
|
1403
|
+
ApproveToken?: undefined;
|
|
1347
1404
|
SDaiWrap?: undefined;
|
|
1348
1405
|
SDaiUnwrap?: undefined;
|
|
1349
1406
|
McdGenerate?: undefined;
|
|
@@ -1370,7 +1427,13 @@ declare const _default: {
|
|
|
1370
1427
|
AaveWithdraw?: undefined;
|
|
1371
1428
|
AaveCollateralSwitch?: undefined;
|
|
1372
1429
|
AaveUnstake?: undefined;
|
|
1430
|
+
AaveClaimAAVE?: undefined;
|
|
1373
1431
|
AaveV3View?: undefined;
|
|
1432
|
+
LSVWithdraw?: undefined;
|
|
1433
|
+
LSVBorrow?: undefined;
|
|
1434
|
+
LSVSupply?: undefined;
|
|
1435
|
+
LSVPayback?: undefined;
|
|
1436
|
+
LSVSell?: undefined;
|
|
1374
1437
|
MorphoAaveV2Borrow?: undefined;
|
|
1375
1438
|
MorphoAaveV2Payback?: undefined;
|
|
1376
1439
|
MorphoAaveV2Supply?: undefined;
|
|
@@ -1380,6 +1443,7 @@ declare const _default: {
|
|
|
1380
1443
|
MorphoAaveV3Payback?: undefined;
|
|
1381
1444
|
MorphoAaveV3Supply?: undefined;
|
|
1382
1445
|
MorphoAaveV3Withdraw?: undefined;
|
|
1446
|
+
MorphoAaveV3SetManager?: undefined;
|
|
1383
1447
|
SparkBorrow?: undefined;
|
|
1384
1448
|
SparkClaimRewards?: undefined;
|
|
1385
1449
|
SparkCollateralSwitch?: undefined;
|
|
@@ -1512,6 +1576,7 @@ declare const _default: {
|
|
|
1512
1576
|
UpdateSub?: undefined;
|
|
1513
1577
|
TransferNFT?: undefined;
|
|
1514
1578
|
CreateSub?: undefined;
|
|
1579
|
+
ApproveToken?: undefined;
|
|
1515
1580
|
SDaiWrap?: undefined;
|
|
1516
1581
|
SDaiUnwrap?: undefined;
|
|
1517
1582
|
McdGenerate?: undefined;
|
|
@@ -1538,8 +1603,14 @@ declare const _default: {
|
|
|
1538
1603
|
AaveWithdraw?: undefined;
|
|
1539
1604
|
AaveCollateralSwitch?: undefined;
|
|
1540
1605
|
AaveUnstake?: undefined;
|
|
1606
|
+
AaveClaimAAVE?: undefined;
|
|
1541
1607
|
AaveV3ClaimRewards?: undefined;
|
|
1542
1608
|
AaveV3View?: undefined;
|
|
1609
|
+
LSVWithdraw?: undefined;
|
|
1610
|
+
LSVBorrow?: undefined;
|
|
1611
|
+
LSVSupply?: undefined;
|
|
1612
|
+
LSVPayback?: undefined;
|
|
1613
|
+
LSVSell?: undefined;
|
|
1543
1614
|
MorphoAaveV2Borrow?: undefined;
|
|
1544
1615
|
MorphoAaveV2Payback?: undefined;
|
|
1545
1616
|
MorphoAaveV2Supply?: undefined;
|
|
@@ -1549,6 +1620,7 @@ declare const _default: {
|
|
|
1549
1620
|
MorphoAaveV3Payback?: undefined;
|
|
1550
1621
|
MorphoAaveV3Supply?: undefined;
|
|
1551
1622
|
MorphoAaveV3Withdraw?: undefined;
|
|
1623
|
+
MorphoAaveV3SetManager?: undefined;
|
|
1552
1624
|
SparkBorrow?: undefined;
|
|
1553
1625
|
SparkClaimRewards?: undefined;
|
|
1554
1626
|
SparkCollateralSwitch?: undefined;
|
|
@@ -1663,6 +1735,7 @@ declare const _default: {
|
|
|
1663
1735
|
UpdateSub: string;
|
|
1664
1736
|
TransferNFT: string;
|
|
1665
1737
|
CreateSub: string;
|
|
1738
|
+
ApproveToken: string;
|
|
1666
1739
|
SDaiWrap: string;
|
|
1667
1740
|
SDaiUnwrap: string;
|
|
1668
1741
|
TokenizedVaultAdapter: string;
|
|
@@ -1691,6 +1764,7 @@ declare const _default: {
|
|
|
1691
1764
|
AaveWithdraw: string;
|
|
1692
1765
|
AaveCollateralSwitch: string;
|
|
1693
1766
|
AaveUnstake: string;
|
|
1767
|
+
AaveClaimAAVE: string;
|
|
1694
1768
|
AaveV3Withdraw: string;
|
|
1695
1769
|
AaveV3SwapBorrowRateMode: string;
|
|
1696
1770
|
AaveV3Supply: string;
|
|
@@ -1701,6 +1775,11 @@ declare const _default: {
|
|
|
1701
1775
|
AaveV3Borrow: string;
|
|
1702
1776
|
AaveV3ATokenPayback: string;
|
|
1703
1777
|
AaveV3View: string;
|
|
1778
|
+
LSVWithdraw: string;
|
|
1779
|
+
LSVBorrow: string;
|
|
1780
|
+
LSVSupply: string;
|
|
1781
|
+
LSVPayback: string;
|
|
1782
|
+
LSVSell: string;
|
|
1704
1783
|
MorphoAaveV2Borrow: string;
|
|
1705
1784
|
MorphoAaveV2Payback: string;
|
|
1706
1785
|
MorphoAaveV2Supply: string;
|
|
@@ -1710,6 +1789,7 @@ declare const _default: {
|
|
|
1710
1789
|
MorphoAaveV3Payback: string;
|
|
1711
1790
|
MorphoAaveV3Supply: string;
|
|
1712
1791
|
MorphoAaveV3Withdraw: string;
|
|
1792
|
+
MorphoAaveV3SetManager: string;
|
|
1713
1793
|
SparkBorrow: string;
|
|
1714
1794
|
SparkClaimRewards: string;
|
|
1715
1795
|
SparkCollateralSwitch: string;
|
|
@@ -1856,6 +1936,7 @@ declare const _default: {
|
|
|
1856
1936
|
UpdateSub?: undefined;
|
|
1857
1937
|
TransferNFT?: undefined;
|
|
1858
1938
|
CreateSub?: undefined;
|
|
1939
|
+
ApproveToken?: undefined;
|
|
1859
1940
|
SDaiWrap?: undefined;
|
|
1860
1941
|
SDaiUnwrap?: undefined;
|
|
1861
1942
|
McdGenerate?: undefined;
|
|
@@ -1882,7 +1963,13 @@ declare const _default: {
|
|
|
1882
1963
|
AaveWithdraw?: undefined;
|
|
1883
1964
|
AaveCollateralSwitch?: undefined;
|
|
1884
1965
|
AaveUnstake?: undefined;
|
|
1966
|
+
AaveClaimAAVE?: undefined;
|
|
1885
1967
|
AaveV3View?: undefined;
|
|
1968
|
+
LSVWithdraw?: undefined;
|
|
1969
|
+
LSVBorrow?: undefined;
|
|
1970
|
+
LSVSupply?: undefined;
|
|
1971
|
+
LSVPayback?: undefined;
|
|
1972
|
+
LSVSell?: undefined;
|
|
1886
1973
|
MorphoAaveV2Borrow?: undefined;
|
|
1887
1974
|
MorphoAaveV2Payback?: undefined;
|
|
1888
1975
|
MorphoAaveV2Supply?: undefined;
|
|
@@ -1892,6 +1979,7 @@ declare const _default: {
|
|
|
1892
1979
|
MorphoAaveV3Payback?: undefined;
|
|
1893
1980
|
MorphoAaveV3Supply?: undefined;
|
|
1894
1981
|
MorphoAaveV3Withdraw?: undefined;
|
|
1982
|
+
MorphoAaveV3SetManager?: undefined;
|
|
1895
1983
|
SparkBorrow?: undefined;
|
|
1896
1984
|
SparkClaimRewards?: undefined;
|
|
1897
1985
|
SparkCollateralSwitch?: undefined;
|
|
@@ -2024,6 +2112,7 @@ declare const _default: {
|
|
|
2024
2112
|
UpdateSub?: undefined;
|
|
2025
2113
|
TransferNFT?: undefined;
|
|
2026
2114
|
CreateSub?: undefined;
|
|
2115
|
+
ApproveToken?: undefined;
|
|
2027
2116
|
SDaiWrap?: undefined;
|
|
2028
2117
|
SDaiUnwrap?: undefined;
|
|
2029
2118
|
McdGenerate?: undefined;
|
|
@@ -2050,8 +2139,14 @@ declare const _default: {
|
|
|
2050
2139
|
AaveWithdraw?: undefined;
|
|
2051
2140
|
AaveCollateralSwitch?: undefined;
|
|
2052
2141
|
AaveUnstake?: undefined;
|
|
2142
|
+
AaveClaimAAVE?: undefined;
|
|
2053
2143
|
AaveV3ClaimRewards?: undefined;
|
|
2054
2144
|
AaveV3View?: undefined;
|
|
2145
|
+
LSVWithdraw?: undefined;
|
|
2146
|
+
LSVBorrow?: undefined;
|
|
2147
|
+
LSVSupply?: undefined;
|
|
2148
|
+
LSVPayback?: undefined;
|
|
2149
|
+
LSVSell?: undefined;
|
|
2055
2150
|
MorphoAaveV2Borrow?: undefined;
|
|
2056
2151
|
MorphoAaveV2Payback?: undefined;
|
|
2057
2152
|
MorphoAaveV2Supply?: undefined;
|
|
@@ -2061,6 +2156,7 @@ declare const _default: {
|
|
|
2061
2156
|
MorphoAaveV3Payback?: undefined;
|
|
2062
2157
|
MorphoAaveV3Supply?: undefined;
|
|
2063
2158
|
MorphoAaveV3Withdraw?: undefined;
|
|
2159
|
+
MorphoAaveV3SetManager?: undefined;
|
|
2064
2160
|
SparkBorrow?: undefined;
|
|
2065
2161
|
SparkClaimRewards?: undefined;
|
|
2066
2162
|
SparkCollateralSwitch?: undefined;
|
package/esm/src/types.d.ts
CHANGED
|
@@ -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,23 +23,23 @@ 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
|
};
|
|
31
|
-
type EthAddress = string;
|
|
32
|
-
type bytes32 = string;
|
|
33
|
-
type bytes = string | Array<any>;
|
|
34
|
-
type uint256 = string;
|
|
35
|
-
type uint32 = string;
|
|
36
|
-
type uint160 = string;
|
|
37
|
-
type uint128 = string;
|
|
38
|
-
type uint80 = string;
|
|
39
|
-
type uint64 = string;
|
|
40
|
-
type uint24 = string;
|
|
41
|
-
type uint16 = string;
|
|
42
|
-
type uint8 = string;
|
|
43
|
-
type int256 = string;
|
|
44
|
-
type int24 = string;
|
|
31
|
+
declare type EthAddress = string;
|
|
32
|
+
declare type bytes32 = string;
|
|
33
|
+
declare type bytes = string | Array<any>;
|
|
34
|
+
declare type uint256 = string;
|
|
35
|
+
declare type uint32 = string;
|
|
36
|
+
declare type uint160 = string;
|
|
37
|
+
declare type uint128 = string;
|
|
38
|
+
declare type uint80 = string;
|
|
39
|
+
declare type uint64 = string;
|
|
40
|
+
declare type uint24 = string;
|
|
41
|
+
declare type uint16 = string;
|
|
42
|
+
declare type uint8 = string;
|
|
43
|
+
declare type int256 = string;
|
|
44
|
+
declare type int24 = string;
|
|
45
45
|
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
|
@@ -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
|
+
* AaveClaimAAVEAction - Claims AAVE from stkAave
|
|
8
|
+
*
|
|
9
|
+
* @category Aave
|
|
10
|
+
*/
|
|
11
|
+
export class AaveClaimAAVEAction extends Action {
|
|
12
|
+
/**
|
|
13
|
+
* @param amount - Amount to claim
|
|
14
|
+
* @param to - Address where claimed tokens will end up
|
|
15
|
+
*/
|
|
16
|
+
constructor(amount: uint256, to: EthAddress) {
|
|
17
|
+
requireAddress(to);
|
|
18
|
+
super(
|
|
19
|
+
'AaveClaimAAVE',
|
|
20
|
+
getAddr('AaveClaimAAVE'),
|
|
21
|
+
['uint256', 'address'],
|
|
22
|
+
[amount, to],
|
|
23
|
+
);
|
|
24
|
+
this.mappableArgs = [
|
|
25
|
+
this.args[1],
|
|
26
|
+
this.args[2],
|
|
27
|
+
];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -5,4 +5,5 @@ export * from './AaveWithdrawAction';
|
|
|
5
5
|
export * from './AaveClaimStkAaveAction';
|
|
6
6
|
export * from './AaveCollateralSwitchAction';
|
|
7
7
|
export * from './AaveFinalizeUnstakeAction';
|
|
8
|
-
export * from './AaveStartUnstakeAction';
|
|
8
|
+
export * from './AaveStartUnstakeAction';
|
|
9
|
+
export * from './AaveClaimAAVEAction';
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
this.mappableArgs = [
|
|
29
|
+
this.args[0],
|
|
30
|
+
this.args[1],
|
|
31
|
+
this.args[2],
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -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,6 +16,8 @@ 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';
|
|
19
21
|
export * from './SDaiWrapAction';
|
|
20
22
|
export * from './SDaiUnwrapAction';
|
|
21
23
|
export * from './TokenizedVaultAdapterDepositAction';
|
package/src/actions/index.ts
CHANGED
|
@@ -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
|
import * as curveusd from './curveusd';
|
|
27
28
|
import * as spark from './spark';
|
|
28
29
|
|
|
@@ -52,6 +53,7 @@ export {
|
|
|
52
53
|
compoundV3,
|
|
53
54
|
morpho,
|
|
54
55
|
bprotocol,
|
|
56
|
+
lsv,
|
|
55
57
|
spark,
|
|
56
58
|
curveusd,
|
|
57
59
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
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'), ['uint256', 'uint256'], [protocol, amount]);
|
|
17
|
+
this.mappableArgs = [
|
|
18
|
+
this.args[1],
|
|
19
|
+
];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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'), ['uint256', 'uint256'], [protocol, amount]);
|
|
16
|
+
this.mappableArgs = [
|
|
17
|
+
this.args[1],
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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'), ['uint256', 'address', 'uint256'], [protocol, token, amount]);
|
|
18
|
+
this.mappableArgs = [
|
|
19
|
+
this.args[1],
|
|
20
|
+
this.args[2],
|
|
21
|
+
];
|
|
22
|
+
}
|
|
23
|
+
}
|