@defisaver/sdk 1.0.62 → 1.0.63-dev-1

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 (71) hide show
  1. package/esm/src/Action.d.ts +2 -2
  2. package/esm/src/actions/basic/ExecuteSafeTxAction.d.ts +23 -0
  3. package/esm/src/actions/basic/ExecuteSafeTxAction.js +60 -0
  4. package/esm/src/actions/basic/LimitSellAction.d.ts +24 -0
  5. package/esm/src/actions/basic/LimitSellAction.js +63 -0
  6. package/esm/src/actions/basic/RemoveTokenApprovalAction.d.ts +15 -0
  7. package/esm/src/actions/basic/RemoveTokenApprovalAction.js +42 -0
  8. package/esm/src/actions/basic/index.d.ts +3 -0
  9. package/esm/src/actions/basic/index.js +3 -0
  10. package/esm/src/actions/flashloan/FLAction.js +3 -0
  11. package/esm/src/actions/flashloan/MorphoBlueFlashLoanAction.d.ts +16 -0
  12. package/esm/src/actions/flashloan/MorphoBlueFlashLoanAction.js +18 -0
  13. package/esm/src/actions/flashloan/MorphoBlueFlashLoanPaybackAction.d.ts +14 -0
  14. package/esm/src/actions/flashloan/MorphoBlueFlashLoanPaybackAction.js +16 -0
  15. package/esm/src/actions/flashloan/index.d.ts +2 -0
  16. package/esm/src/actions/flashloan/index.js +2 -0
  17. package/esm/src/actions/index.d.ts +2 -1
  18. package/esm/src/actions/index.js +2 -1
  19. package/esm/src/actions/maker/MakerGiveAction.d.ts +1 -2
  20. package/esm/src/actions/maker/MakerGiveAction.js +2 -3
  21. package/esm/src/actions/morpho-blue/MorphoBlueBorrowAction.d.ts +21 -0
  22. package/esm/src/actions/morpho-blue/MorphoBlueBorrowAction.js +46 -0
  23. package/esm/src/actions/morpho-blue/MorphoBluePaybackAction.d.ts +24 -0
  24. package/esm/src/actions/morpho-blue/MorphoBluePaybackAction.js +46 -0
  25. package/esm/src/actions/morpho-blue/MorphoBlueSetAuthAction.d.ts +12 -0
  26. package/esm/src/actions/morpho-blue/MorphoBlueSetAuthAction.js +18 -0
  27. package/esm/src/actions/morpho-blue/MorphoBlueSetAuthWithSigAction.d.ts +12 -0
  28. package/esm/src/actions/morpho-blue/MorphoBlueSetAuthWithSigAction.js +21 -0
  29. package/esm/src/actions/morpho-blue/MorphoBlueSupplyAction.d.ts +24 -0
  30. package/esm/src/actions/morpho-blue/MorphoBlueSupplyAction.js +46 -0
  31. package/esm/src/actions/morpho-blue/MorphoBlueSupplyCollateralAction.d.ts +24 -0
  32. package/esm/src/actions/morpho-blue/MorphoBlueSupplyCollateralAction.js +46 -0
  33. package/esm/src/actions/morpho-blue/MorphoBlueWithdrawAction.d.ts +21 -0
  34. package/esm/src/actions/morpho-blue/MorphoBlueWithdrawAction.js +46 -0
  35. package/esm/src/actions/morpho-blue/MorphoBlueWithdrawCollateralAction.d.ts +21 -0
  36. package/esm/src/actions/morpho-blue/MorphoBlueWithdrawCollateralAction.js +46 -0
  37. package/esm/src/actions/morpho-blue/index.d.ts +8 -0
  38. package/esm/src/actions/morpho-blue/index.js +8 -0
  39. package/esm/src/addresses.d.ts +36 -0
  40. package/esm/src/addresses.js +12 -3
  41. package/esm/src/index.d.ts +144 -0
  42. package/esm/src/triggers/OffchainPriceTrigger.d.ts +10 -0
  43. package/esm/src/triggers/OffchainPriceTrigger.js +12 -0
  44. package/esm/src/triggers/index.d.ts +1 -0
  45. package/esm/src/triggers/index.js +1 -0
  46. package/esm/src/types.d.ts +20 -20
  47. package/package.json +1 -1
  48. package/src/actions/basic/ExecuteSafeTxAction.ts +85 -0
  49. package/src/actions/basic/LimitSellAction.ts +63 -0
  50. package/src/actions/basic/RemoveTokenApprovalAction.ts +39 -0
  51. package/src/actions/basic/index.ts +3 -0
  52. package/src/actions/flashloan/FLAction.ts +3 -0
  53. package/src/actions/flashloan/MorphoBlueFlashLoanAction.ts +25 -0
  54. package/src/actions/flashloan/MorphoBlueFlashLoanPaybackAction.ts +18 -0
  55. package/src/actions/flashloan/index.ts +3 -1
  56. package/src/actions/index.ts +2 -0
  57. package/src/actions/maker/MakerGiveAction.ts +2 -3
  58. package/src/actions/morpho-blue/MorphoBlueBorrowAction.ts +54 -0
  59. package/src/actions/morpho-blue/MorphoBluePaybackAction.ts +54 -0
  60. package/src/actions/morpho-blue/MorphoBlueSetAuthAction.ts +25 -0
  61. package/src/actions/morpho-blue/MorphoBlueSetAuthWithSigAction.ts +39 -0
  62. package/src/actions/morpho-blue/MorphoBlueSupplyAction.ts +54 -0
  63. package/src/actions/morpho-blue/MorphoBlueSupplyCollateralAction.ts +54 -0
  64. package/src/actions/morpho-blue/MorphoBlueWithdrawAction.ts +54 -0
  65. package/src/actions/morpho-blue/MorphoBlueWithdrawCollateralAction.ts +54 -0
  66. package/src/actions/morpho-blue/index.ts +8 -0
  67. package/src/addresses.ts +13 -3
  68. package/src/triggers/OffchainPriceTrigger.ts +14 -0
  69. package/src/triggers/index.ts +2 -0
  70. package/umd/index.js +1703 -1086
  71. package/yarn-error.log +0 -3976
@@ -110,6 +110,7 @@ declare const actionAddressesAllChains: {
110
110
  FLAction: string;
111
111
  FLUniV3: string;
112
112
  FLGho: string;
113
+ FLMorphoBlue: string;
113
114
  UniSupply: string;
114
115
  UniWithdraw: string;
115
116
  UniCollectV3: string;
@@ -193,6 +194,14 @@ declare const actionAddressesAllChains: {
193
194
  CurveUsdGetDebt: string;
194
195
  CurveUsdCollRatioTrigger: string;
195
196
  CurveUsdCollRatioCheck: string;
197
+ MorphoBlueSupply: string;
198
+ MorphoBlueSupplyCollateral: string;
199
+ MorphoBlueWithdraw: string;
200
+ MorphoBlueWithdrawCollateral: string;
201
+ MorphoBlueBorrow: string;
202
+ MorphoBluePayback: string;
203
+ MorphoBlueSetAuth: string;
204
+ MorphoBlueSetAuthWithSig: string;
196
205
  AaveV3DelegateCredit?: undefined;
197
206
  AaveV3RatioTrigger?: undefined;
198
207
  GasFeeTakerL2?: undefined;
@@ -305,6 +314,7 @@ declare const actionAddressesAllChains: {
305
314
  FLSpark?: undefined;
306
315
  FLUniV3?: undefined;
307
316
  FLGho?: undefined;
317
+ FLMorphoBlue?: undefined;
308
318
  UniSupply?: undefined;
309
319
  UniWithdraw?: undefined;
310
320
  DyDxWithdraw?: undefined;
@@ -383,6 +393,14 @@ declare const actionAddressesAllChains: {
383
393
  CurveUsdGetDebt?: undefined;
384
394
  CurveUsdCollRatioTrigger?: undefined;
385
395
  CurveUsdCollRatioCheck?: undefined;
396
+ MorphoBlueSupply?: undefined;
397
+ MorphoBlueSupplyCollateral?: undefined;
398
+ MorphoBlueWithdraw?: undefined;
399
+ MorphoBlueWithdrawCollateral?: undefined;
400
+ MorphoBlueBorrow?: undefined;
401
+ MorphoBluePayback?: undefined;
402
+ MorphoBlueSetAuth?: undefined;
403
+ MorphoBlueSetAuthWithSig?: undefined;
386
404
  } | {
387
405
  DFSSell: string;
388
406
  WrapEth: string;
@@ -496,6 +514,7 @@ declare const actionAddressesAllChains: {
496
514
  FLSpark?: undefined;
497
515
  FLUniV3?: undefined;
498
516
  FLGho?: undefined;
517
+ FLMorphoBlue?: undefined;
499
518
  UniSupply?: undefined;
500
519
  UniWithdraw?: undefined;
501
520
  DyDxWithdraw?: undefined;
@@ -567,6 +586,14 @@ declare const actionAddressesAllChains: {
567
586
  CurveUsdGetDebt?: undefined;
568
587
  CurveUsdCollRatioTrigger?: undefined;
569
588
  CurveUsdCollRatioCheck?: undefined;
589
+ MorphoBlueSupply?: undefined;
590
+ MorphoBlueSupplyCollateral?: undefined;
591
+ MorphoBlueWithdraw?: undefined;
592
+ MorphoBlueWithdrawCollateral?: undefined;
593
+ MorphoBlueBorrow?: undefined;
594
+ MorphoBluePayback?: undefined;
595
+ MorphoBlueSetAuth?: undefined;
596
+ MorphoBlueSetAuthWithSig?: undefined;
570
597
  AaveV3DelegateCredit?: undefined;
571
598
  AaveV3RatioTrigger?: undefined;
572
599
  } | {
@@ -675,6 +702,7 @@ declare const actionAddressesAllChains: {
675
702
  FLSpark?: undefined;
676
703
  FLAction?: undefined;
677
704
  FLGho?: undefined;
705
+ FLMorphoBlue?: undefined;
678
706
  UniSupply?: undefined;
679
707
  UniWithdraw?: undefined;
680
708
  UniCollectV3?: undefined;
@@ -751,6 +779,14 @@ declare const actionAddressesAllChains: {
751
779
  CurveUsdGetDebt?: undefined;
752
780
  CurveUsdCollRatioTrigger?: undefined;
753
781
  CurveUsdCollRatioCheck?: undefined;
782
+ MorphoBlueSupply?: undefined;
783
+ MorphoBlueSupplyCollateral?: undefined;
784
+ MorphoBlueWithdraw?: undefined;
785
+ MorphoBlueWithdrawCollateral?: undefined;
786
+ MorphoBlueBorrow?: undefined;
787
+ MorphoBluePayback?: undefined;
788
+ MorphoBlueSetAuth?: undefined;
789
+ MorphoBlueSetAuthWithSig?: undefined;
754
790
  AaveV3DelegateCredit?: undefined;
755
791
  AaveV3RatioTrigger?: undefined;
756
792
  GasFeeTakerL2?: undefined;
@@ -856,6 +892,7 @@ declare const actionAddresses: (chainId?: null) => {
856
892
  FLAction: string;
857
893
  FLUniV3: string;
858
894
  FLGho: string;
895
+ FLMorphoBlue: string;
859
896
  UniSupply: string;
860
897
  UniWithdraw: string;
861
898
  UniCollectV3: string;
@@ -939,6 +976,14 @@ declare const actionAddresses: (chainId?: null) => {
939
976
  CurveUsdGetDebt: string;
940
977
  CurveUsdCollRatioTrigger: string;
941
978
  CurveUsdCollRatioCheck: string;
979
+ MorphoBlueSupply: string;
980
+ MorphoBlueSupplyCollateral: string;
981
+ MorphoBlueWithdraw: string;
982
+ MorphoBlueWithdrawCollateral: string;
983
+ MorphoBlueBorrow: string;
984
+ MorphoBluePayback: string;
985
+ MorphoBlueSetAuth: string;
986
+ MorphoBlueSetAuthWithSig: string;
942
987
  AaveV3DelegateCredit?: undefined;
943
988
  AaveV3RatioTrigger?: undefined;
944
989
  GasFeeTakerL2?: undefined;
@@ -1051,6 +1096,7 @@ declare const actionAddresses: (chainId?: null) => {
1051
1096
  FLSpark?: undefined;
1052
1097
  FLUniV3?: undefined;
1053
1098
  FLGho?: undefined;
1099
+ FLMorphoBlue?: undefined;
1054
1100
  UniSupply?: undefined;
1055
1101
  UniWithdraw?: undefined;
1056
1102
  DyDxWithdraw?: undefined;
@@ -1129,6 +1175,14 @@ declare const actionAddresses: (chainId?: null) => {
1129
1175
  CurveUsdGetDebt?: undefined;
1130
1176
  CurveUsdCollRatioTrigger?: undefined;
1131
1177
  CurveUsdCollRatioCheck?: undefined;
1178
+ MorphoBlueSupply?: undefined;
1179
+ MorphoBlueSupplyCollateral?: undefined;
1180
+ MorphoBlueWithdraw?: undefined;
1181
+ MorphoBlueWithdrawCollateral?: undefined;
1182
+ MorphoBlueBorrow?: undefined;
1183
+ MorphoBluePayback?: undefined;
1184
+ MorphoBlueSetAuth?: undefined;
1185
+ MorphoBlueSetAuthWithSig?: undefined;
1132
1186
  } | {
1133
1187
  DFSSell: string;
1134
1188
  WrapEth: string;
@@ -1242,6 +1296,7 @@ declare const actionAddresses: (chainId?: null) => {
1242
1296
  FLSpark?: undefined;
1243
1297
  FLUniV3?: undefined;
1244
1298
  FLGho?: undefined;
1299
+ FLMorphoBlue?: undefined;
1245
1300
  UniSupply?: undefined;
1246
1301
  UniWithdraw?: undefined;
1247
1302
  DyDxWithdraw?: undefined;
@@ -1313,6 +1368,14 @@ declare const actionAddresses: (chainId?: null) => {
1313
1368
  CurveUsdGetDebt?: undefined;
1314
1369
  CurveUsdCollRatioTrigger?: undefined;
1315
1370
  CurveUsdCollRatioCheck?: undefined;
1371
+ MorphoBlueSupply?: undefined;
1372
+ MorphoBlueSupplyCollateral?: undefined;
1373
+ MorphoBlueWithdraw?: undefined;
1374
+ MorphoBlueWithdrawCollateral?: undefined;
1375
+ MorphoBlueBorrow?: undefined;
1376
+ MorphoBluePayback?: undefined;
1377
+ MorphoBlueSetAuth?: undefined;
1378
+ MorphoBlueSetAuthWithSig?: undefined;
1316
1379
  AaveV3DelegateCredit?: undefined;
1317
1380
  AaveV3RatioTrigger?: undefined;
1318
1381
  } | {
@@ -1421,6 +1484,7 @@ declare const actionAddresses: (chainId?: null) => {
1421
1484
  FLSpark?: undefined;
1422
1485
  FLAction?: undefined;
1423
1486
  FLGho?: undefined;
1487
+ FLMorphoBlue?: undefined;
1424
1488
  UniSupply?: undefined;
1425
1489
  UniWithdraw?: undefined;
1426
1490
  UniCollectV3?: undefined;
@@ -1497,6 +1561,14 @@ declare const actionAddresses: (chainId?: null) => {
1497
1561
  CurveUsdGetDebt?: undefined;
1498
1562
  CurveUsdCollRatioTrigger?: undefined;
1499
1563
  CurveUsdCollRatioCheck?: undefined;
1564
+ MorphoBlueSupply?: undefined;
1565
+ MorphoBlueSupplyCollateral?: undefined;
1566
+ MorphoBlueWithdraw?: undefined;
1567
+ MorphoBlueWithdrawCollateral?: undefined;
1568
+ MorphoBlueBorrow?: undefined;
1569
+ MorphoBluePayback?: undefined;
1570
+ MorphoBlueSetAuth?: undefined;
1571
+ MorphoBlueSetAuthWithSig?: undefined;
1500
1572
  AaveV3DelegateCredit?: undefined;
1501
1573
  AaveV3RatioTrigger?: undefined;
1502
1574
  GasFeeTakerL2?: undefined;
@@ -1745,6 +1817,7 @@ declare const _default: {
1745
1817
  FLAction: string;
1746
1818
  FLUniV3: string;
1747
1819
  FLGho: string;
1820
+ FLMorphoBlue: string;
1748
1821
  UniSupply: string;
1749
1822
  UniWithdraw: string;
1750
1823
  UniCollectV3: string;
@@ -1828,6 +1901,14 @@ declare const _default: {
1828
1901
  CurveUsdGetDebt: string;
1829
1902
  CurveUsdCollRatioTrigger: string;
1830
1903
  CurveUsdCollRatioCheck: string;
1904
+ MorphoBlueSupply: string;
1905
+ MorphoBlueSupplyCollateral: string;
1906
+ MorphoBlueWithdraw: string;
1907
+ MorphoBlueWithdrawCollateral: string;
1908
+ MorphoBlueBorrow: string;
1909
+ MorphoBluePayback: string;
1910
+ MorphoBlueSetAuth: string;
1911
+ MorphoBlueSetAuthWithSig: string;
1831
1912
  AaveV3DelegateCredit?: undefined;
1832
1913
  AaveV3RatioTrigger?: undefined;
1833
1914
  GasFeeTakerL2?: undefined;
@@ -1940,6 +2021,7 @@ declare const _default: {
1940
2021
  FLSpark?: undefined;
1941
2022
  FLUniV3?: undefined;
1942
2023
  FLGho?: undefined;
2024
+ FLMorphoBlue?: undefined;
1943
2025
  UniSupply?: undefined;
1944
2026
  UniWithdraw?: undefined;
1945
2027
  DyDxWithdraw?: undefined;
@@ -2018,6 +2100,14 @@ declare const _default: {
2018
2100
  CurveUsdGetDebt?: undefined;
2019
2101
  CurveUsdCollRatioTrigger?: undefined;
2020
2102
  CurveUsdCollRatioCheck?: undefined;
2103
+ MorphoBlueSupply?: undefined;
2104
+ MorphoBlueSupplyCollateral?: undefined;
2105
+ MorphoBlueWithdraw?: undefined;
2106
+ MorphoBlueWithdrawCollateral?: undefined;
2107
+ MorphoBlueBorrow?: undefined;
2108
+ MorphoBluePayback?: undefined;
2109
+ MorphoBlueSetAuth?: undefined;
2110
+ MorphoBlueSetAuthWithSig?: undefined;
2021
2111
  } | {
2022
2112
  DFSSell: string;
2023
2113
  WrapEth: string;
@@ -2131,6 +2221,7 @@ declare const _default: {
2131
2221
  FLSpark?: undefined;
2132
2222
  FLUniV3?: undefined;
2133
2223
  FLGho?: undefined;
2224
+ FLMorphoBlue?: undefined;
2134
2225
  UniSupply?: undefined;
2135
2226
  UniWithdraw?: undefined;
2136
2227
  DyDxWithdraw?: undefined;
@@ -2202,6 +2293,14 @@ declare const _default: {
2202
2293
  CurveUsdGetDebt?: undefined;
2203
2294
  CurveUsdCollRatioTrigger?: undefined;
2204
2295
  CurveUsdCollRatioCheck?: undefined;
2296
+ MorphoBlueSupply?: undefined;
2297
+ MorphoBlueSupplyCollateral?: undefined;
2298
+ MorphoBlueWithdraw?: undefined;
2299
+ MorphoBlueWithdrawCollateral?: undefined;
2300
+ MorphoBlueBorrow?: undefined;
2301
+ MorphoBluePayback?: undefined;
2302
+ MorphoBlueSetAuth?: undefined;
2303
+ MorphoBlueSetAuthWithSig?: undefined;
2205
2304
  AaveV3DelegateCredit?: undefined;
2206
2305
  AaveV3RatioTrigger?: undefined;
2207
2306
  } | {
@@ -2310,6 +2409,7 @@ declare const _default: {
2310
2409
  FLSpark?: undefined;
2311
2410
  FLAction?: undefined;
2312
2411
  FLGho?: undefined;
2412
+ FLMorphoBlue?: undefined;
2313
2413
  UniSupply?: undefined;
2314
2414
  UniWithdraw?: undefined;
2315
2415
  UniCollectV3?: undefined;
@@ -2386,6 +2486,14 @@ declare const _default: {
2386
2486
  CurveUsdGetDebt?: undefined;
2387
2487
  CurveUsdCollRatioTrigger?: undefined;
2388
2488
  CurveUsdCollRatioCheck?: undefined;
2489
+ MorphoBlueSupply?: undefined;
2490
+ MorphoBlueSupplyCollateral?: undefined;
2491
+ MorphoBlueWithdraw?: undefined;
2492
+ MorphoBlueWithdrawCollateral?: undefined;
2493
+ MorphoBlueBorrow?: undefined;
2494
+ MorphoBluePayback?: undefined;
2495
+ MorphoBlueSetAuth?: undefined;
2496
+ MorphoBlueSetAuthWithSig?: undefined;
2389
2497
  AaveV3DelegateCredit?: undefined;
2390
2498
  AaveV3RatioTrigger?: undefined;
2391
2499
  GasFeeTakerL2?: undefined;
@@ -2491,6 +2599,7 @@ declare const _default: {
2491
2599
  FLAction: string;
2492
2600
  FLUniV3: string;
2493
2601
  FLGho: string;
2602
+ FLMorphoBlue: string;
2494
2603
  UniSupply: string;
2495
2604
  UniWithdraw: string;
2496
2605
  UniCollectV3: string;
@@ -2574,6 +2683,14 @@ declare const _default: {
2574
2683
  CurveUsdGetDebt: string;
2575
2684
  CurveUsdCollRatioTrigger: string;
2576
2685
  CurveUsdCollRatioCheck: string;
2686
+ MorphoBlueSupply: string;
2687
+ MorphoBlueSupplyCollateral: string;
2688
+ MorphoBlueWithdraw: string;
2689
+ MorphoBlueWithdrawCollateral: string;
2690
+ MorphoBlueBorrow: string;
2691
+ MorphoBluePayback: string;
2692
+ MorphoBlueSetAuth: string;
2693
+ MorphoBlueSetAuthWithSig: string;
2577
2694
  AaveV3DelegateCredit?: undefined;
2578
2695
  AaveV3RatioTrigger?: undefined;
2579
2696
  GasFeeTakerL2?: undefined;
@@ -2686,6 +2803,7 @@ declare const _default: {
2686
2803
  FLSpark?: undefined;
2687
2804
  FLUniV3?: undefined;
2688
2805
  FLGho?: undefined;
2806
+ FLMorphoBlue?: undefined;
2689
2807
  UniSupply?: undefined;
2690
2808
  UniWithdraw?: undefined;
2691
2809
  DyDxWithdraw?: undefined;
@@ -2764,6 +2882,14 @@ declare const _default: {
2764
2882
  CurveUsdGetDebt?: undefined;
2765
2883
  CurveUsdCollRatioTrigger?: undefined;
2766
2884
  CurveUsdCollRatioCheck?: undefined;
2885
+ MorphoBlueSupply?: undefined;
2886
+ MorphoBlueSupplyCollateral?: undefined;
2887
+ MorphoBlueWithdraw?: undefined;
2888
+ MorphoBlueWithdrawCollateral?: undefined;
2889
+ MorphoBlueBorrow?: undefined;
2890
+ MorphoBluePayback?: undefined;
2891
+ MorphoBlueSetAuth?: undefined;
2892
+ MorphoBlueSetAuthWithSig?: undefined;
2767
2893
  } | {
2768
2894
  DFSSell: string;
2769
2895
  WrapEth: string;
@@ -2877,6 +3003,7 @@ declare const _default: {
2877
3003
  FLSpark?: undefined;
2878
3004
  FLUniV3?: undefined;
2879
3005
  FLGho?: undefined;
3006
+ FLMorphoBlue?: undefined;
2880
3007
  UniSupply?: undefined;
2881
3008
  UniWithdraw?: undefined;
2882
3009
  DyDxWithdraw?: undefined;
@@ -2948,6 +3075,14 @@ declare const _default: {
2948
3075
  CurveUsdGetDebt?: undefined;
2949
3076
  CurveUsdCollRatioTrigger?: undefined;
2950
3077
  CurveUsdCollRatioCheck?: undefined;
3078
+ MorphoBlueSupply?: undefined;
3079
+ MorphoBlueSupplyCollateral?: undefined;
3080
+ MorphoBlueWithdraw?: undefined;
3081
+ MorphoBlueWithdrawCollateral?: undefined;
3082
+ MorphoBlueBorrow?: undefined;
3083
+ MorphoBluePayback?: undefined;
3084
+ MorphoBlueSetAuth?: undefined;
3085
+ MorphoBlueSetAuthWithSig?: undefined;
2951
3086
  AaveV3DelegateCredit?: undefined;
2952
3087
  AaveV3RatioTrigger?: undefined;
2953
3088
  } | {
@@ -3056,6 +3191,7 @@ declare const _default: {
3056
3191
  FLSpark?: undefined;
3057
3192
  FLAction?: undefined;
3058
3193
  FLGho?: undefined;
3194
+ FLMorphoBlue?: undefined;
3059
3195
  UniSupply?: undefined;
3060
3196
  UniWithdraw?: undefined;
3061
3197
  UniCollectV3?: undefined;
@@ -3132,6 +3268,14 @@ declare const _default: {
3132
3268
  CurveUsdGetDebt?: undefined;
3133
3269
  CurveUsdCollRatioTrigger?: undefined;
3134
3270
  CurveUsdCollRatioCheck?: undefined;
3271
+ MorphoBlueSupply?: undefined;
3272
+ MorphoBlueSupplyCollateral?: undefined;
3273
+ MorphoBlueWithdraw?: undefined;
3274
+ MorphoBlueWithdrawCollateral?: undefined;
3275
+ MorphoBlueBorrow?: undefined;
3276
+ MorphoBluePayback?: undefined;
3277
+ MorphoBlueSetAuth?: undefined;
3278
+ MorphoBlueSetAuthWithSig?: undefined;
3135
3279
  AaveV3DelegateCredit?: undefined;
3136
3280
  AaveV3RatioTrigger?: undefined;
3137
3281
  GasFeeTakerL2?: undefined;
@@ -0,0 +1,10 @@
1
+ import { Action } from '../Action';
2
+ import { uint256, uint8 } from '../types';
3
+ /**
4
+ *
5
+ *
6
+ * @category Triggers
7
+ */
8
+ export declare class OffchainPriceTrigger extends Action {
9
+ constructor(limitPrice: uint256, limitType: uint8);
10
+ }
@@ -0,0 +1,12 @@
1
+ import { Action } from '../Action';
2
+ import { getAddr } from '../addresses';
3
+ /**
4
+ *
5
+ *
6
+ * @category Triggers
7
+ */
8
+ export class OffchainPriceTrigger extends Action {
9
+ constructor(limitPrice, limitType) {
10
+ super('OffchainPriceTrigger', getAddr('OffchainPriceTrigger'), ['uint256', 'uint8'], [limitPrice, limitType]);
11
+ }
12
+ }
@@ -17,3 +17,4 @@ export * from './SparkRatioTrigger';
17
17
  export * from './SparkQuotePriceTrigger';
18
18
  export * from './LiquityDebtInFrontWithLimitTrigger';
19
19
  export * from './CurveUsdCollRatioTrigger';
20
+ export * from './OffchainPriceTrigger';
@@ -17,3 +17,4 @@ export * from './SparkRatioTrigger';
17
17
  export * from './SparkQuotePriceTrigger';
18
18
  export * from './LiquityDebtInFrontWithLimitTrigger';
19
19
  export * from './CurveUsdCollRatioTrigger';
20
+ export * from './OffchainPriceTrigger';
@@ -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.0.62",
3
+ "version": "1.0.63-dev-1",
4
4
  "description": "",
5
5
  "main": "./umd/index.js",
6
6
  "module": "./esm/src/index.js",
@@ -0,0 +1,85 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ import {
4
+ EthAddress,
5
+ bytes,
6
+ uint256,
7
+ uint8,
8
+ } from '../../types';
9
+
10
+ /**
11
+ * ExecuteSafeTxAction - Execute Safe transaction
12
+ *
13
+ * @category BasicActions
14
+ */
15
+ export class ExecuteSafeTxAction extends Action {
16
+ /**
17
+ * @param safe Address of the Safe wallet
18
+ * @param to Destination address of Safe transaction
19
+ * @param value Ether value of Safe transaction
20
+ * @param data Data payload of Safe transaction
21
+ * @param operation Operation type of Safe transaction. 0 = call, 1 = delegateCall
22
+ * @param safeTxGas Gas that should be used for the Safe transaction
23
+ * @param baseGas Gas costs that are independent of the transaction execution(e.g. base transaction fee, signature check, payment of the refund)
24
+ * @param gasPrice Gas price that should be used for the payment calculation
25
+ * @param gasToken Token address (or 0 if ETH) that is used for the payment
26
+ * @param refundReceiver Address of receiver of gas payment (or 0 if tx.origin
27
+ * @param signatures Packed signature data ({bytes32 r}{bytes32 s}{uint8 v})
28
+ */
29
+ constructor(
30
+ safe: EthAddress,
31
+ to: EthAddress,
32
+ value: uint256,
33
+ data: bytes,
34
+ operation: uint8,
35
+ safeTxGas: uint256,
36
+ baseGas: uint256,
37
+ gasPrice: uint256,
38
+ gasToken: EthAddress,
39
+ refundReceiver: EthAddress,
40
+ signatures: bytes,
41
+ ) {
42
+ super(
43
+ 'ExecuteSafeTx',
44
+ getAddr('ExecuteSafeTx'),
45
+ [
46
+ 'address',
47
+ 'address',
48
+ 'uint256',
49
+ 'bytes',
50
+ 'uint8',
51
+ 'uint256',
52
+ 'uint256',
53
+ 'uint256',
54
+ 'address',
55
+ 'address',
56
+ 'bytes',
57
+ ],
58
+ [
59
+ safe,
60
+ to,
61
+ value,
62
+ data,
63
+ operation,
64
+ safeTxGas,
65
+ baseGas,
66
+ gasPrice,
67
+ gasToken,
68
+ refundReceiver,
69
+ signatures,
70
+ ],
71
+ );
72
+
73
+ this.mappableArgs = [
74
+ this.args[0],
75
+ this.args[1],
76
+ this.args[2],
77
+ this.args[4],
78
+ this.args[5],
79
+ this.args[6],
80
+ this.args[7],
81
+ this.args[8],
82
+ this.args[9],
83
+ ];
84
+ }
85
+ }
@@ -0,0 +1,63 @@
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, uint256 } from '../../types';
8
+
9
+ /**
10
+ * Limit sell action used as part of the LimitSell Strategy
11
+ *
12
+ * @category BasicActions
13
+ */
14
+ export class LimitSellAction 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 gasUsed Amount of gas spent as part of the strategy
22
+ * @param protocolFee 0x fee (amount of ETH in Wei)
23
+ */
24
+ constructor(exchangeOrder:Array<any>, from:EthAddress, to:EthAddress, gasUsed: uint256, protocolFee = '0') {
25
+ requireAddress(to);
26
+ super(
27
+ 'LimitSell',
28
+ getAddr('LimitSell'),
29
+ [
30
+ ['address', 'address', 'uint256', 'uint256', 'uint256', 'uint256', 'address', 'address', 'bytes', ['address', 'address', 'address', 'uint256', 'uint256', 'bytes']],
31
+ 'address',
32
+ 'address',
33
+ 'uint256',
34
+ ],
35
+ [exchangeOrder, from, to, gasUsed],
36
+ );
37
+
38
+ this.protocolFee = protocolFee;
39
+
40
+ this.mappableArgs = [
41
+ this.args[0][0],
42
+ this.args[0][1],
43
+ this.args[0][2],
44
+ this.args[1],
45
+ this.args[2],
46
+ ];
47
+ }
48
+
49
+ encodeInputs() {
50
+ const executeActionDirectAbi: any = (ActionAbi.find(({ name }) => name === 'executeActionDirect'))!;
51
+ return AbiCoder.encodeFunctionCall(executeActionDirectAbi, this._encodeForCall());
52
+ }
53
+
54
+ async getAssetsToApprove() {
55
+ const asset = getAssetInfoByAddress(this.args[0][0]);
56
+ if (asset.symbol !== 'ETH') return [{ asset: this.args[0][0], owner: this.args[1] }];
57
+ return [];
58
+ }
59
+
60
+ async getEthValue() {
61
+ return this.protocolFee || '0';
62
+ }
63
+ }
@@ -0,0 +1,39 @@
1
+ import { requireAddress } from '../../utils/general';
2
+ import { Action } from '../../Action';
3
+ import { getAddr } from '../../addresses';
4
+ import { EthAddress, uint256 } from '../../types';
5
+
6
+ /**
7
+ * Remove approval for a spender to pull tokens from user wallet
8
+ *
9
+ * @category BasicActions
10
+ */
11
+ export class RemoveTokenApprovalAction extends Action {
12
+ /**
13
+ * @param token Token address
14
+ * @param spender Spender address
15
+ */
16
+ constructor(token:EthAddress, spender:EthAddress) {
17
+ requireAddress(spender);
18
+ super(
19
+ 'RemoveTokenApproval',
20
+ getAddr('RemoveTokenApproval'),
21
+ [
22
+ 'address',
23
+ 'address',
24
+ ],
25
+ [
26
+ token,
27
+ spender,
28
+ ],
29
+ );
30
+ this.mappableArgs = [
31
+ this.args[0],
32
+ this.args[1],
33
+ ];
34
+ }
35
+
36
+ async getAssetsToApprove() {
37
+ return [];
38
+ }
39
+ }
@@ -24,3 +24,6 @@ export * from './TokenizedVaultAdapterDepositAction';
24
24
  export * from './TokenizedVaultAdapterMintAction';
25
25
  export * from './TokenizedVaultAdapterRedeemAction';
26
26
  export * from './TokenizedVaultAdapterWithdrawAction';
27
+ export * from './LimitSellAction';
28
+ export * from './ExecuteSafeTxAction';
29
+ export * from './RemoveTokenApprovalAction';
@@ -41,6 +41,9 @@ export class FLAction extends Action {
41
41
  if (specificFLAction.constructor.name === 'SparkFlashLoanAction') {
42
42
  argsToReturn[5] = [7];
43
43
  }
44
+ if (specificFLAction.constructor.name === 'MorphoBlueFlashLoanAction') {
45
+ argsToReturn[5] = [8];
46
+ }
44
47
  return argsToReturn;
45
48
  }
46
49