@defisaver/sdk 1.3.23 → 1.3.24-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/actions/aaveV3/AaveV3DelegateCredit.d.ts +1 -1
- package/esm/src/actions/aaveV3/AaveV3DelegateCredit.js +1 -1
- package/esm/src/actions/basic/LimitSellAction.js +1 -1
- package/esm/src/actions/basic/LimitSellActionL2.d.ts +25 -0
- package/esm/src/actions/basic/LimitSellActionL2.js +65 -0
- package/esm/src/actions/basic/index.d.ts +1 -0
- package/esm/src/actions/basic/index.js +1 -0
- package/esm/src/actions/flashloan/AaveV3FlashLoanAction.d.ts +1 -1
- package/esm/src/actions/flashloan/AaveV3FlashLoanAction.js +1 -1
- package/esm/src/actions/flashloan/AaveV3FlashLoanCarryDebtAction.d.ts +2 -4
- package/esm/src/actions/flashloan/AaveV3FlashLoanCarryDebtAction.js +6 -12
- package/esm/src/actions/flashloan/AaveV3FlashLoanNoFeeAction.d.ts +1 -1
- package/esm/src/actions/flashloan/AaveV3FlashLoanNoFeeAction.js +1 -1
- package/esm/src/actions/flashloan/BalancerV3FlashLoanAction.d.ts +18 -0
- package/esm/src/actions/flashloan/BalancerV3FlashLoanAction.js +35 -0
- package/esm/src/actions/flashloan/SparkFlashLoanAction.d.ts +1 -1
- package/esm/src/actions/flashloan/SparkFlashLoanAction.js +1 -1
- package/esm/src/actions/flashloan/index.d.ts +1 -0
- package/esm/src/actions/flashloan/index.js +1 -0
- package/esm/src/addresses.d.ts +8 -8
- package/esm/src/addresses.js +18 -10
- package/esm/src/index.d.ts +32 -32
- package/package.json +1 -1
- package/src/actions/aaveV3/AaveV3DelegateCredit.ts +1 -1
- package/src/actions/basic/LimitSellAction.ts +1 -1
- package/src/actions/basic/LimitSellActionL2.ts +65 -0
- package/src/actions/basic/index.ts +1 -0
- package/src/actions/flashloan/AaveV3FlashLoanAction.ts +1 -1
- package/src/actions/flashloan/AaveV3FlashLoanCarryDebtAction.ts +7 -13
- package/src/actions/flashloan/AaveV3FlashLoanNoFeeAction.ts +1 -1
- package/src/actions/flashloan/BalancerV3FlashLoanAction.ts +49 -0
- package/src/actions/flashloan/SparkFlashLoanAction.ts +1 -1
- package/src/actions/flashloan/index.ts +1 -0
- package/src/addresses.ts +18 -10
- package/umd/index.js +937 -817
package/esm/src/index.d.ts
CHANGED
|
@@ -83,6 +83,7 @@ declare const actionAddressesAllChains: {
|
|
|
83
83
|
AaveV3ATokenPayback: string;
|
|
84
84
|
AaveV3View: string;
|
|
85
85
|
AaveV3DelegateWithSig: string;
|
|
86
|
+
AaveV3DelegateCredit: string;
|
|
86
87
|
GhoClaimAAVE: string;
|
|
87
88
|
GhoUnstake: string;
|
|
88
89
|
GhoStake: string;
|
|
@@ -298,7 +299,6 @@ declare const actionAddressesAllChains: {
|
|
|
298
299
|
AaveV4DelegateWithdrawWithSig: string;
|
|
299
300
|
AaveV4DelegateBorrowWithSig: string;
|
|
300
301
|
AaveV4DelegateSetUsingAsCollateralWithSig: string;
|
|
301
|
-
AaveV3DelegateCredit?: undefined;
|
|
302
302
|
AaveV3RatioTrigger?: undefined;
|
|
303
303
|
GasFeeTakerL2?: undefined;
|
|
304
304
|
AaveV3RatioCheck?: undefined;
|
|
@@ -339,6 +339,7 @@ declare const actionAddressesAllChains: {
|
|
|
339
339
|
FLAaveV3: string;
|
|
340
340
|
FLBalancer: string;
|
|
341
341
|
FLAction: string;
|
|
342
|
+
FLAaveV3CarryDebt: string;
|
|
342
343
|
AaveV3RatioTrigger: string;
|
|
343
344
|
GasFeeTakerL2: string;
|
|
344
345
|
AaveV3RatioCheck: string;
|
|
@@ -437,7 +438,6 @@ declare const actionAddressesAllChains: {
|
|
|
437
438
|
CompGetDebt?: undefined;
|
|
438
439
|
CompCollateralSwitch?: undefined;
|
|
439
440
|
FLAaveV2?: undefined;
|
|
440
|
-
FLAaveV3CarryDebt?: undefined;
|
|
441
441
|
FLDyDx?: undefined;
|
|
442
442
|
FLMaker?: undefined;
|
|
443
443
|
FLSpark?: undefined;
|
|
@@ -627,6 +627,7 @@ declare const actionAddressesAllChains: {
|
|
|
627
627
|
AaveV3Withdraw: string;
|
|
628
628
|
AaveV3ClaimRewards: string;
|
|
629
629
|
AaveV3DelegateWithSig: string;
|
|
630
|
+
AaveV3DelegateCredit: string;
|
|
630
631
|
CompV3Allow: string;
|
|
631
632
|
CompV3Borrow: string;
|
|
632
633
|
CompV3Claim: string;
|
|
@@ -640,6 +641,7 @@ declare const actionAddressesAllChains: {
|
|
|
640
641
|
FLUniV3: string;
|
|
641
642
|
FLAction: string;
|
|
642
643
|
FLMorphoBlue: string;
|
|
644
|
+
FLAaveV3CarryDebt: string;
|
|
643
645
|
GasFeeTakerL2: string;
|
|
644
646
|
AaveV3RatioCheck: string;
|
|
645
647
|
UniCollectV3: string;
|
|
@@ -763,7 +765,6 @@ declare const actionAddressesAllChains: {
|
|
|
763
765
|
CompGetDebt?: undefined;
|
|
764
766
|
CompCollateralSwitch?: undefined;
|
|
765
767
|
FLAaveV2?: undefined;
|
|
766
|
-
FLAaveV3CarryDebt?: undefined;
|
|
767
768
|
FLDyDx?: undefined;
|
|
768
769
|
FLMaker?: undefined;
|
|
769
770
|
FLSpark?: undefined;
|
|
@@ -885,7 +886,6 @@ declare const actionAddressesAllChains: {
|
|
|
885
886
|
AaveV4DelegateWithdrawWithSig?: undefined;
|
|
886
887
|
AaveV4DelegateBorrowWithSig?: undefined;
|
|
887
888
|
AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
|
|
888
|
-
AaveV3DelegateCredit?: undefined;
|
|
889
889
|
AaveV3RatioTrigger?: undefined;
|
|
890
890
|
} | {
|
|
891
891
|
DFSSell: string;
|
|
@@ -913,6 +913,7 @@ declare const actionAddressesAllChains: {
|
|
|
913
913
|
FLUniV3: string;
|
|
914
914
|
FLAction: string;
|
|
915
915
|
FLMorphoBlue: string;
|
|
916
|
+
FLAaveV3CarryDebt: string;
|
|
916
917
|
AaveV3Withdraw: string;
|
|
917
918
|
AaveV3SwapBorrowRateMode: string;
|
|
918
919
|
AaveV3Supply: string;
|
|
@@ -924,6 +925,7 @@ declare const actionAddressesAllChains: {
|
|
|
924
925
|
AaveV3ATokenPayback: string;
|
|
925
926
|
AaveV3View: string;
|
|
926
927
|
AaveV3DelegateWithSig: string;
|
|
928
|
+
AaveV3DelegateCredit: string;
|
|
927
929
|
CompV3Allow: string;
|
|
928
930
|
CompV3Borrow: string;
|
|
929
931
|
CompV3Claim: string;
|
|
@@ -1038,7 +1040,6 @@ declare const actionAddressesAllChains: {
|
|
|
1038
1040
|
CompCollateralSwitch?: undefined;
|
|
1039
1041
|
FLAaveV2?: undefined;
|
|
1040
1042
|
FLAaveV3NoFee?: undefined;
|
|
1041
|
-
FLAaveV3CarryDebt?: undefined;
|
|
1042
1043
|
FLDyDx?: undefined;
|
|
1043
1044
|
FLMaker?: undefined;
|
|
1044
1045
|
FLSpark?: undefined;
|
|
@@ -1176,7 +1177,6 @@ declare const actionAddressesAllChains: {
|
|
|
1176
1177
|
AaveV4DelegateWithdrawWithSig?: undefined;
|
|
1177
1178
|
AaveV4DelegateBorrowWithSig?: undefined;
|
|
1178
1179
|
AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
|
|
1179
|
-
AaveV3DelegateCredit?: undefined;
|
|
1180
1180
|
AaveV3RatioTrigger?: undefined;
|
|
1181
1181
|
AaveV3RatioCheck?: undefined;
|
|
1182
1182
|
} | {
|
|
@@ -1198,6 +1198,7 @@ declare const actionAddressesAllChains: {
|
|
|
1198
1198
|
TokenizedVaultAdapter: string;
|
|
1199
1199
|
FLAction: string;
|
|
1200
1200
|
FLAaveV3: string;
|
|
1201
|
+
FLAaveV3CarryDebt: string;
|
|
1201
1202
|
AaveV3Withdraw: string;
|
|
1202
1203
|
AaveV3Supply: string;
|
|
1203
1204
|
AaveV3SetEMode: string;
|
|
@@ -1294,7 +1295,6 @@ declare const actionAddressesAllChains: {
|
|
|
1294
1295
|
CompCollateralSwitch?: undefined;
|
|
1295
1296
|
FLAaveV2?: undefined;
|
|
1296
1297
|
FLAaveV3NoFee?: undefined;
|
|
1297
|
-
FLAaveV3CarryDebt?: undefined;
|
|
1298
1298
|
FLDyDx?: undefined;
|
|
1299
1299
|
FLMaker?: undefined;
|
|
1300
1300
|
FLBalancer?: undefined;
|
|
@@ -1490,6 +1490,7 @@ declare const actionAddressesAllChains: {
|
|
|
1490
1490
|
TokenizedVaultAdapter: string;
|
|
1491
1491
|
FLAction: string;
|
|
1492
1492
|
FLAaveV3: string;
|
|
1493
|
+
FLAaveV3CarryDebt: string;
|
|
1493
1494
|
AaveV3Withdraw: string;
|
|
1494
1495
|
AaveV3Supply: string;
|
|
1495
1496
|
AaveV3SetEMode: string;
|
|
@@ -1599,7 +1600,6 @@ declare const actionAddressesAllChains: {
|
|
|
1599
1600
|
CompCollateralSwitch?: undefined;
|
|
1600
1601
|
FLAaveV2?: undefined;
|
|
1601
1602
|
FLAaveV3NoFee?: undefined;
|
|
1602
|
-
FLAaveV3CarryDebt?: undefined;
|
|
1603
1603
|
FLDyDx?: undefined;
|
|
1604
1604
|
FLMaker?: undefined;
|
|
1605
1605
|
FLBalancer?: undefined;
|
|
@@ -1837,6 +1837,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
1837
1837
|
AaveV3ATokenPayback: string;
|
|
1838
1838
|
AaveV3View: string;
|
|
1839
1839
|
AaveV3DelegateWithSig: string;
|
|
1840
|
+
AaveV3DelegateCredit: string;
|
|
1840
1841
|
GhoClaimAAVE: string;
|
|
1841
1842
|
GhoUnstake: string;
|
|
1842
1843
|
GhoStake: string;
|
|
@@ -2052,7 +2053,6 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2052
2053
|
AaveV4DelegateWithdrawWithSig: string;
|
|
2053
2054
|
AaveV4DelegateBorrowWithSig: string;
|
|
2054
2055
|
AaveV4DelegateSetUsingAsCollateralWithSig: string;
|
|
2055
|
-
AaveV3DelegateCredit?: undefined;
|
|
2056
2056
|
AaveV3RatioTrigger?: undefined;
|
|
2057
2057
|
GasFeeTakerL2?: undefined;
|
|
2058
2058
|
AaveV3RatioCheck?: undefined;
|
|
@@ -2093,6 +2093,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2093
2093
|
FLAaveV3: string;
|
|
2094
2094
|
FLBalancer: string;
|
|
2095
2095
|
FLAction: string;
|
|
2096
|
+
FLAaveV3CarryDebt: string;
|
|
2096
2097
|
AaveV3RatioTrigger: string;
|
|
2097
2098
|
GasFeeTakerL2: string;
|
|
2098
2099
|
AaveV3RatioCheck: string;
|
|
@@ -2191,7 +2192,6 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2191
2192
|
CompGetDebt?: undefined;
|
|
2192
2193
|
CompCollateralSwitch?: undefined;
|
|
2193
2194
|
FLAaveV2?: undefined;
|
|
2194
|
-
FLAaveV3CarryDebt?: undefined;
|
|
2195
2195
|
FLDyDx?: undefined;
|
|
2196
2196
|
FLMaker?: undefined;
|
|
2197
2197
|
FLSpark?: undefined;
|
|
@@ -2381,6 +2381,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2381
2381
|
AaveV3Withdraw: string;
|
|
2382
2382
|
AaveV3ClaimRewards: string;
|
|
2383
2383
|
AaveV3DelegateWithSig: string;
|
|
2384
|
+
AaveV3DelegateCredit: string;
|
|
2384
2385
|
CompV3Allow: string;
|
|
2385
2386
|
CompV3Borrow: string;
|
|
2386
2387
|
CompV3Claim: string;
|
|
@@ -2394,6 +2395,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2394
2395
|
FLUniV3: string;
|
|
2395
2396
|
FLAction: string;
|
|
2396
2397
|
FLMorphoBlue: string;
|
|
2398
|
+
FLAaveV3CarryDebt: string;
|
|
2397
2399
|
GasFeeTakerL2: string;
|
|
2398
2400
|
AaveV3RatioCheck: string;
|
|
2399
2401
|
UniCollectV3: string;
|
|
@@ -2517,7 +2519,6 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2517
2519
|
CompGetDebt?: undefined;
|
|
2518
2520
|
CompCollateralSwitch?: undefined;
|
|
2519
2521
|
FLAaveV2?: undefined;
|
|
2520
|
-
FLAaveV3CarryDebt?: undefined;
|
|
2521
2522
|
FLDyDx?: undefined;
|
|
2522
2523
|
FLMaker?: undefined;
|
|
2523
2524
|
FLSpark?: undefined;
|
|
@@ -2639,7 +2640,6 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2639
2640
|
AaveV4DelegateWithdrawWithSig?: undefined;
|
|
2640
2641
|
AaveV4DelegateBorrowWithSig?: undefined;
|
|
2641
2642
|
AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
|
|
2642
|
-
AaveV3DelegateCredit?: undefined;
|
|
2643
2643
|
AaveV3RatioTrigger?: undefined;
|
|
2644
2644
|
} | {
|
|
2645
2645
|
DFSSell: string;
|
|
@@ -2667,6 +2667,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2667
2667
|
FLUniV3: string;
|
|
2668
2668
|
FLAction: string;
|
|
2669
2669
|
FLMorphoBlue: string;
|
|
2670
|
+
FLAaveV3CarryDebt: string;
|
|
2670
2671
|
AaveV3Withdraw: string;
|
|
2671
2672
|
AaveV3SwapBorrowRateMode: string;
|
|
2672
2673
|
AaveV3Supply: string;
|
|
@@ -2678,6 +2679,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2678
2679
|
AaveV3ATokenPayback: string;
|
|
2679
2680
|
AaveV3View: string;
|
|
2680
2681
|
AaveV3DelegateWithSig: string;
|
|
2682
|
+
AaveV3DelegateCredit: string;
|
|
2681
2683
|
CompV3Allow: string;
|
|
2682
2684
|
CompV3Borrow: string;
|
|
2683
2685
|
CompV3Claim: string;
|
|
@@ -2792,7 +2794,6 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2792
2794
|
CompCollateralSwitch?: undefined;
|
|
2793
2795
|
FLAaveV2?: undefined;
|
|
2794
2796
|
FLAaveV3NoFee?: undefined;
|
|
2795
|
-
FLAaveV3CarryDebt?: undefined;
|
|
2796
2797
|
FLDyDx?: undefined;
|
|
2797
2798
|
FLMaker?: undefined;
|
|
2798
2799
|
FLSpark?: undefined;
|
|
@@ -2930,7 +2931,6 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2930
2931
|
AaveV4DelegateWithdrawWithSig?: undefined;
|
|
2931
2932
|
AaveV4DelegateBorrowWithSig?: undefined;
|
|
2932
2933
|
AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
|
|
2933
|
-
AaveV3DelegateCredit?: undefined;
|
|
2934
2934
|
AaveV3RatioTrigger?: undefined;
|
|
2935
2935
|
AaveV3RatioCheck?: undefined;
|
|
2936
2936
|
} | {
|
|
@@ -2952,6 +2952,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2952
2952
|
TokenizedVaultAdapter: string;
|
|
2953
2953
|
FLAction: string;
|
|
2954
2954
|
FLAaveV3: string;
|
|
2955
|
+
FLAaveV3CarryDebt: string;
|
|
2955
2956
|
AaveV3Withdraw: string;
|
|
2956
2957
|
AaveV3Supply: string;
|
|
2957
2958
|
AaveV3SetEMode: string;
|
|
@@ -3048,7 +3049,6 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
3048
3049
|
CompCollateralSwitch?: undefined;
|
|
3049
3050
|
FLAaveV2?: undefined;
|
|
3050
3051
|
FLAaveV3NoFee?: undefined;
|
|
3051
|
-
FLAaveV3CarryDebt?: undefined;
|
|
3052
3052
|
FLDyDx?: undefined;
|
|
3053
3053
|
FLMaker?: undefined;
|
|
3054
3054
|
FLBalancer?: undefined;
|
|
@@ -3244,6 +3244,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
3244
3244
|
TokenizedVaultAdapter: string;
|
|
3245
3245
|
FLAction: string;
|
|
3246
3246
|
FLAaveV3: string;
|
|
3247
|
+
FLAaveV3CarryDebt: string;
|
|
3247
3248
|
AaveV3Withdraw: string;
|
|
3248
3249
|
AaveV3Supply: string;
|
|
3249
3250
|
AaveV3SetEMode: string;
|
|
@@ -3353,7 +3354,6 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
3353
3354
|
CompCollateralSwitch?: undefined;
|
|
3354
3355
|
FLAaveV2?: undefined;
|
|
3355
3356
|
FLAaveV3NoFee?: undefined;
|
|
3356
|
-
FLAaveV3CarryDebt?: undefined;
|
|
3357
3357
|
FLDyDx?: undefined;
|
|
3358
3358
|
FLMaker?: undefined;
|
|
3359
3359
|
FLBalancer?: undefined;
|
|
@@ -3828,6 +3828,7 @@ declare const _default: {
|
|
|
3828
3828
|
AaveV3ATokenPayback: string;
|
|
3829
3829
|
AaveV3View: string;
|
|
3830
3830
|
AaveV3DelegateWithSig: string;
|
|
3831
|
+
AaveV3DelegateCredit: string;
|
|
3831
3832
|
GhoClaimAAVE: string;
|
|
3832
3833
|
GhoUnstake: string;
|
|
3833
3834
|
GhoStake: string;
|
|
@@ -4043,7 +4044,6 @@ declare const _default: {
|
|
|
4043
4044
|
AaveV4DelegateWithdrawWithSig: string;
|
|
4044
4045
|
AaveV4DelegateBorrowWithSig: string;
|
|
4045
4046
|
AaveV4DelegateSetUsingAsCollateralWithSig: string;
|
|
4046
|
-
AaveV3DelegateCredit?: undefined;
|
|
4047
4047
|
AaveV3RatioTrigger?: undefined;
|
|
4048
4048
|
GasFeeTakerL2?: undefined;
|
|
4049
4049
|
AaveV3RatioCheck?: undefined;
|
|
@@ -4084,6 +4084,7 @@ declare const _default: {
|
|
|
4084
4084
|
FLAaveV3: string;
|
|
4085
4085
|
FLBalancer: string;
|
|
4086
4086
|
FLAction: string;
|
|
4087
|
+
FLAaveV3CarryDebt: string;
|
|
4087
4088
|
AaveV3RatioTrigger: string;
|
|
4088
4089
|
GasFeeTakerL2: string;
|
|
4089
4090
|
AaveV3RatioCheck: string;
|
|
@@ -4182,7 +4183,6 @@ declare const _default: {
|
|
|
4182
4183
|
CompGetDebt?: undefined;
|
|
4183
4184
|
CompCollateralSwitch?: undefined;
|
|
4184
4185
|
FLAaveV2?: undefined;
|
|
4185
|
-
FLAaveV3CarryDebt?: undefined;
|
|
4186
4186
|
FLDyDx?: undefined;
|
|
4187
4187
|
FLMaker?: undefined;
|
|
4188
4188
|
FLSpark?: undefined;
|
|
@@ -4372,6 +4372,7 @@ declare const _default: {
|
|
|
4372
4372
|
AaveV3Withdraw: string;
|
|
4373
4373
|
AaveV3ClaimRewards: string;
|
|
4374
4374
|
AaveV3DelegateWithSig: string;
|
|
4375
|
+
AaveV3DelegateCredit: string;
|
|
4375
4376
|
CompV3Allow: string;
|
|
4376
4377
|
CompV3Borrow: string;
|
|
4377
4378
|
CompV3Claim: string;
|
|
@@ -4385,6 +4386,7 @@ declare const _default: {
|
|
|
4385
4386
|
FLUniV3: string;
|
|
4386
4387
|
FLAction: string;
|
|
4387
4388
|
FLMorphoBlue: string;
|
|
4389
|
+
FLAaveV3CarryDebt: string;
|
|
4388
4390
|
GasFeeTakerL2: string;
|
|
4389
4391
|
AaveV3RatioCheck: string;
|
|
4390
4392
|
UniCollectV3: string;
|
|
@@ -4508,7 +4510,6 @@ declare const _default: {
|
|
|
4508
4510
|
CompGetDebt?: undefined;
|
|
4509
4511
|
CompCollateralSwitch?: undefined;
|
|
4510
4512
|
FLAaveV2?: undefined;
|
|
4511
|
-
FLAaveV3CarryDebt?: undefined;
|
|
4512
4513
|
FLDyDx?: undefined;
|
|
4513
4514
|
FLMaker?: undefined;
|
|
4514
4515
|
FLSpark?: undefined;
|
|
@@ -4630,7 +4631,6 @@ declare const _default: {
|
|
|
4630
4631
|
AaveV4DelegateWithdrawWithSig?: undefined;
|
|
4631
4632
|
AaveV4DelegateBorrowWithSig?: undefined;
|
|
4632
4633
|
AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
|
|
4633
|
-
AaveV3DelegateCredit?: undefined;
|
|
4634
4634
|
AaveV3RatioTrigger?: undefined;
|
|
4635
4635
|
} | {
|
|
4636
4636
|
DFSSell: string;
|
|
@@ -4658,6 +4658,7 @@ declare const _default: {
|
|
|
4658
4658
|
FLUniV3: string;
|
|
4659
4659
|
FLAction: string;
|
|
4660
4660
|
FLMorphoBlue: string;
|
|
4661
|
+
FLAaveV3CarryDebt: string;
|
|
4661
4662
|
AaveV3Withdraw: string;
|
|
4662
4663
|
AaveV3SwapBorrowRateMode: string;
|
|
4663
4664
|
AaveV3Supply: string;
|
|
@@ -4669,6 +4670,7 @@ declare const _default: {
|
|
|
4669
4670
|
AaveV3ATokenPayback: string;
|
|
4670
4671
|
AaveV3View: string;
|
|
4671
4672
|
AaveV3DelegateWithSig: string;
|
|
4673
|
+
AaveV3DelegateCredit: string;
|
|
4672
4674
|
CompV3Allow: string;
|
|
4673
4675
|
CompV3Borrow: string;
|
|
4674
4676
|
CompV3Claim: string;
|
|
@@ -4783,7 +4785,6 @@ declare const _default: {
|
|
|
4783
4785
|
CompCollateralSwitch?: undefined;
|
|
4784
4786
|
FLAaveV2?: undefined;
|
|
4785
4787
|
FLAaveV3NoFee?: undefined;
|
|
4786
|
-
FLAaveV3CarryDebt?: undefined;
|
|
4787
4788
|
FLDyDx?: undefined;
|
|
4788
4789
|
FLMaker?: undefined;
|
|
4789
4790
|
FLSpark?: undefined;
|
|
@@ -4921,7 +4922,6 @@ declare const _default: {
|
|
|
4921
4922
|
AaveV4DelegateWithdrawWithSig?: undefined;
|
|
4922
4923
|
AaveV4DelegateBorrowWithSig?: undefined;
|
|
4923
4924
|
AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
|
|
4924
|
-
AaveV3DelegateCredit?: undefined;
|
|
4925
4925
|
AaveV3RatioTrigger?: undefined;
|
|
4926
4926
|
AaveV3RatioCheck?: undefined;
|
|
4927
4927
|
} | {
|
|
@@ -4943,6 +4943,7 @@ declare const _default: {
|
|
|
4943
4943
|
TokenizedVaultAdapter: string;
|
|
4944
4944
|
FLAction: string;
|
|
4945
4945
|
FLAaveV3: string;
|
|
4946
|
+
FLAaveV3CarryDebt: string;
|
|
4946
4947
|
AaveV3Withdraw: string;
|
|
4947
4948
|
AaveV3Supply: string;
|
|
4948
4949
|
AaveV3SetEMode: string;
|
|
@@ -5039,7 +5040,6 @@ declare const _default: {
|
|
|
5039
5040
|
CompCollateralSwitch?: undefined;
|
|
5040
5041
|
FLAaveV2?: undefined;
|
|
5041
5042
|
FLAaveV3NoFee?: undefined;
|
|
5042
|
-
FLAaveV3CarryDebt?: undefined;
|
|
5043
5043
|
FLDyDx?: undefined;
|
|
5044
5044
|
FLMaker?: undefined;
|
|
5045
5045
|
FLBalancer?: undefined;
|
|
@@ -5235,6 +5235,7 @@ declare const _default: {
|
|
|
5235
5235
|
TokenizedVaultAdapter: string;
|
|
5236
5236
|
FLAction: string;
|
|
5237
5237
|
FLAaveV3: string;
|
|
5238
|
+
FLAaveV3CarryDebt: string;
|
|
5238
5239
|
AaveV3Withdraw: string;
|
|
5239
5240
|
AaveV3Supply: string;
|
|
5240
5241
|
AaveV3SetEMode: string;
|
|
@@ -5344,7 +5345,6 @@ declare const _default: {
|
|
|
5344
5345
|
CompCollateralSwitch?: undefined;
|
|
5345
5346
|
FLAaveV2?: undefined;
|
|
5346
5347
|
FLAaveV3NoFee?: undefined;
|
|
5347
|
-
FLAaveV3CarryDebt?: undefined;
|
|
5348
5348
|
FLDyDx?: undefined;
|
|
5349
5349
|
FLMaker?: undefined;
|
|
5350
5350
|
FLBalancer?: undefined;
|
|
@@ -5582,6 +5582,7 @@ declare const _default: {
|
|
|
5582
5582
|
AaveV3ATokenPayback: string;
|
|
5583
5583
|
AaveV3View: string;
|
|
5584
5584
|
AaveV3DelegateWithSig: string;
|
|
5585
|
+
AaveV3DelegateCredit: string;
|
|
5585
5586
|
GhoClaimAAVE: string;
|
|
5586
5587
|
GhoUnstake: string;
|
|
5587
5588
|
GhoStake: string;
|
|
@@ -5797,7 +5798,6 @@ declare const _default: {
|
|
|
5797
5798
|
AaveV4DelegateWithdrawWithSig: string;
|
|
5798
5799
|
AaveV4DelegateBorrowWithSig: string;
|
|
5799
5800
|
AaveV4DelegateSetUsingAsCollateralWithSig: string;
|
|
5800
|
-
AaveV3DelegateCredit?: undefined;
|
|
5801
5801
|
AaveV3RatioTrigger?: undefined;
|
|
5802
5802
|
GasFeeTakerL2?: undefined;
|
|
5803
5803
|
AaveV3RatioCheck?: undefined;
|
|
@@ -5838,6 +5838,7 @@ declare const _default: {
|
|
|
5838
5838
|
FLAaveV3: string;
|
|
5839
5839
|
FLBalancer: string;
|
|
5840
5840
|
FLAction: string;
|
|
5841
|
+
FLAaveV3CarryDebt: string;
|
|
5841
5842
|
AaveV3RatioTrigger: string;
|
|
5842
5843
|
GasFeeTakerL2: string;
|
|
5843
5844
|
AaveV3RatioCheck: string;
|
|
@@ -5936,7 +5937,6 @@ declare const _default: {
|
|
|
5936
5937
|
CompGetDebt?: undefined;
|
|
5937
5938
|
CompCollateralSwitch?: undefined;
|
|
5938
5939
|
FLAaveV2?: undefined;
|
|
5939
|
-
FLAaveV3CarryDebt?: undefined;
|
|
5940
5940
|
FLDyDx?: undefined;
|
|
5941
5941
|
FLMaker?: undefined;
|
|
5942
5942
|
FLSpark?: undefined;
|
|
@@ -6126,6 +6126,7 @@ declare const _default: {
|
|
|
6126
6126
|
AaveV3Withdraw: string;
|
|
6127
6127
|
AaveV3ClaimRewards: string;
|
|
6128
6128
|
AaveV3DelegateWithSig: string;
|
|
6129
|
+
AaveV3DelegateCredit: string;
|
|
6129
6130
|
CompV3Allow: string;
|
|
6130
6131
|
CompV3Borrow: string;
|
|
6131
6132
|
CompV3Claim: string;
|
|
@@ -6139,6 +6140,7 @@ declare const _default: {
|
|
|
6139
6140
|
FLUniV3: string;
|
|
6140
6141
|
FLAction: string;
|
|
6141
6142
|
FLMorphoBlue: string;
|
|
6143
|
+
FLAaveV3CarryDebt: string;
|
|
6142
6144
|
GasFeeTakerL2: string;
|
|
6143
6145
|
AaveV3RatioCheck: string;
|
|
6144
6146
|
UniCollectV3: string;
|
|
@@ -6262,7 +6264,6 @@ declare const _default: {
|
|
|
6262
6264
|
CompGetDebt?: undefined;
|
|
6263
6265
|
CompCollateralSwitch?: undefined;
|
|
6264
6266
|
FLAaveV2?: undefined;
|
|
6265
|
-
FLAaveV3CarryDebt?: undefined;
|
|
6266
6267
|
FLDyDx?: undefined;
|
|
6267
6268
|
FLMaker?: undefined;
|
|
6268
6269
|
FLSpark?: undefined;
|
|
@@ -6384,7 +6385,6 @@ declare const _default: {
|
|
|
6384
6385
|
AaveV4DelegateWithdrawWithSig?: undefined;
|
|
6385
6386
|
AaveV4DelegateBorrowWithSig?: undefined;
|
|
6386
6387
|
AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
|
|
6387
|
-
AaveV3DelegateCredit?: undefined;
|
|
6388
6388
|
AaveV3RatioTrigger?: undefined;
|
|
6389
6389
|
} | {
|
|
6390
6390
|
DFSSell: string;
|
|
@@ -6412,6 +6412,7 @@ declare const _default: {
|
|
|
6412
6412
|
FLUniV3: string;
|
|
6413
6413
|
FLAction: string;
|
|
6414
6414
|
FLMorphoBlue: string;
|
|
6415
|
+
FLAaveV3CarryDebt: string;
|
|
6415
6416
|
AaveV3Withdraw: string;
|
|
6416
6417
|
AaveV3SwapBorrowRateMode: string;
|
|
6417
6418
|
AaveV3Supply: string;
|
|
@@ -6423,6 +6424,7 @@ declare const _default: {
|
|
|
6423
6424
|
AaveV3ATokenPayback: string;
|
|
6424
6425
|
AaveV3View: string;
|
|
6425
6426
|
AaveV3DelegateWithSig: string;
|
|
6427
|
+
AaveV3DelegateCredit: string;
|
|
6426
6428
|
CompV3Allow: string;
|
|
6427
6429
|
CompV3Borrow: string;
|
|
6428
6430
|
CompV3Claim: string;
|
|
@@ -6537,7 +6539,6 @@ declare const _default: {
|
|
|
6537
6539
|
CompCollateralSwitch?: undefined;
|
|
6538
6540
|
FLAaveV2?: undefined;
|
|
6539
6541
|
FLAaveV3NoFee?: undefined;
|
|
6540
|
-
FLAaveV3CarryDebt?: undefined;
|
|
6541
6542
|
FLDyDx?: undefined;
|
|
6542
6543
|
FLMaker?: undefined;
|
|
6543
6544
|
FLSpark?: undefined;
|
|
@@ -6675,7 +6676,6 @@ declare const _default: {
|
|
|
6675
6676
|
AaveV4DelegateWithdrawWithSig?: undefined;
|
|
6676
6677
|
AaveV4DelegateBorrowWithSig?: undefined;
|
|
6677
6678
|
AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
|
|
6678
|
-
AaveV3DelegateCredit?: undefined;
|
|
6679
6679
|
AaveV3RatioTrigger?: undefined;
|
|
6680
6680
|
AaveV3RatioCheck?: undefined;
|
|
6681
6681
|
} | {
|
|
@@ -6697,6 +6697,7 @@ declare const _default: {
|
|
|
6697
6697
|
TokenizedVaultAdapter: string;
|
|
6698
6698
|
FLAction: string;
|
|
6699
6699
|
FLAaveV3: string;
|
|
6700
|
+
FLAaveV3CarryDebt: string;
|
|
6700
6701
|
AaveV3Withdraw: string;
|
|
6701
6702
|
AaveV3Supply: string;
|
|
6702
6703
|
AaveV3SetEMode: string;
|
|
@@ -6793,7 +6794,6 @@ declare const _default: {
|
|
|
6793
6794
|
CompCollateralSwitch?: undefined;
|
|
6794
6795
|
FLAaveV2?: undefined;
|
|
6795
6796
|
FLAaveV3NoFee?: undefined;
|
|
6796
|
-
FLAaveV3CarryDebt?: undefined;
|
|
6797
6797
|
FLDyDx?: undefined;
|
|
6798
6798
|
FLMaker?: undefined;
|
|
6799
6799
|
FLBalancer?: undefined;
|
|
@@ -6989,6 +6989,7 @@ declare const _default: {
|
|
|
6989
6989
|
TokenizedVaultAdapter: string;
|
|
6990
6990
|
FLAction: string;
|
|
6991
6991
|
FLAaveV3: string;
|
|
6992
|
+
FLAaveV3CarryDebt: string;
|
|
6992
6993
|
AaveV3Withdraw: string;
|
|
6993
6994
|
AaveV3Supply: string;
|
|
6994
6995
|
AaveV3SetEMode: string;
|
|
@@ -7098,7 +7099,6 @@ declare const _default: {
|
|
|
7098
7099
|
CompCollateralSwitch?: undefined;
|
|
7099
7100
|
FLAaveV2?: undefined;
|
|
7100
7101
|
FLAaveV3NoFee?: undefined;
|
|
7101
|
-
FLAaveV3CarryDebt?: undefined;
|
|
7102
7102
|
FLDyDx?: undefined;
|
|
7103
7103
|
FLMaker?: undefined;
|
|
7104
7104
|
FLBalancer?: undefined;
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@ export class AaveV3DelegateCredit extends ActionWithL2 {
|
|
|
16
16
|
* @param amount Amount of tokens to be payed back
|
|
17
17
|
* @param rateMode Type of borrow debt [Stable: 1, Variable: 2]
|
|
18
18
|
* @param assetId The id of the token to be borrowed
|
|
19
|
-
* @param delegatee The
|
|
19
|
+
* @param delegatee The address of the delegatee to be credited
|
|
20
20
|
*/
|
|
21
21
|
constructor(useOnDefaultMarket: boolean, market:EthAddress, amount:uint256, rateMode:uint8, assetId:uint16, delegatee:EthAddress) {
|
|
22
22
|
super('AaveV3DelegateCredit', getAddr('Empty'),
|
|
@@ -25,7 +25,7 @@ export class LimitSellAction extends ActionWithL2 {
|
|
|
25
25
|
requireAddress(to);
|
|
26
26
|
super(
|
|
27
27
|
'LimitSell',
|
|
28
|
-
getAddr('
|
|
28
|
+
getAddr('Empty'),
|
|
29
29
|
[
|
|
30
30
|
['address', 'address', 'uint256', 'uint256', 'uint256', 'uint256', 'address', 'address', 'bytes', ['address', 'address', 'address', 'uint256', 'uint256', 'bytes']],
|
|
31
31
|
'address',
|
|
@@ -0,0 +1,65 @@
|
|
|
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 on L2
|
|
11
|
+
*
|
|
12
|
+
* @category BasicActions
|
|
13
|
+
*/
|
|
14
|
+
export class LimitSellActionL2 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 l1GasCostInEth Additional tx cost for L1 in eth
|
|
23
|
+
* @param protocolFee 0x fee (amount of ETH in Wei)
|
|
24
|
+
*/
|
|
25
|
+
constructor(exchangeOrder:Array<any>, from:EthAddress, to:EthAddress, gasUsed: uint256, l1GasCostInEth: uint256, protocolFee = '0') {
|
|
26
|
+
requireAddress(to);
|
|
27
|
+
super(
|
|
28
|
+
'LimitSellL2',
|
|
29
|
+
getAddr('Empty'),
|
|
30
|
+
[
|
|
31
|
+
['address', 'address', 'uint256', 'uint256', 'uint256', 'uint256', 'address', 'address', 'bytes', ['address', 'address', 'address', 'uint256', 'uint256', 'bytes']],
|
|
32
|
+
'address',
|
|
33
|
+
'address',
|
|
34
|
+
'uint256',
|
|
35
|
+
'uint256',
|
|
36
|
+
],
|
|
37
|
+
[exchangeOrder, from, to, gasUsed, l1GasCostInEth],
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
this.protocolFee = protocolFee;
|
|
41
|
+
|
|
42
|
+
this.mappableArgs = [
|
|
43
|
+
this.args[0][0],
|
|
44
|
+
this.args[0][1],
|
|
45
|
+
this.args[0][2],
|
|
46
|
+
this.args[1],
|
|
47
|
+
this.args[2],
|
|
48
|
+
];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
encodeInputs() {
|
|
52
|
+
const executeActionDirectAbi: any = (ActionAbi.find(({ name }) => name === 'executeActionDirect'))!;
|
|
53
|
+
return AbiCoder.encodeFunctionCall(executeActionDirectAbi, this._encodeForCall());
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async getAssetsToApprove() {
|
|
57
|
+
const asset = getAssetInfoByAddress(this.args[0][0]);
|
|
58
|
+
if (asset.symbol !== 'ETH') return [{ asset: this.args[0][0], owner: this.args[1] }];
|
|
59
|
+
return [];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async getEthValue() {
|
|
63
|
+
return this.protocolFee || '0';
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -17,6 +17,7 @@ export * from './TransferNFTAction';
|
|
|
17
17
|
export * from './SendTokensAction';
|
|
18
18
|
export * from './CreateSubAction';
|
|
19
19
|
export * from './LSVSellAction';
|
|
20
|
+
export * from './LimitSellActionL2';
|
|
20
21
|
export * from './ApproveTokenAction';
|
|
21
22
|
export * from './SDaiWrapAction';
|
|
22
23
|
export * from './SDaiUnwrapAction';
|
|
@@ -9,27 +9,21 @@ import { EthAddress, uint256, bytes } from '../../types';
|
|
|
9
9
|
*/
|
|
10
10
|
export class AaveV3FlashLoanCarryDebtAction extends ActionWithL2 {
|
|
11
11
|
/**
|
|
12
|
-
* @param loanAmounts
|
|
13
12
|
* @param tokens
|
|
14
|
-
* @param
|
|
15
|
-
* @param loanPayer
|
|
13
|
+
* @param loanAmounts
|
|
16
14
|
* @param flParamGetterAddr
|
|
17
15
|
* @param flParamGetterData
|
|
18
16
|
*/
|
|
19
|
-
constructor(tokens:Array<EthAddress>, loanAmounts:Array<uint256>,
|
|
17
|
+
constructor(tokens:Array<EthAddress>, loanAmounts:Array<uint256>, flParamGetterAddr:EthAddress = getAddr('Empty'), flParamGetterData:bytes = []) {
|
|
18
|
+
if (tokens.length !== loanAmounts.length) {
|
|
19
|
+
throw new Error('Tokens and loan amounts must be of the same length');
|
|
20
|
+
}
|
|
21
|
+
const modes: Array<uint256> = Array(tokens.length).fill(2); // always use variable borrow rate
|
|
20
22
|
super(
|
|
21
23
|
'FLAaveV3CarryDebt',
|
|
22
24
|
getAddr('FLAaveV3CarryDebt'),
|
|
23
25
|
['address[]', 'uint256[]', 'uint256[]', 'address', 'address', 'bytes', 'bytes'],
|
|
24
|
-
[tokens, loanAmounts, modes,
|
|
26
|
+
[tokens, loanAmounts, modes, getAddr('Empty'), flParamGetterAddr, flParamGetterData, []],
|
|
25
27
|
);
|
|
26
|
-
if (tokens.length !== modes.length || tokens.length !== loanAmounts.length) {
|
|
27
|
-
throw new Error('Arrays must be of the same length');
|
|
28
|
-
}
|
|
29
|
-
modes.forEach((mode) => {
|
|
30
|
-
if (mode.toString() !== '1' && mode.toString() !== '2') {
|
|
31
|
-
throw new Error('Invalid borrow mode set');
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
28
|
}
|
|
35
29
|
}
|
|
@@ -9,8 +9,8 @@ import { EthAddress, uint256, bytes } from '../../types';
|
|
|
9
9
|
*/
|
|
10
10
|
export class AaveV3FlashLoanNoFeeAction extends ActionWithL2 {
|
|
11
11
|
/**
|
|
12
|
-
* @param loanAmounts
|
|
13
12
|
* @param tokens
|
|
13
|
+
* @param loanAmounts
|
|
14
14
|
* @param modes
|
|
15
15
|
* @param loanPayer
|
|
16
16
|
* @param flParamGetterAddr
|