@defisaver/sdk 1.3.17 → 1.3.18-aave-v4-1-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/Recipe.js +1 -1
- package/esm/src/Strategy.d.ts +1 -0
- package/esm/src/Strategy.js +3 -0
- package/esm/src/actions/aavev4/AaveV4BorrowAction.d.ts +17 -0
- package/esm/src/actions/aavev4/AaveV4BorrowAction.js +26 -0
- package/esm/src/actions/aavev4/AaveV4CollateralSwitchAction.d.ts +16 -0
- package/esm/src/actions/aavev4/AaveV4CollateralSwitchAction.js +24 -0
- package/esm/src/actions/aavev4/AaveV4PaybackAction.d.ts +23 -0
- package/esm/src/actions/aavev4/AaveV4PaybackAction.js +46 -0
- package/esm/src/actions/aavev4/AaveV4RefreshPremiumAction.d.ts +15 -0
- package/esm/src/actions/aavev4/AaveV4RefreshPremiumAction.js +22 -0
- package/esm/src/actions/aavev4/AaveV4StoreRatioAction.d.ts +14 -0
- package/esm/src/actions/aavev4/AaveV4StoreRatioAction.js +20 -0
- package/esm/src/actions/aavev4/AaveV4SupplyAction.d.ts +25 -0
- package/esm/src/actions/aavev4/AaveV4SupplyAction.js +49 -0
- package/esm/src/actions/aavev4/AaveV4WithdrawAction.d.ts +17 -0
- package/esm/src/actions/aavev4/AaveV4WithdrawAction.js +26 -0
- package/esm/src/actions/aavev4/index.d.ts +7 -0
- package/esm/src/actions/aavev4/index.js +7 -0
- package/esm/src/actions/checkers/AaveV4RatioCheckAction.d.ts +16 -0
- package/esm/src/actions/checkers/AaveV4RatioCheckAction.js +24 -0
- package/esm/src/actions/checkers/index.d.ts +1 -0
- package/esm/src/actions/checkers/index.js +1 -0
- package/esm/src/actions/index.d.ts +2 -1
- package/esm/src/actions/index.js +2 -1
- package/esm/src/addresses.d.ts +36 -5
- package/esm/src/addresses.js +7 -4
- package/esm/src/index.d.ts +144 -20
- package/esm/src/triggers/AaveV4QuotePriceRangeTrigger.d.ts +10 -0
- package/esm/src/triggers/AaveV4QuotePriceRangeTrigger.js +12 -0
- package/esm/src/triggers/AaveV4QuotePriceTrigger.d.ts +10 -0
- package/esm/src/triggers/AaveV4QuotePriceTrigger.js +12 -0
- package/esm/src/triggers/AaveV4RatioTrigger.d.ts +10 -0
- package/esm/src/triggers/AaveV4RatioTrigger.js +12 -0
- package/esm/src/triggers/index.d.ts +3 -0
- package/esm/src/triggers/index.js +3 -0
- package/package.json +1 -1
- package/src/Recipe.ts +1 -1
- package/src/Strategy.ts +4 -0
- package/src/actions/aavev4/AaveV4BorrowAction.ts +39 -0
- package/src/actions/aavev4/AaveV4CollateralSwitchAction.ts +36 -0
- package/src/actions/aavev4/AaveV4PaybackAction.ts +51 -0
- package/src/actions/aavev4/AaveV4RefreshPremiumAction.ts +33 -0
- package/src/actions/aavev4/AaveV4StoreRatioAction.ts +30 -0
- package/src/actions/aavev4/AaveV4SupplyAction.ts +55 -0
- package/src/actions/aavev4/AaveV4WithdrawAction.ts +39 -0
- package/src/actions/aavev4/index.ts +7 -0
- package/src/actions/checkers/AaveV4RatioCheckAction.ts +36 -0
- package/src/actions/checkers/index.ts +2 -1
- package/src/actions/index.ts +2 -0
- package/src/addresses.ts +8 -5
- package/src/triggers/AaveV4QuotePriceRangeTrigger.ts +25 -0
- package/src/triggers/AaveV4QuotePriceTrigger.ts +25 -0
- package/src/triggers/AaveV4RatioTrigger.ts +24 -0
- package/src/triggers/index.ts +4 -1
- package/umd/index.js +993 -585
package/esm/src/index.d.ts
CHANGED
|
@@ -288,6 +288,12 @@ declare const actionAddressesAllChains: {
|
|
|
288
288
|
SFApproveTokens: string;
|
|
289
289
|
SummerfiUnsub: string;
|
|
290
290
|
SummerfiUnsubV2: string;
|
|
291
|
+
AaveV4Supply: string;
|
|
292
|
+
AaveV4Withdraw: string;
|
|
293
|
+
AaveV4Borrow: string;
|
|
294
|
+
AaveV4Payback: string;
|
|
295
|
+
AaveV4CollateralSwitch: string;
|
|
296
|
+
AaveV4RefreshPremium: string;
|
|
291
297
|
AaveV3DelegateCredit?: undefined;
|
|
292
298
|
AaveV3RatioTrigger?: undefined;
|
|
293
299
|
GasFeeTakerL2?: undefined;
|
|
@@ -574,6 +580,12 @@ declare const actionAddressesAllChains: {
|
|
|
574
580
|
UmbrellaClaimRewards?: undefined;
|
|
575
581
|
UmbrellaStake?: undefined;
|
|
576
582
|
UmbrellaUnstake?: undefined;
|
|
583
|
+
AaveV4Supply?: undefined;
|
|
584
|
+
AaveV4Withdraw?: undefined;
|
|
585
|
+
AaveV4Borrow?: undefined;
|
|
586
|
+
AaveV4Payback?: undefined;
|
|
587
|
+
AaveV4CollateralSwitch?: undefined;
|
|
588
|
+
AaveV4RefreshPremium?: undefined;
|
|
577
589
|
MorphoBlueView?: undefined;
|
|
578
590
|
} | {
|
|
579
591
|
DFSSell: string;
|
|
@@ -855,6 +867,12 @@ declare const actionAddressesAllChains: {
|
|
|
855
867
|
UmbrellaClaimRewards?: undefined;
|
|
856
868
|
UmbrellaStake?: undefined;
|
|
857
869
|
UmbrellaUnstake?: undefined;
|
|
870
|
+
AaveV4Supply?: undefined;
|
|
871
|
+
AaveV4Withdraw?: undefined;
|
|
872
|
+
AaveV4Borrow?: undefined;
|
|
873
|
+
AaveV4Payback?: undefined;
|
|
874
|
+
AaveV4CollateralSwitch?: undefined;
|
|
875
|
+
AaveV4RefreshPremium?: undefined;
|
|
858
876
|
AaveV3DelegateCredit?: undefined;
|
|
859
877
|
AaveV3RatioTrigger?: undefined;
|
|
860
878
|
} | {
|
|
@@ -1136,6 +1154,12 @@ declare const actionAddressesAllChains: {
|
|
|
1136
1154
|
UmbrellaClaimRewards?: undefined;
|
|
1137
1155
|
UmbrellaStake?: undefined;
|
|
1138
1156
|
UmbrellaUnstake?: undefined;
|
|
1157
|
+
AaveV4Supply?: undefined;
|
|
1158
|
+
AaveV4Withdraw?: undefined;
|
|
1159
|
+
AaveV4Borrow?: undefined;
|
|
1160
|
+
AaveV4Payback?: undefined;
|
|
1161
|
+
AaveV4CollateralSwitch?: undefined;
|
|
1162
|
+
AaveV4RefreshPremium?: undefined;
|
|
1139
1163
|
AaveV3DelegateCredit?: undefined;
|
|
1140
1164
|
AaveV3RatioTrigger?: undefined;
|
|
1141
1165
|
AaveV3RatioCheck?: undefined;
|
|
@@ -1417,6 +1441,12 @@ declare const actionAddressesAllChains: {
|
|
|
1417
1441
|
SFApproveTokens?: undefined;
|
|
1418
1442
|
SummerfiUnsub?: undefined;
|
|
1419
1443
|
SummerfiUnsubV2?: undefined;
|
|
1444
|
+
AaveV4Supply?: undefined;
|
|
1445
|
+
AaveV4Withdraw?: undefined;
|
|
1446
|
+
AaveV4Borrow?: undefined;
|
|
1447
|
+
AaveV4Payback?: undefined;
|
|
1448
|
+
AaveV4CollateralSwitch?: undefined;
|
|
1449
|
+
AaveV4RefreshPremium?: undefined;
|
|
1420
1450
|
AaveV3RatioTrigger?: undefined;
|
|
1421
1451
|
GasFeeTakerL2?: undefined;
|
|
1422
1452
|
AaveV3RatioCheck?: undefined;
|
|
@@ -1699,6 +1729,12 @@ declare const actionAddressesAllChains: {
|
|
|
1699
1729
|
SFApproveTokens?: undefined;
|
|
1700
1730
|
SummerfiUnsub?: undefined;
|
|
1701
1731
|
SummerfiUnsubV2?: undefined;
|
|
1732
|
+
AaveV4Supply?: undefined;
|
|
1733
|
+
AaveV4Withdraw?: undefined;
|
|
1734
|
+
AaveV4Borrow?: undefined;
|
|
1735
|
+
AaveV4Payback?: undefined;
|
|
1736
|
+
AaveV4CollateralSwitch?: undefined;
|
|
1737
|
+
AaveV4RefreshPremium?: undefined;
|
|
1702
1738
|
AaveV3RatioTrigger?: undefined;
|
|
1703
1739
|
GasFeeTakerL2?: undefined;
|
|
1704
1740
|
AaveV3RatioCheck?: undefined;
|
|
@@ -1982,6 +2018,12 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
1982
2018
|
SFApproveTokens: string;
|
|
1983
2019
|
SummerfiUnsub: string;
|
|
1984
2020
|
SummerfiUnsubV2: string;
|
|
2021
|
+
AaveV4Supply: string;
|
|
2022
|
+
AaveV4Withdraw: string;
|
|
2023
|
+
AaveV4Borrow: string;
|
|
2024
|
+
AaveV4Payback: string;
|
|
2025
|
+
AaveV4CollateralSwitch: string;
|
|
2026
|
+
AaveV4RefreshPremium: string;
|
|
1985
2027
|
AaveV3DelegateCredit?: undefined;
|
|
1986
2028
|
AaveV3RatioTrigger?: undefined;
|
|
1987
2029
|
GasFeeTakerL2?: undefined;
|
|
@@ -2268,6 +2310,12 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2268
2310
|
UmbrellaClaimRewards?: undefined;
|
|
2269
2311
|
UmbrellaStake?: undefined;
|
|
2270
2312
|
UmbrellaUnstake?: undefined;
|
|
2313
|
+
AaveV4Supply?: undefined;
|
|
2314
|
+
AaveV4Withdraw?: undefined;
|
|
2315
|
+
AaveV4Borrow?: undefined;
|
|
2316
|
+
AaveV4Payback?: undefined;
|
|
2317
|
+
AaveV4CollateralSwitch?: undefined;
|
|
2318
|
+
AaveV4RefreshPremium?: undefined;
|
|
2271
2319
|
MorphoBlueView?: undefined;
|
|
2272
2320
|
} | {
|
|
2273
2321
|
DFSSell: string;
|
|
@@ -2549,6 +2597,12 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2549
2597
|
UmbrellaClaimRewards?: undefined;
|
|
2550
2598
|
UmbrellaStake?: undefined;
|
|
2551
2599
|
UmbrellaUnstake?: undefined;
|
|
2600
|
+
AaveV4Supply?: undefined;
|
|
2601
|
+
AaveV4Withdraw?: undefined;
|
|
2602
|
+
AaveV4Borrow?: undefined;
|
|
2603
|
+
AaveV4Payback?: undefined;
|
|
2604
|
+
AaveV4CollateralSwitch?: undefined;
|
|
2605
|
+
AaveV4RefreshPremium?: undefined;
|
|
2552
2606
|
AaveV3DelegateCredit?: undefined;
|
|
2553
2607
|
AaveV3RatioTrigger?: undefined;
|
|
2554
2608
|
} | {
|
|
@@ -2830,6 +2884,12 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2830
2884
|
UmbrellaClaimRewards?: undefined;
|
|
2831
2885
|
UmbrellaStake?: undefined;
|
|
2832
2886
|
UmbrellaUnstake?: undefined;
|
|
2887
|
+
AaveV4Supply?: undefined;
|
|
2888
|
+
AaveV4Withdraw?: undefined;
|
|
2889
|
+
AaveV4Borrow?: undefined;
|
|
2890
|
+
AaveV4Payback?: undefined;
|
|
2891
|
+
AaveV4CollateralSwitch?: undefined;
|
|
2892
|
+
AaveV4RefreshPremium?: undefined;
|
|
2833
2893
|
AaveV3DelegateCredit?: undefined;
|
|
2834
2894
|
AaveV3RatioTrigger?: undefined;
|
|
2835
2895
|
AaveV3RatioCheck?: undefined;
|
|
@@ -3111,6 +3171,12 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
3111
3171
|
SFApproveTokens?: undefined;
|
|
3112
3172
|
SummerfiUnsub?: undefined;
|
|
3113
3173
|
SummerfiUnsubV2?: undefined;
|
|
3174
|
+
AaveV4Supply?: undefined;
|
|
3175
|
+
AaveV4Withdraw?: undefined;
|
|
3176
|
+
AaveV4Borrow?: undefined;
|
|
3177
|
+
AaveV4Payback?: undefined;
|
|
3178
|
+
AaveV4CollateralSwitch?: undefined;
|
|
3179
|
+
AaveV4RefreshPremium?: undefined;
|
|
3114
3180
|
AaveV3RatioTrigger?: undefined;
|
|
3115
3181
|
GasFeeTakerL2?: undefined;
|
|
3116
3182
|
AaveV3RatioCheck?: undefined;
|
|
@@ -3393,6 +3459,12 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
3393
3459
|
SFApproveTokens?: undefined;
|
|
3394
3460
|
SummerfiUnsub?: undefined;
|
|
3395
3461
|
SummerfiUnsubV2?: undefined;
|
|
3462
|
+
AaveV4Supply?: undefined;
|
|
3463
|
+
AaveV4Withdraw?: undefined;
|
|
3464
|
+
AaveV4Borrow?: undefined;
|
|
3465
|
+
AaveV4Payback?: undefined;
|
|
3466
|
+
AaveV4CollateralSwitch?: undefined;
|
|
3467
|
+
AaveV4RefreshPremium?: undefined;
|
|
3396
3468
|
AaveV3RatioTrigger?: undefined;
|
|
3397
3469
|
GasFeeTakerL2?: undefined;
|
|
3398
3470
|
AaveV3RatioCheck?: undefined;
|
|
@@ -3401,7 +3473,6 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
3401
3473
|
declare const otherAddressesAllChains: {
|
|
3402
3474
|
[x: number]: {
|
|
3403
3475
|
RecipeExecutor: string;
|
|
3404
|
-
RecipeExecutorForTxSaver: string;
|
|
3405
3476
|
DFSRegistry: string;
|
|
3406
3477
|
DFSProxyRegistry: string;
|
|
3407
3478
|
ProxyRegistry: string;
|
|
@@ -3424,7 +3495,6 @@ declare const otherAddressesAllChains: {
|
|
|
3424
3495
|
DefisaverLogger?: undefined;
|
|
3425
3496
|
} | {
|
|
3426
3497
|
RecipeExecutor: string;
|
|
3427
|
-
RecipeExecutorForTxSaver: string;
|
|
3428
3498
|
DFSRegistry: string;
|
|
3429
3499
|
ProxyRegistry: string;
|
|
3430
3500
|
SFProxyEntryPoint: string;
|
|
@@ -3447,7 +3517,6 @@ declare const otherAddressesAllChains: {
|
|
|
3447
3517
|
BLUSD?: undefined;
|
|
3448
3518
|
} | {
|
|
3449
3519
|
RecipeExecutor: string;
|
|
3450
|
-
RecipeExecutorForTxSaver: string;
|
|
3451
3520
|
DFSRegistry: string;
|
|
3452
3521
|
ProxyRegistry: string;
|
|
3453
3522
|
SFProxyEntryPoint: string;
|
|
@@ -3475,7 +3544,6 @@ declare const otherAddressesAllChains: {
|
|
|
3475
3544
|
AdminVault: string;
|
|
3476
3545
|
DefisaverLogger: string;
|
|
3477
3546
|
Empty: string;
|
|
3478
|
-
RecipeExecutorForTxSaver?: undefined;
|
|
3479
3547
|
DFSProxyRegistry?: undefined;
|
|
3480
3548
|
ProxyRegistry?: undefined;
|
|
3481
3549
|
SFProxyEntryPoint?: undefined;
|
|
@@ -3497,7 +3565,6 @@ declare const otherAddressesAllChains: {
|
|
|
3497
3565
|
AdminVault: string;
|
|
3498
3566
|
DefisaverLogger: string;
|
|
3499
3567
|
Empty: string;
|
|
3500
|
-
RecipeExecutorForTxSaver?: undefined;
|
|
3501
3568
|
DFSProxyRegistry?: undefined;
|
|
3502
3569
|
ProxyRegistry?: undefined;
|
|
3503
3570
|
SFProxyEntryPoint?: undefined;
|
|
@@ -3518,7 +3585,6 @@ declare const otherAddressesAllChains: {
|
|
|
3518
3585
|
};
|
|
3519
3586
|
declare const otherAddresses: (chainId?: null) => {
|
|
3520
3587
|
RecipeExecutor: string;
|
|
3521
|
-
RecipeExecutorForTxSaver: string;
|
|
3522
3588
|
DFSRegistry: string;
|
|
3523
3589
|
DFSProxyRegistry: string;
|
|
3524
3590
|
ProxyRegistry: string;
|
|
@@ -3541,7 +3607,6 @@ declare const otherAddresses: (chainId?: null) => {
|
|
|
3541
3607
|
DefisaverLogger?: undefined;
|
|
3542
3608
|
} | {
|
|
3543
3609
|
RecipeExecutor: string;
|
|
3544
|
-
RecipeExecutorForTxSaver: string;
|
|
3545
3610
|
DFSRegistry: string;
|
|
3546
3611
|
ProxyRegistry: string;
|
|
3547
3612
|
SFProxyEntryPoint: string;
|
|
@@ -3564,7 +3629,6 @@ declare const otherAddresses: (chainId?: null) => {
|
|
|
3564
3629
|
BLUSD?: undefined;
|
|
3565
3630
|
} | {
|
|
3566
3631
|
RecipeExecutor: string;
|
|
3567
|
-
RecipeExecutorForTxSaver: string;
|
|
3568
3632
|
DFSRegistry: string;
|
|
3569
3633
|
ProxyRegistry: string;
|
|
3570
3634
|
SFProxyEntryPoint: string;
|
|
@@ -3592,7 +3656,6 @@ declare const otherAddresses: (chainId?: null) => {
|
|
|
3592
3656
|
AdminVault: string;
|
|
3593
3657
|
DefisaverLogger: string;
|
|
3594
3658
|
Empty: string;
|
|
3595
|
-
RecipeExecutorForTxSaver?: undefined;
|
|
3596
3659
|
DFSProxyRegistry?: undefined;
|
|
3597
3660
|
ProxyRegistry?: undefined;
|
|
3598
3661
|
SFProxyEntryPoint?: undefined;
|
|
@@ -3614,7 +3677,6 @@ declare const otherAddresses: (chainId?: null) => {
|
|
|
3614
3677
|
AdminVault: string;
|
|
3615
3678
|
DefisaverLogger: string;
|
|
3616
3679
|
Empty: string;
|
|
3617
|
-
RecipeExecutorForTxSaver?: undefined;
|
|
3618
3680
|
DFSProxyRegistry?: undefined;
|
|
3619
3681
|
ProxyRegistry?: undefined;
|
|
3620
3682
|
SFProxyEntryPoint?: undefined;
|
|
@@ -3923,6 +3985,12 @@ declare const _default: {
|
|
|
3923
3985
|
SFApproveTokens: string;
|
|
3924
3986
|
SummerfiUnsub: string;
|
|
3925
3987
|
SummerfiUnsubV2: string;
|
|
3988
|
+
AaveV4Supply: string;
|
|
3989
|
+
AaveV4Withdraw: string;
|
|
3990
|
+
AaveV4Borrow: string;
|
|
3991
|
+
AaveV4Payback: string;
|
|
3992
|
+
AaveV4CollateralSwitch: string;
|
|
3993
|
+
AaveV4RefreshPremium: string;
|
|
3926
3994
|
AaveV3DelegateCredit?: undefined;
|
|
3927
3995
|
AaveV3RatioTrigger?: undefined;
|
|
3928
3996
|
GasFeeTakerL2?: undefined;
|
|
@@ -4209,6 +4277,12 @@ declare const _default: {
|
|
|
4209
4277
|
UmbrellaClaimRewards?: undefined;
|
|
4210
4278
|
UmbrellaStake?: undefined;
|
|
4211
4279
|
UmbrellaUnstake?: undefined;
|
|
4280
|
+
AaveV4Supply?: undefined;
|
|
4281
|
+
AaveV4Withdraw?: undefined;
|
|
4282
|
+
AaveV4Borrow?: undefined;
|
|
4283
|
+
AaveV4Payback?: undefined;
|
|
4284
|
+
AaveV4CollateralSwitch?: undefined;
|
|
4285
|
+
AaveV4RefreshPremium?: undefined;
|
|
4212
4286
|
MorphoBlueView?: undefined;
|
|
4213
4287
|
} | {
|
|
4214
4288
|
DFSSell: string;
|
|
@@ -4490,6 +4564,12 @@ declare const _default: {
|
|
|
4490
4564
|
UmbrellaClaimRewards?: undefined;
|
|
4491
4565
|
UmbrellaStake?: undefined;
|
|
4492
4566
|
UmbrellaUnstake?: undefined;
|
|
4567
|
+
AaveV4Supply?: undefined;
|
|
4568
|
+
AaveV4Withdraw?: undefined;
|
|
4569
|
+
AaveV4Borrow?: undefined;
|
|
4570
|
+
AaveV4Payback?: undefined;
|
|
4571
|
+
AaveV4CollateralSwitch?: undefined;
|
|
4572
|
+
AaveV4RefreshPremium?: undefined;
|
|
4493
4573
|
AaveV3DelegateCredit?: undefined;
|
|
4494
4574
|
AaveV3RatioTrigger?: undefined;
|
|
4495
4575
|
} | {
|
|
@@ -4771,6 +4851,12 @@ declare const _default: {
|
|
|
4771
4851
|
UmbrellaClaimRewards?: undefined;
|
|
4772
4852
|
UmbrellaStake?: undefined;
|
|
4773
4853
|
UmbrellaUnstake?: undefined;
|
|
4854
|
+
AaveV4Supply?: undefined;
|
|
4855
|
+
AaveV4Withdraw?: undefined;
|
|
4856
|
+
AaveV4Borrow?: undefined;
|
|
4857
|
+
AaveV4Payback?: undefined;
|
|
4858
|
+
AaveV4CollateralSwitch?: undefined;
|
|
4859
|
+
AaveV4RefreshPremium?: undefined;
|
|
4774
4860
|
AaveV3DelegateCredit?: undefined;
|
|
4775
4861
|
AaveV3RatioTrigger?: undefined;
|
|
4776
4862
|
AaveV3RatioCheck?: undefined;
|
|
@@ -5052,6 +5138,12 @@ declare const _default: {
|
|
|
5052
5138
|
SFApproveTokens?: undefined;
|
|
5053
5139
|
SummerfiUnsub?: undefined;
|
|
5054
5140
|
SummerfiUnsubV2?: undefined;
|
|
5141
|
+
AaveV4Supply?: undefined;
|
|
5142
|
+
AaveV4Withdraw?: undefined;
|
|
5143
|
+
AaveV4Borrow?: undefined;
|
|
5144
|
+
AaveV4Payback?: undefined;
|
|
5145
|
+
AaveV4CollateralSwitch?: undefined;
|
|
5146
|
+
AaveV4RefreshPremium?: undefined;
|
|
5055
5147
|
AaveV3RatioTrigger?: undefined;
|
|
5056
5148
|
GasFeeTakerL2?: undefined;
|
|
5057
5149
|
AaveV3RatioCheck?: undefined;
|
|
@@ -5334,6 +5426,12 @@ declare const _default: {
|
|
|
5334
5426
|
SFApproveTokens?: undefined;
|
|
5335
5427
|
SummerfiUnsub?: undefined;
|
|
5336
5428
|
SummerfiUnsubV2?: undefined;
|
|
5429
|
+
AaveV4Supply?: undefined;
|
|
5430
|
+
AaveV4Withdraw?: undefined;
|
|
5431
|
+
AaveV4Borrow?: undefined;
|
|
5432
|
+
AaveV4Payback?: undefined;
|
|
5433
|
+
AaveV4CollateralSwitch?: undefined;
|
|
5434
|
+
AaveV4RefreshPremium?: undefined;
|
|
5337
5435
|
AaveV3RatioTrigger?: undefined;
|
|
5338
5436
|
GasFeeTakerL2?: undefined;
|
|
5339
5437
|
AaveV3RatioCheck?: undefined;
|
|
@@ -5617,6 +5715,12 @@ declare const _default: {
|
|
|
5617
5715
|
SFApproveTokens: string;
|
|
5618
5716
|
SummerfiUnsub: string;
|
|
5619
5717
|
SummerfiUnsubV2: string;
|
|
5718
|
+
AaveV4Supply: string;
|
|
5719
|
+
AaveV4Withdraw: string;
|
|
5720
|
+
AaveV4Borrow: string;
|
|
5721
|
+
AaveV4Payback: string;
|
|
5722
|
+
AaveV4CollateralSwitch: string;
|
|
5723
|
+
AaveV4RefreshPremium: string;
|
|
5620
5724
|
AaveV3DelegateCredit?: undefined;
|
|
5621
5725
|
AaveV3RatioTrigger?: undefined;
|
|
5622
5726
|
GasFeeTakerL2?: undefined;
|
|
@@ -5903,6 +6007,12 @@ declare const _default: {
|
|
|
5903
6007
|
UmbrellaClaimRewards?: undefined;
|
|
5904
6008
|
UmbrellaStake?: undefined;
|
|
5905
6009
|
UmbrellaUnstake?: undefined;
|
|
6010
|
+
AaveV4Supply?: undefined;
|
|
6011
|
+
AaveV4Withdraw?: undefined;
|
|
6012
|
+
AaveV4Borrow?: undefined;
|
|
6013
|
+
AaveV4Payback?: undefined;
|
|
6014
|
+
AaveV4CollateralSwitch?: undefined;
|
|
6015
|
+
AaveV4RefreshPremium?: undefined;
|
|
5906
6016
|
MorphoBlueView?: undefined;
|
|
5907
6017
|
} | {
|
|
5908
6018
|
DFSSell: string;
|
|
@@ -6184,6 +6294,12 @@ declare const _default: {
|
|
|
6184
6294
|
UmbrellaClaimRewards?: undefined;
|
|
6185
6295
|
UmbrellaStake?: undefined;
|
|
6186
6296
|
UmbrellaUnstake?: undefined;
|
|
6297
|
+
AaveV4Supply?: undefined;
|
|
6298
|
+
AaveV4Withdraw?: undefined;
|
|
6299
|
+
AaveV4Borrow?: undefined;
|
|
6300
|
+
AaveV4Payback?: undefined;
|
|
6301
|
+
AaveV4CollateralSwitch?: undefined;
|
|
6302
|
+
AaveV4RefreshPremium?: undefined;
|
|
6187
6303
|
AaveV3DelegateCredit?: undefined;
|
|
6188
6304
|
AaveV3RatioTrigger?: undefined;
|
|
6189
6305
|
} | {
|
|
@@ -6465,6 +6581,12 @@ declare const _default: {
|
|
|
6465
6581
|
UmbrellaClaimRewards?: undefined;
|
|
6466
6582
|
UmbrellaStake?: undefined;
|
|
6467
6583
|
UmbrellaUnstake?: undefined;
|
|
6584
|
+
AaveV4Supply?: undefined;
|
|
6585
|
+
AaveV4Withdraw?: undefined;
|
|
6586
|
+
AaveV4Borrow?: undefined;
|
|
6587
|
+
AaveV4Payback?: undefined;
|
|
6588
|
+
AaveV4CollateralSwitch?: undefined;
|
|
6589
|
+
AaveV4RefreshPremium?: undefined;
|
|
6468
6590
|
AaveV3DelegateCredit?: undefined;
|
|
6469
6591
|
AaveV3RatioTrigger?: undefined;
|
|
6470
6592
|
AaveV3RatioCheck?: undefined;
|
|
@@ -6746,6 +6868,12 @@ declare const _default: {
|
|
|
6746
6868
|
SFApproveTokens?: undefined;
|
|
6747
6869
|
SummerfiUnsub?: undefined;
|
|
6748
6870
|
SummerfiUnsubV2?: undefined;
|
|
6871
|
+
AaveV4Supply?: undefined;
|
|
6872
|
+
AaveV4Withdraw?: undefined;
|
|
6873
|
+
AaveV4Borrow?: undefined;
|
|
6874
|
+
AaveV4Payback?: undefined;
|
|
6875
|
+
AaveV4CollateralSwitch?: undefined;
|
|
6876
|
+
AaveV4RefreshPremium?: undefined;
|
|
6749
6877
|
AaveV3RatioTrigger?: undefined;
|
|
6750
6878
|
GasFeeTakerL2?: undefined;
|
|
6751
6879
|
AaveV3RatioCheck?: undefined;
|
|
@@ -7028,6 +7156,12 @@ declare const _default: {
|
|
|
7028
7156
|
SFApproveTokens?: undefined;
|
|
7029
7157
|
SummerfiUnsub?: undefined;
|
|
7030
7158
|
SummerfiUnsubV2?: undefined;
|
|
7159
|
+
AaveV4Supply?: undefined;
|
|
7160
|
+
AaveV4Withdraw?: undefined;
|
|
7161
|
+
AaveV4Borrow?: undefined;
|
|
7162
|
+
AaveV4Payback?: undefined;
|
|
7163
|
+
AaveV4CollateralSwitch?: undefined;
|
|
7164
|
+
AaveV4RefreshPremium?: undefined;
|
|
7031
7165
|
AaveV3RatioTrigger?: undefined;
|
|
7032
7166
|
GasFeeTakerL2?: undefined;
|
|
7033
7167
|
AaveV3RatioCheck?: undefined;
|
|
@@ -7036,7 +7170,6 @@ declare const _default: {
|
|
|
7036
7170
|
};
|
|
7037
7171
|
otherAddresses: (chainId?: null) => {
|
|
7038
7172
|
RecipeExecutor: string;
|
|
7039
|
-
RecipeExecutorForTxSaver: string;
|
|
7040
7173
|
DFSRegistry: string;
|
|
7041
7174
|
DFSProxyRegistry: string;
|
|
7042
7175
|
ProxyRegistry: string;
|
|
@@ -7059,7 +7192,6 @@ declare const _default: {
|
|
|
7059
7192
|
DefisaverLogger?: undefined;
|
|
7060
7193
|
} | {
|
|
7061
7194
|
RecipeExecutor: string;
|
|
7062
|
-
RecipeExecutorForTxSaver: string;
|
|
7063
7195
|
DFSRegistry: string;
|
|
7064
7196
|
ProxyRegistry: string;
|
|
7065
7197
|
SFProxyEntryPoint: string;
|
|
@@ -7082,7 +7214,6 @@ declare const _default: {
|
|
|
7082
7214
|
BLUSD?: undefined;
|
|
7083
7215
|
} | {
|
|
7084
7216
|
RecipeExecutor: string;
|
|
7085
|
-
RecipeExecutorForTxSaver: string;
|
|
7086
7217
|
DFSRegistry: string;
|
|
7087
7218
|
ProxyRegistry: string;
|
|
7088
7219
|
SFProxyEntryPoint: string;
|
|
@@ -7110,7 +7241,6 @@ declare const _default: {
|
|
|
7110
7241
|
AdminVault: string;
|
|
7111
7242
|
DefisaverLogger: string;
|
|
7112
7243
|
Empty: string;
|
|
7113
|
-
RecipeExecutorForTxSaver?: undefined;
|
|
7114
7244
|
DFSProxyRegistry?: undefined;
|
|
7115
7245
|
ProxyRegistry?: undefined;
|
|
7116
7246
|
SFProxyEntryPoint?: undefined;
|
|
@@ -7132,7 +7262,6 @@ declare const _default: {
|
|
|
7132
7262
|
AdminVault: string;
|
|
7133
7263
|
DefisaverLogger: string;
|
|
7134
7264
|
Empty: string;
|
|
7135
|
-
RecipeExecutorForTxSaver?: undefined;
|
|
7136
7265
|
DFSProxyRegistry?: undefined;
|
|
7137
7266
|
ProxyRegistry?: undefined;
|
|
7138
7267
|
SFProxyEntryPoint?: undefined;
|
|
@@ -7153,7 +7282,6 @@ declare const _default: {
|
|
|
7153
7282
|
otherAddressesAllChains: {
|
|
7154
7283
|
[x: number]: {
|
|
7155
7284
|
RecipeExecutor: string;
|
|
7156
|
-
RecipeExecutorForTxSaver: string;
|
|
7157
7285
|
DFSRegistry: string;
|
|
7158
7286
|
DFSProxyRegistry: string;
|
|
7159
7287
|
ProxyRegistry: string;
|
|
@@ -7176,7 +7304,6 @@ declare const _default: {
|
|
|
7176
7304
|
DefisaverLogger?: undefined;
|
|
7177
7305
|
} | {
|
|
7178
7306
|
RecipeExecutor: string;
|
|
7179
|
-
RecipeExecutorForTxSaver: string;
|
|
7180
7307
|
DFSRegistry: string;
|
|
7181
7308
|
ProxyRegistry: string;
|
|
7182
7309
|
SFProxyEntryPoint: string;
|
|
@@ -7199,7 +7326,6 @@ declare const _default: {
|
|
|
7199
7326
|
BLUSD?: undefined;
|
|
7200
7327
|
} | {
|
|
7201
7328
|
RecipeExecutor: string;
|
|
7202
|
-
RecipeExecutorForTxSaver: string;
|
|
7203
7329
|
DFSRegistry: string;
|
|
7204
7330
|
ProxyRegistry: string;
|
|
7205
7331
|
SFProxyEntryPoint: string;
|
|
@@ -7227,7 +7353,6 @@ declare const _default: {
|
|
|
7227
7353
|
AdminVault: string;
|
|
7228
7354
|
DefisaverLogger: string;
|
|
7229
7355
|
Empty: string;
|
|
7230
|
-
RecipeExecutorForTxSaver?: undefined;
|
|
7231
7356
|
DFSProxyRegistry?: undefined;
|
|
7232
7357
|
ProxyRegistry?: undefined;
|
|
7233
7358
|
SFProxyEntryPoint?: undefined;
|
|
@@ -7249,7 +7374,6 @@ declare const _default: {
|
|
|
7249
7374
|
AdminVault: string;
|
|
7250
7375
|
DefisaverLogger: string;
|
|
7251
7376
|
Empty: string;
|
|
7252
|
-
RecipeExecutorForTxSaver?: undefined;
|
|
7253
7377
|
DFSProxyRegistry?: undefined;
|
|
7254
7378
|
ProxyRegistry?: undefined;
|
|
7255
7379
|
SFProxyEntryPoint?: undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Action } from '../Action';
|
|
2
|
+
import { EthAddress, uint256 } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* AaveV4QuotePriceRangeTrigger - Verifies if current token price ratio for aaveV4 spoke is within a subbed price range.
|
|
5
|
+
*
|
|
6
|
+
* @category Triggers
|
|
7
|
+
*/
|
|
8
|
+
export declare class AaveV4QuotePriceRangeTrigger extends Action {
|
|
9
|
+
constructor(spoke: EthAddress, baseTokenId: uint256, quoteTokenId: uint256, lowerPrice: uint256, upperPrice: uint256);
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from '../Action';
|
|
2
|
+
import { getAddr } from '../addresses';
|
|
3
|
+
/**
|
|
4
|
+
* AaveV4QuotePriceRangeTrigger - Verifies if current token price ratio for aaveV4 spoke is within a subbed price range.
|
|
5
|
+
*
|
|
6
|
+
* @category Triggers
|
|
7
|
+
*/
|
|
8
|
+
export class AaveV4QuotePriceRangeTrigger extends Action {
|
|
9
|
+
constructor(spoke, baseTokenId, quoteTokenId, lowerPrice, upperPrice) {
|
|
10
|
+
super('AaveV4QuotePriceRangeTrigger', getAddr('Empty'), [['address', 'uint256', 'uint256', 'uint256', 'uint256']], [[spoke, baseTokenId, quoteTokenId, lowerPrice, upperPrice]]);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Action } from '../Action';
|
|
2
|
+
import { EthAddress, uint256, uint8 } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* AaveV4QuotePriceTrigger - Verifies if current token price ratio for aaveV4 spoke is over/under a subbed price ratio.
|
|
5
|
+
*
|
|
6
|
+
* @category Triggers
|
|
7
|
+
*/
|
|
8
|
+
export declare class AaveV4QuotePriceTrigger extends Action {
|
|
9
|
+
constructor(spoke: EthAddress, baseTokenId: uint256, quoteTokenId: uint256, price: uint256, state: uint8);
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from '../Action';
|
|
2
|
+
import { getAddr } from '../addresses';
|
|
3
|
+
/**
|
|
4
|
+
* AaveV4QuotePriceTrigger - Verifies if current token price ratio for aaveV4 spoke is over/under a subbed price ratio.
|
|
5
|
+
*
|
|
6
|
+
* @category Triggers
|
|
7
|
+
*/
|
|
8
|
+
export class AaveV4QuotePriceTrigger extends Action {
|
|
9
|
+
constructor(spoke, baseTokenId, quoteTokenId, price, state) {
|
|
10
|
+
super('AaveV4QuotePriceTrigger', getAddr('Empty'), [['address', 'uint256', 'uint256', 'uint256', 'uint8']], [[spoke, baseTokenId, quoteTokenId, price, state]]);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Action } from '../Action';
|
|
2
|
+
import { EthAddress, uint256, uint8 } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* AaveV4RatioTrigger - Triggers when the user's ratio is over/under a subbed ratio.
|
|
5
|
+
*
|
|
6
|
+
* @category Triggers
|
|
7
|
+
*/
|
|
8
|
+
export declare class AaveV4RatioTrigger extends Action {
|
|
9
|
+
constructor(user: EthAddress, spoke: EthAddress, ratio: uint256, state: uint8);
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from '../Action';
|
|
2
|
+
import { getAddr } from '../addresses';
|
|
3
|
+
/**
|
|
4
|
+
* AaveV4RatioTrigger - Triggers when the user's ratio is over/under a subbed ratio.
|
|
5
|
+
*
|
|
6
|
+
* @category Triggers
|
|
7
|
+
*/
|
|
8
|
+
export class AaveV4RatioTrigger extends Action {
|
|
9
|
+
constructor(user, spoke, ratio, state) {
|
|
10
|
+
super('AaveV4RatioTrigger', getAddr('Empty'), [['address', 'address', 'uint256', 'uint8']], [[user, spoke, ratio, state]]);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -31,3 +31,6 @@ export * from './LiquityV2AdjustRateDebtInFrontTrigger';
|
|
|
31
31
|
export * from './AaveV3QuotePriceRangeTrigger';
|
|
32
32
|
export * from './SparkQuotePriceRangeTrigger';
|
|
33
33
|
export * from './MorphoBluePriceRangeTrigger';
|
|
34
|
+
export * from './AaveV4QuotePriceTrigger';
|
|
35
|
+
export * from './AaveV4QuotePriceRangeTrigger';
|
|
36
|
+
export * from './AaveV4RatioTrigger';
|
|
@@ -31,3 +31,6 @@ export * from './LiquityV2AdjustRateDebtInFrontTrigger';
|
|
|
31
31
|
export * from './AaveV3QuotePriceRangeTrigger';
|
|
32
32
|
export * from './SparkQuotePriceRangeTrigger';
|
|
33
33
|
export * from './MorphoBluePriceRangeTrigger';
|
|
34
|
+
export * from './AaveV4QuotePriceTrigger';
|
|
35
|
+
export * from './AaveV4QuotePriceRangeTrigger';
|
|
36
|
+
export * from './AaveV4RatioTrigger';
|
package/package.json
CHANGED
package/src/Recipe.ts
CHANGED
|
@@ -143,7 +143,7 @@ export class Recipe {
|
|
|
143
143
|
data.shouldTakeFeeFromPosition,
|
|
144
144
|
];
|
|
145
145
|
return [
|
|
146
|
-
|
|
146
|
+
this.recipeExecutorAddress,
|
|
147
147
|
// @ts-expect-error Interface of AbiCoder is wrong :(
|
|
148
148
|
AbiCoder.encodeFunctionCall(executeTaskAbi, [encodedRecipe, encodedTxSaverData]),
|
|
149
149
|
];
|
package/src/Strategy.ts
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
import { EthAddress, uint256 } from '../../types';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* AaveV4BorrowAction
|
|
7
|
+
*
|
|
8
|
+
* @category AaveV4
|
|
9
|
+
*/
|
|
10
|
+
export class AaveV4BorrowAction extends Action {
|
|
11
|
+
/**
|
|
12
|
+
* @param spoke Address of the spoke.
|
|
13
|
+
* @param onBehalf Address to borrow tokens on behalf of. Defaults to the user's wallet if not provided.
|
|
14
|
+
* @param to Address that will receive the borrowed tokens.
|
|
15
|
+
* @param reserveId Reserve id.
|
|
16
|
+
* @param amount Amount of tokens to borrow.
|
|
17
|
+
*/
|
|
18
|
+
constructor(
|
|
19
|
+
spoke: EthAddress,
|
|
20
|
+
onBehalf: EthAddress,
|
|
21
|
+
to: EthAddress,
|
|
22
|
+
reserveId: uint256,
|
|
23
|
+
amount: uint256,
|
|
24
|
+
) {
|
|
25
|
+
super(
|
|
26
|
+
'AaveV4Borrow',
|
|
27
|
+
getAddr('AaveV4Borrow'),
|
|
28
|
+
['address', 'address', 'address', 'uint256', 'uint256'],
|
|
29
|
+
[spoke, onBehalf, to, reserveId, amount],
|
|
30
|
+
);
|
|
31
|
+
this.mappableArgs = [
|
|
32
|
+
this.args[0],
|
|
33
|
+
this.args[1],
|
|
34
|
+
this.args[2],
|
|
35
|
+
this.args[3],
|
|
36
|
+
this.args[4],
|
|
37
|
+
];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
import { EthAddress, uint256 } from '../../types';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* AaveV4CollateralSwitchAction
|
|
7
|
+
*
|
|
8
|
+
* @category AaveV4
|
|
9
|
+
*/
|
|
10
|
+
export class AaveV4CollateralSwitchAction extends Action {
|
|
11
|
+
/**
|
|
12
|
+
* @param spoke Address of the spoke.
|
|
13
|
+
* @param onBehalf Address to switch collateral on behalf of. Defaults to the user's wallet if not provided.
|
|
14
|
+
* @param reserveId Reserve id.
|
|
15
|
+
* @param useAsCollateral Whether to use the tokens as collateral.
|
|
16
|
+
*/
|
|
17
|
+
constructor(
|
|
18
|
+
spoke: EthAddress,
|
|
19
|
+
onBehalf: EthAddress,
|
|
20
|
+
reserveId: uint256,
|
|
21
|
+
useAsCollateral: boolean,
|
|
22
|
+
) {
|
|
23
|
+
super(
|
|
24
|
+
'AaveV4CollateralSwitch',
|
|
25
|
+
getAddr('AaveV4CollateralSwitch'),
|
|
26
|
+
['address', 'address', 'uint256', 'bool'],
|
|
27
|
+
[spoke, onBehalf, reserveId, useAsCollateral],
|
|
28
|
+
);
|
|
29
|
+
this.mappableArgs = [
|
|
30
|
+
this.args[0],
|
|
31
|
+
this.args[1],
|
|
32
|
+
this.args[2],
|
|
33
|
+
this.args[3],
|
|
34
|
+
];
|
|
35
|
+
}
|
|
36
|
+
}
|