@defisaver/sdk 1.3.17 → 1.3.18-aave-v4-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/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 +6 -0
- package/esm/src/actions/aavev4/index.js +6 -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 +30 -5
- package/esm/src/addresses.js +6 -4
- package/esm/src/index.d.ts +120 -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/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 +6 -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 +7 -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 +960 -585
package/esm/src/index.d.ts
CHANGED
|
@@ -288,6 +288,11 @@ 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;
|
|
291
296
|
AaveV3DelegateCredit?: undefined;
|
|
292
297
|
AaveV3RatioTrigger?: undefined;
|
|
293
298
|
GasFeeTakerL2?: undefined;
|
|
@@ -574,6 +579,11 @@ declare const actionAddressesAllChains: {
|
|
|
574
579
|
UmbrellaClaimRewards?: undefined;
|
|
575
580
|
UmbrellaStake?: undefined;
|
|
576
581
|
UmbrellaUnstake?: undefined;
|
|
582
|
+
AaveV4Supply?: undefined;
|
|
583
|
+
AaveV4Withdraw?: undefined;
|
|
584
|
+
AaveV4Borrow?: undefined;
|
|
585
|
+
AaveV4Payback?: undefined;
|
|
586
|
+
AaveV4CollateralSwitch?: undefined;
|
|
577
587
|
MorphoBlueView?: undefined;
|
|
578
588
|
} | {
|
|
579
589
|
DFSSell: string;
|
|
@@ -855,6 +865,11 @@ declare const actionAddressesAllChains: {
|
|
|
855
865
|
UmbrellaClaimRewards?: undefined;
|
|
856
866
|
UmbrellaStake?: undefined;
|
|
857
867
|
UmbrellaUnstake?: undefined;
|
|
868
|
+
AaveV4Supply?: undefined;
|
|
869
|
+
AaveV4Withdraw?: undefined;
|
|
870
|
+
AaveV4Borrow?: undefined;
|
|
871
|
+
AaveV4Payback?: undefined;
|
|
872
|
+
AaveV4CollateralSwitch?: undefined;
|
|
858
873
|
AaveV3DelegateCredit?: undefined;
|
|
859
874
|
AaveV3RatioTrigger?: undefined;
|
|
860
875
|
} | {
|
|
@@ -1136,6 +1151,11 @@ declare const actionAddressesAllChains: {
|
|
|
1136
1151
|
UmbrellaClaimRewards?: undefined;
|
|
1137
1152
|
UmbrellaStake?: undefined;
|
|
1138
1153
|
UmbrellaUnstake?: undefined;
|
|
1154
|
+
AaveV4Supply?: undefined;
|
|
1155
|
+
AaveV4Withdraw?: undefined;
|
|
1156
|
+
AaveV4Borrow?: undefined;
|
|
1157
|
+
AaveV4Payback?: undefined;
|
|
1158
|
+
AaveV4CollateralSwitch?: undefined;
|
|
1139
1159
|
AaveV3DelegateCredit?: undefined;
|
|
1140
1160
|
AaveV3RatioTrigger?: undefined;
|
|
1141
1161
|
AaveV3RatioCheck?: undefined;
|
|
@@ -1417,6 +1437,11 @@ declare const actionAddressesAllChains: {
|
|
|
1417
1437
|
SFApproveTokens?: undefined;
|
|
1418
1438
|
SummerfiUnsub?: undefined;
|
|
1419
1439
|
SummerfiUnsubV2?: undefined;
|
|
1440
|
+
AaveV4Supply?: undefined;
|
|
1441
|
+
AaveV4Withdraw?: undefined;
|
|
1442
|
+
AaveV4Borrow?: undefined;
|
|
1443
|
+
AaveV4Payback?: undefined;
|
|
1444
|
+
AaveV4CollateralSwitch?: undefined;
|
|
1420
1445
|
AaveV3RatioTrigger?: undefined;
|
|
1421
1446
|
GasFeeTakerL2?: undefined;
|
|
1422
1447
|
AaveV3RatioCheck?: undefined;
|
|
@@ -1699,6 +1724,11 @@ declare const actionAddressesAllChains: {
|
|
|
1699
1724
|
SFApproveTokens?: undefined;
|
|
1700
1725
|
SummerfiUnsub?: undefined;
|
|
1701
1726
|
SummerfiUnsubV2?: undefined;
|
|
1727
|
+
AaveV4Supply?: undefined;
|
|
1728
|
+
AaveV4Withdraw?: undefined;
|
|
1729
|
+
AaveV4Borrow?: undefined;
|
|
1730
|
+
AaveV4Payback?: undefined;
|
|
1731
|
+
AaveV4CollateralSwitch?: undefined;
|
|
1702
1732
|
AaveV3RatioTrigger?: undefined;
|
|
1703
1733
|
GasFeeTakerL2?: undefined;
|
|
1704
1734
|
AaveV3RatioCheck?: undefined;
|
|
@@ -1982,6 +2012,11 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
1982
2012
|
SFApproveTokens: string;
|
|
1983
2013
|
SummerfiUnsub: string;
|
|
1984
2014
|
SummerfiUnsubV2: string;
|
|
2015
|
+
AaveV4Supply: string;
|
|
2016
|
+
AaveV4Withdraw: string;
|
|
2017
|
+
AaveV4Borrow: string;
|
|
2018
|
+
AaveV4Payback: string;
|
|
2019
|
+
AaveV4CollateralSwitch: string;
|
|
1985
2020
|
AaveV3DelegateCredit?: undefined;
|
|
1986
2021
|
AaveV3RatioTrigger?: undefined;
|
|
1987
2022
|
GasFeeTakerL2?: undefined;
|
|
@@ -2268,6 +2303,11 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2268
2303
|
UmbrellaClaimRewards?: undefined;
|
|
2269
2304
|
UmbrellaStake?: undefined;
|
|
2270
2305
|
UmbrellaUnstake?: undefined;
|
|
2306
|
+
AaveV4Supply?: undefined;
|
|
2307
|
+
AaveV4Withdraw?: undefined;
|
|
2308
|
+
AaveV4Borrow?: undefined;
|
|
2309
|
+
AaveV4Payback?: undefined;
|
|
2310
|
+
AaveV4CollateralSwitch?: undefined;
|
|
2271
2311
|
MorphoBlueView?: undefined;
|
|
2272
2312
|
} | {
|
|
2273
2313
|
DFSSell: string;
|
|
@@ -2549,6 +2589,11 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2549
2589
|
UmbrellaClaimRewards?: undefined;
|
|
2550
2590
|
UmbrellaStake?: undefined;
|
|
2551
2591
|
UmbrellaUnstake?: undefined;
|
|
2592
|
+
AaveV4Supply?: undefined;
|
|
2593
|
+
AaveV4Withdraw?: undefined;
|
|
2594
|
+
AaveV4Borrow?: undefined;
|
|
2595
|
+
AaveV4Payback?: undefined;
|
|
2596
|
+
AaveV4CollateralSwitch?: undefined;
|
|
2552
2597
|
AaveV3DelegateCredit?: undefined;
|
|
2553
2598
|
AaveV3RatioTrigger?: undefined;
|
|
2554
2599
|
} | {
|
|
@@ -2830,6 +2875,11 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2830
2875
|
UmbrellaClaimRewards?: undefined;
|
|
2831
2876
|
UmbrellaStake?: undefined;
|
|
2832
2877
|
UmbrellaUnstake?: undefined;
|
|
2878
|
+
AaveV4Supply?: undefined;
|
|
2879
|
+
AaveV4Withdraw?: undefined;
|
|
2880
|
+
AaveV4Borrow?: undefined;
|
|
2881
|
+
AaveV4Payback?: undefined;
|
|
2882
|
+
AaveV4CollateralSwitch?: undefined;
|
|
2833
2883
|
AaveV3DelegateCredit?: undefined;
|
|
2834
2884
|
AaveV3RatioTrigger?: undefined;
|
|
2835
2885
|
AaveV3RatioCheck?: undefined;
|
|
@@ -3111,6 +3161,11 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
3111
3161
|
SFApproveTokens?: undefined;
|
|
3112
3162
|
SummerfiUnsub?: undefined;
|
|
3113
3163
|
SummerfiUnsubV2?: undefined;
|
|
3164
|
+
AaveV4Supply?: undefined;
|
|
3165
|
+
AaveV4Withdraw?: undefined;
|
|
3166
|
+
AaveV4Borrow?: undefined;
|
|
3167
|
+
AaveV4Payback?: undefined;
|
|
3168
|
+
AaveV4CollateralSwitch?: undefined;
|
|
3114
3169
|
AaveV3RatioTrigger?: undefined;
|
|
3115
3170
|
GasFeeTakerL2?: undefined;
|
|
3116
3171
|
AaveV3RatioCheck?: undefined;
|
|
@@ -3393,6 +3448,11 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
3393
3448
|
SFApproveTokens?: undefined;
|
|
3394
3449
|
SummerfiUnsub?: undefined;
|
|
3395
3450
|
SummerfiUnsubV2?: undefined;
|
|
3451
|
+
AaveV4Supply?: undefined;
|
|
3452
|
+
AaveV4Withdraw?: undefined;
|
|
3453
|
+
AaveV4Borrow?: undefined;
|
|
3454
|
+
AaveV4Payback?: undefined;
|
|
3455
|
+
AaveV4CollateralSwitch?: undefined;
|
|
3396
3456
|
AaveV3RatioTrigger?: undefined;
|
|
3397
3457
|
GasFeeTakerL2?: undefined;
|
|
3398
3458
|
AaveV3RatioCheck?: undefined;
|
|
@@ -3401,7 +3461,6 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
3401
3461
|
declare const otherAddressesAllChains: {
|
|
3402
3462
|
[x: number]: {
|
|
3403
3463
|
RecipeExecutor: string;
|
|
3404
|
-
RecipeExecutorForTxSaver: string;
|
|
3405
3464
|
DFSRegistry: string;
|
|
3406
3465
|
DFSProxyRegistry: string;
|
|
3407
3466
|
ProxyRegistry: string;
|
|
@@ -3424,7 +3483,6 @@ declare const otherAddressesAllChains: {
|
|
|
3424
3483
|
DefisaverLogger?: undefined;
|
|
3425
3484
|
} | {
|
|
3426
3485
|
RecipeExecutor: string;
|
|
3427
|
-
RecipeExecutorForTxSaver: string;
|
|
3428
3486
|
DFSRegistry: string;
|
|
3429
3487
|
ProxyRegistry: string;
|
|
3430
3488
|
SFProxyEntryPoint: string;
|
|
@@ -3447,7 +3505,6 @@ declare const otherAddressesAllChains: {
|
|
|
3447
3505
|
BLUSD?: undefined;
|
|
3448
3506
|
} | {
|
|
3449
3507
|
RecipeExecutor: string;
|
|
3450
|
-
RecipeExecutorForTxSaver: string;
|
|
3451
3508
|
DFSRegistry: string;
|
|
3452
3509
|
ProxyRegistry: string;
|
|
3453
3510
|
SFProxyEntryPoint: string;
|
|
@@ -3475,7 +3532,6 @@ declare const otherAddressesAllChains: {
|
|
|
3475
3532
|
AdminVault: string;
|
|
3476
3533
|
DefisaverLogger: string;
|
|
3477
3534
|
Empty: string;
|
|
3478
|
-
RecipeExecutorForTxSaver?: undefined;
|
|
3479
3535
|
DFSProxyRegistry?: undefined;
|
|
3480
3536
|
ProxyRegistry?: undefined;
|
|
3481
3537
|
SFProxyEntryPoint?: undefined;
|
|
@@ -3497,7 +3553,6 @@ declare const otherAddressesAllChains: {
|
|
|
3497
3553
|
AdminVault: string;
|
|
3498
3554
|
DefisaverLogger: string;
|
|
3499
3555
|
Empty: string;
|
|
3500
|
-
RecipeExecutorForTxSaver?: undefined;
|
|
3501
3556
|
DFSProxyRegistry?: undefined;
|
|
3502
3557
|
ProxyRegistry?: undefined;
|
|
3503
3558
|
SFProxyEntryPoint?: undefined;
|
|
@@ -3518,7 +3573,6 @@ declare const otherAddressesAllChains: {
|
|
|
3518
3573
|
};
|
|
3519
3574
|
declare const otherAddresses: (chainId?: null) => {
|
|
3520
3575
|
RecipeExecutor: string;
|
|
3521
|
-
RecipeExecutorForTxSaver: string;
|
|
3522
3576
|
DFSRegistry: string;
|
|
3523
3577
|
DFSProxyRegistry: string;
|
|
3524
3578
|
ProxyRegistry: string;
|
|
@@ -3541,7 +3595,6 @@ declare const otherAddresses: (chainId?: null) => {
|
|
|
3541
3595
|
DefisaverLogger?: undefined;
|
|
3542
3596
|
} | {
|
|
3543
3597
|
RecipeExecutor: string;
|
|
3544
|
-
RecipeExecutorForTxSaver: string;
|
|
3545
3598
|
DFSRegistry: string;
|
|
3546
3599
|
ProxyRegistry: string;
|
|
3547
3600
|
SFProxyEntryPoint: string;
|
|
@@ -3564,7 +3617,6 @@ declare const otherAddresses: (chainId?: null) => {
|
|
|
3564
3617
|
BLUSD?: undefined;
|
|
3565
3618
|
} | {
|
|
3566
3619
|
RecipeExecutor: string;
|
|
3567
|
-
RecipeExecutorForTxSaver: string;
|
|
3568
3620
|
DFSRegistry: string;
|
|
3569
3621
|
ProxyRegistry: string;
|
|
3570
3622
|
SFProxyEntryPoint: string;
|
|
@@ -3592,7 +3644,6 @@ declare const otherAddresses: (chainId?: null) => {
|
|
|
3592
3644
|
AdminVault: string;
|
|
3593
3645
|
DefisaverLogger: string;
|
|
3594
3646
|
Empty: string;
|
|
3595
|
-
RecipeExecutorForTxSaver?: undefined;
|
|
3596
3647
|
DFSProxyRegistry?: undefined;
|
|
3597
3648
|
ProxyRegistry?: undefined;
|
|
3598
3649
|
SFProxyEntryPoint?: undefined;
|
|
@@ -3614,7 +3665,6 @@ declare const otherAddresses: (chainId?: null) => {
|
|
|
3614
3665
|
AdminVault: string;
|
|
3615
3666
|
DefisaverLogger: string;
|
|
3616
3667
|
Empty: string;
|
|
3617
|
-
RecipeExecutorForTxSaver?: undefined;
|
|
3618
3668
|
DFSProxyRegistry?: undefined;
|
|
3619
3669
|
ProxyRegistry?: undefined;
|
|
3620
3670
|
SFProxyEntryPoint?: undefined;
|
|
@@ -3923,6 +3973,11 @@ declare const _default: {
|
|
|
3923
3973
|
SFApproveTokens: string;
|
|
3924
3974
|
SummerfiUnsub: string;
|
|
3925
3975
|
SummerfiUnsubV2: string;
|
|
3976
|
+
AaveV4Supply: string;
|
|
3977
|
+
AaveV4Withdraw: string;
|
|
3978
|
+
AaveV4Borrow: string;
|
|
3979
|
+
AaveV4Payback: string;
|
|
3980
|
+
AaveV4CollateralSwitch: string;
|
|
3926
3981
|
AaveV3DelegateCredit?: undefined;
|
|
3927
3982
|
AaveV3RatioTrigger?: undefined;
|
|
3928
3983
|
GasFeeTakerL2?: undefined;
|
|
@@ -4209,6 +4264,11 @@ declare const _default: {
|
|
|
4209
4264
|
UmbrellaClaimRewards?: undefined;
|
|
4210
4265
|
UmbrellaStake?: undefined;
|
|
4211
4266
|
UmbrellaUnstake?: undefined;
|
|
4267
|
+
AaveV4Supply?: undefined;
|
|
4268
|
+
AaveV4Withdraw?: undefined;
|
|
4269
|
+
AaveV4Borrow?: undefined;
|
|
4270
|
+
AaveV4Payback?: undefined;
|
|
4271
|
+
AaveV4CollateralSwitch?: undefined;
|
|
4212
4272
|
MorphoBlueView?: undefined;
|
|
4213
4273
|
} | {
|
|
4214
4274
|
DFSSell: string;
|
|
@@ -4490,6 +4550,11 @@ declare const _default: {
|
|
|
4490
4550
|
UmbrellaClaimRewards?: undefined;
|
|
4491
4551
|
UmbrellaStake?: undefined;
|
|
4492
4552
|
UmbrellaUnstake?: undefined;
|
|
4553
|
+
AaveV4Supply?: undefined;
|
|
4554
|
+
AaveV4Withdraw?: undefined;
|
|
4555
|
+
AaveV4Borrow?: undefined;
|
|
4556
|
+
AaveV4Payback?: undefined;
|
|
4557
|
+
AaveV4CollateralSwitch?: undefined;
|
|
4493
4558
|
AaveV3DelegateCredit?: undefined;
|
|
4494
4559
|
AaveV3RatioTrigger?: undefined;
|
|
4495
4560
|
} | {
|
|
@@ -4771,6 +4836,11 @@ declare const _default: {
|
|
|
4771
4836
|
UmbrellaClaimRewards?: undefined;
|
|
4772
4837
|
UmbrellaStake?: undefined;
|
|
4773
4838
|
UmbrellaUnstake?: undefined;
|
|
4839
|
+
AaveV4Supply?: undefined;
|
|
4840
|
+
AaveV4Withdraw?: undefined;
|
|
4841
|
+
AaveV4Borrow?: undefined;
|
|
4842
|
+
AaveV4Payback?: undefined;
|
|
4843
|
+
AaveV4CollateralSwitch?: undefined;
|
|
4774
4844
|
AaveV3DelegateCredit?: undefined;
|
|
4775
4845
|
AaveV3RatioTrigger?: undefined;
|
|
4776
4846
|
AaveV3RatioCheck?: undefined;
|
|
@@ -5052,6 +5122,11 @@ declare const _default: {
|
|
|
5052
5122
|
SFApproveTokens?: undefined;
|
|
5053
5123
|
SummerfiUnsub?: undefined;
|
|
5054
5124
|
SummerfiUnsubV2?: undefined;
|
|
5125
|
+
AaveV4Supply?: undefined;
|
|
5126
|
+
AaveV4Withdraw?: undefined;
|
|
5127
|
+
AaveV4Borrow?: undefined;
|
|
5128
|
+
AaveV4Payback?: undefined;
|
|
5129
|
+
AaveV4CollateralSwitch?: undefined;
|
|
5055
5130
|
AaveV3RatioTrigger?: undefined;
|
|
5056
5131
|
GasFeeTakerL2?: undefined;
|
|
5057
5132
|
AaveV3RatioCheck?: undefined;
|
|
@@ -5334,6 +5409,11 @@ declare const _default: {
|
|
|
5334
5409
|
SFApproveTokens?: undefined;
|
|
5335
5410
|
SummerfiUnsub?: undefined;
|
|
5336
5411
|
SummerfiUnsubV2?: undefined;
|
|
5412
|
+
AaveV4Supply?: undefined;
|
|
5413
|
+
AaveV4Withdraw?: undefined;
|
|
5414
|
+
AaveV4Borrow?: undefined;
|
|
5415
|
+
AaveV4Payback?: undefined;
|
|
5416
|
+
AaveV4CollateralSwitch?: undefined;
|
|
5337
5417
|
AaveV3RatioTrigger?: undefined;
|
|
5338
5418
|
GasFeeTakerL2?: undefined;
|
|
5339
5419
|
AaveV3RatioCheck?: undefined;
|
|
@@ -5617,6 +5697,11 @@ declare const _default: {
|
|
|
5617
5697
|
SFApproveTokens: string;
|
|
5618
5698
|
SummerfiUnsub: string;
|
|
5619
5699
|
SummerfiUnsubV2: string;
|
|
5700
|
+
AaveV4Supply: string;
|
|
5701
|
+
AaveV4Withdraw: string;
|
|
5702
|
+
AaveV4Borrow: string;
|
|
5703
|
+
AaveV4Payback: string;
|
|
5704
|
+
AaveV4CollateralSwitch: string;
|
|
5620
5705
|
AaveV3DelegateCredit?: undefined;
|
|
5621
5706
|
AaveV3RatioTrigger?: undefined;
|
|
5622
5707
|
GasFeeTakerL2?: undefined;
|
|
@@ -5903,6 +5988,11 @@ declare const _default: {
|
|
|
5903
5988
|
UmbrellaClaimRewards?: undefined;
|
|
5904
5989
|
UmbrellaStake?: undefined;
|
|
5905
5990
|
UmbrellaUnstake?: undefined;
|
|
5991
|
+
AaveV4Supply?: undefined;
|
|
5992
|
+
AaveV4Withdraw?: undefined;
|
|
5993
|
+
AaveV4Borrow?: undefined;
|
|
5994
|
+
AaveV4Payback?: undefined;
|
|
5995
|
+
AaveV4CollateralSwitch?: undefined;
|
|
5906
5996
|
MorphoBlueView?: undefined;
|
|
5907
5997
|
} | {
|
|
5908
5998
|
DFSSell: string;
|
|
@@ -6184,6 +6274,11 @@ declare const _default: {
|
|
|
6184
6274
|
UmbrellaClaimRewards?: undefined;
|
|
6185
6275
|
UmbrellaStake?: undefined;
|
|
6186
6276
|
UmbrellaUnstake?: undefined;
|
|
6277
|
+
AaveV4Supply?: undefined;
|
|
6278
|
+
AaveV4Withdraw?: undefined;
|
|
6279
|
+
AaveV4Borrow?: undefined;
|
|
6280
|
+
AaveV4Payback?: undefined;
|
|
6281
|
+
AaveV4CollateralSwitch?: undefined;
|
|
6187
6282
|
AaveV3DelegateCredit?: undefined;
|
|
6188
6283
|
AaveV3RatioTrigger?: undefined;
|
|
6189
6284
|
} | {
|
|
@@ -6465,6 +6560,11 @@ declare const _default: {
|
|
|
6465
6560
|
UmbrellaClaimRewards?: undefined;
|
|
6466
6561
|
UmbrellaStake?: undefined;
|
|
6467
6562
|
UmbrellaUnstake?: undefined;
|
|
6563
|
+
AaveV4Supply?: undefined;
|
|
6564
|
+
AaveV4Withdraw?: undefined;
|
|
6565
|
+
AaveV4Borrow?: undefined;
|
|
6566
|
+
AaveV4Payback?: undefined;
|
|
6567
|
+
AaveV4CollateralSwitch?: undefined;
|
|
6468
6568
|
AaveV3DelegateCredit?: undefined;
|
|
6469
6569
|
AaveV3RatioTrigger?: undefined;
|
|
6470
6570
|
AaveV3RatioCheck?: undefined;
|
|
@@ -6746,6 +6846,11 @@ declare const _default: {
|
|
|
6746
6846
|
SFApproveTokens?: undefined;
|
|
6747
6847
|
SummerfiUnsub?: undefined;
|
|
6748
6848
|
SummerfiUnsubV2?: undefined;
|
|
6849
|
+
AaveV4Supply?: undefined;
|
|
6850
|
+
AaveV4Withdraw?: undefined;
|
|
6851
|
+
AaveV4Borrow?: undefined;
|
|
6852
|
+
AaveV4Payback?: undefined;
|
|
6853
|
+
AaveV4CollateralSwitch?: undefined;
|
|
6749
6854
|
AaveV3RatioTrigger?: undefined;
|
|
6750
6855
|
GasFeeTakerL2?: undefined;
|
|
6751
6856
|
AaveV3RatioCheck?: undefined;
|
|
@@ -7028,6 +7133,11 @@ declare const _default: {
|
|
|
7028
7133
|
SFApproveTokens?: undefined;
|
|
7029
7134
|
SummerfiUnsub?: undefined;
|
|
7030
7135
|
SummerfiUnsubV2?: undefined;
|
|
7136
|
+
AaveV4Supply?: undefined;
|
|
7137
|
+
AaveV4Withdraw?: undefined;
|
|
7138
|
+
AaveV4Borrow?: undefined;
|
|
7139
|
+
AaveV4Payback?: undefined;
|
|
7140
|
+
AaveV4CollateralSwitch?: undefined;
|
|
7031
7141
|
AaveV3RatioTrigger?: undefined;
|
|
7032
7142
|
GasFeeTakerL2?: undefined;
|
|
7033
7143
|
AaveV3RatioCheck?: undefined;
|
|
@@ -7036,7 +7146,6 @@ declare const _default: {
|
|
|
7036
7146
|
};
|
|
7037
7147
|
otherAddresses: (chainId?: null) => {
|
|
7038
7148
|
RecipeExecutor: string;
|
|
7039
|
-
RecipeExecutorForTxSaver: string;
|
|
7040
7149
|
DFSRegistry: string;
|
|
7041
7150
|
DFSProxyRegistry: string;
|
|
7042
7151
|
ProxyRegistry: string;
|
|
@@ -7059,7 +7168,6 @@ declare const _default: {
|
|
|
7059
7168
|
DefisaverLogger?: undefined;
|
|
7060
7169
|
} | {
|
|
7061
7170
|
RecipeExecutor: string;
|
|
7062
|
-
RecipeExecutorForTxSaver: string;
|
|
7063
7171
|
DFSRegistry: string;
|
|
7064
7172
|
ProxyRegistry: string;
|
|
7065
7173
|
SFProxyEntryPoint: string;
|
|
@@ -7082,7 +7190,6 @@ declare const _default: {
|
|
|
7082
7190
|
BLUSD?: undefined;
|
|
7083
7191
|
} | {
|
|
7084
7192
|
RecipeExecutor: string;
|
|
7085
|
-
RecipeExecutorForTxSaver: string;
|
|
7086
7193
|
DFSRegistry: string;
|
|
7087
7194
|
ProxyRegistry: string;
|
|
7088
7195
|
SFProxyEntryPoint: string;
|
|
@@ -7110,7 +7217,6 @@ declare const _default: {
|
|
|
7110
7217
|
AdminVault: string;
|
|
7111
7218
|
DefisaverLogger: string;
|
|
7112
7219
|
Empty: string;
|
|
7113
|
-
RecipeExecutorForTxSaver?: undefined;
|
|
7114
7220
|
DFSProxyRegistry?: undefined;
|
|
7115
7221
|
ProxyRegistry?: undefined;
|
|
7116
7222
|
SFProxyEntryPoint?: undefined;
|
|
@@ -7132,7 +7238,6 @@ declare const _default: {
|
|
|
7132
7238
|
AdminVault: string;
|
|
7133
7239
|
DefisaverLogger: string;
|
|
7134
7240
|
Empty: string;
|
|
7135
|
-
RecipeExecutorForTxSaver?: undefined;
|
|
7136
7241
|
DFSProxyRegistry?: undefined;
|
|
7137
7242
|
ProxyRegistry?: undefined;
|
|
7138
7243
|
SFProxyEntryPoint?: undefined;
|
|
@@ -7153,7 +7258,6 @@ declare const _default: {
|
|
|
7153
7258
|
otherAddressesAllChains: {
|
|
7154
7259
|
[x: number]: {
|
|
7155
7260
|
RecipeExecutor: string;
|
|
7156
|
-
RecipeExecutorForTxSaver: string;
|
|
7157
7261
|
DFSRegistry: string;
|
|
7158
7262
|
DFSProxyRegistry: string;
|
|
7159
7263
|
ProxyRegistry: string;
|
|
@@ -7176,7 +7280,6 @@ declare const _default: {
|
|
|
7176
7280
|
DefisaverLogger?: undefined;
|
|
7177
7281
|
} | {
|
|
7178
7282
|
RecipeExecutor: string;
|
|
7179
|
-
RecipeExecutorForTxSaver: string;
|
|
7180
7283
|
DFSRegistry: string;
|
|
7181
7284
|
ProxyRegistry: string;
|
|
7182
7285
|
SFProxyEntryPoint: string;
|
|
@@ -7199,7 +7302,6 @@ declare const _default: {
|
|
|
7199
7302
|
BLUSD?: undefined;
|
|
7200
7303
|
} | {
|
|
7201
7304
|
RecipeExecutor: string;
|
|
7202
|
-
RecipeExecutorForTxSaver: string;
|
|
7203
7305
|
DFSRegistry: string;
|
|
7204
7306
|
ProxyRegistry: string;
|
|
7205
7307
|
SFProxyEntryPoint: string;
|
|
@@ -7227,7 +7329,6 @@ declare const _default: {
|
|
|
7227
7329
|
AdminVault: string;
|
|
7228
7330
|
DefisaverLogger: string;
|
|
7229
7331
|
Empty: string;
|
|
7230
|
-
RecipeExecutorForTxSaver?: undefined;
|
|
7231
7332
|
DFSProxyRegistry?: undefined;
|
|
7232
7333
|
ProxyRegistry?: undefined;
|
|
7233
7334
|
SFProxyEntryPoint?: undefined;
|
|
@@ -7249,7 +7350,6 @@ declare const _default: {
|
|
|
7249
7350
|
AdminVault: string;
|
|
7250
7351
|
DefisaverLogger: string;
|
|
7251
7352
|
Empty: string;
|
|
7252
|
-
RecipeExecutorForTxSaver?: undefined;
|
|
7253
7353
|
DFSProxyRegistry?: undefined;
|
|
7254
7354
|
ProxyRegistry?: undefined;
|
|
7255
7355
|
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
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { getAssetInfoByAddress } from '@defisaver/tokens';
|
|
2
|
+
import { Action } from '../../Action';
|
|
3
|
+
import { getAddr } from '../../addresses';
|
|
4
|
+
import { EthAddress, uint256 } from '../../types';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* AaveV4PaybackAction
|
|
8
|
+
*
|
|
9
|
+
* @category AaveV4
|
|
10
|
+
*/
|
|
11
|
+
export class AaveV4PaybackAction extends Action {
|
|
12
|
+
tokenForApproval: EthAddress;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @param spoke Address of the spoke.
|
|
16
|
+
* @param onBehalf Address to payback tokens on behalf of. Defaults to the user's wallet if not provided.
|
|
17
|
+
* @param from Address from which to pull the payback tokens.
|
|
18
|
+
* @param reserveId Reserve id.
|
|
19
|
+
* @param amount Amount of tokens to payback. Send type(uint).max to payback whole amount.
|
|
20
|
+
* @param tokenAddress Address of the token to approve. Optional, as it is only used for token approval, not part of encoding.
|
|
21
|
+
*/
|
|
22
|
+
constructor(
|
|
23
|
+
spoke: EthAddress,
|
|
24
|
+
onBehalf: EthAddress,
|
|
25
|
+
from: EthAddress,
|
|
26
|
+
reserveId: uint256,
|
|
27
|
+
amount: uint256,
|
|
28
|
+
tokenAddress: EthAddress = getAddr('Empty'),
|
|
29
|
+
) {
|
|
30
|
+
super(
|
|
31
|
+
'AaveV4Payback',
|
|
32
|
+
getAddr('AaveV4Payback'),
|
|
33
|
+
['address', 'address', 'address', 'uint256', 'uint256'],
|
|
34
|
+
[spoke, onBehalf, from, reserveId, amount],
|
|
35
|
+
);
|
|
36
|
+
this.mappableArgs = [
|
|
37
|
+
this.args[0],
|
|
38
|
+
this.args[1],
|
|
39
|
+
this.args[2],
|
|
40
|
+
this.args[3],
|
|
41
|
+
this.args[4],
|
|
42
|
+
];
|
|
43
|
+
this.tokenForApproval = tokenAddress;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
async getAssetsToApprove() {
|
|
47
|
+
const asset = getAssetInfoByAddress(this.tokenForApproval);
|
|
48
|
+
if (asset.symbol !== 'ETH') return [{ asset: this.tokenForApproval, owner: this.args[2] }];
|
|
49
|
+
return [];
|
|
50
|
+
}
|
|
51
|
+
}
|