@defisaver/sdk 1.3.18-aave-v4-1-dev → 1.3.18-spark-on-price-v1-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.
Files changed (59) hide show
  1. package/esm/src/Strategy.d.ts +0 -1
  2. package/esm/src/Strategy.js +0 -3
  3. package/esm/src/actions/checkers/SparkRatioCheckAction.js +1 -1
  4. package/esm/src/actions/checkers/SparkTargetRatioCheck.d.ts +14 -0
  5. package/esm/src/actions/checkers/SparkTargetRatioCheck.js +20 -0
  6. package/esm/src/actions/checkers/index.d.ts +1 -1
  7. package/esm/src/actions/checkers/index.js +1 -1
  8. package/esm/src/actions/index.d.ts +1 -2
  9. package/esm/src/actions/index.js +1 -2
  10. package/esm/src/addresses.d.ts +0 -36
  11. package/esm/src/addresses.js +0 -7
  12. package/esm/src/index.d.ts +0 -144
  13. package/esm/src/triggers/index.d.ts +0 -3
  14. package/esm/src/triggers/index.js +0 -3
  15. package/package.json +1 -1
  16. package/src/Strategy.ts +0 -4
  17. package/src/actions/checkers/SparkRatioCheckAction.ts +1 -1
  18. package/src/actions/checkers/SparkTargetRatioCheck.ts +23 -0
  19. package/src/actions/checkers/index.ts +1 -1
  20. package/src/actions/index.ts +0 -2
  21. package/src/addresses.ts +0 -8
  22. package/src/triggers/index.ts +1 -4
  23. package/umd/index.js +94 -475
  24. package/esm/src/actions/aavev4/AaveV4BorrowAction.d.ts +0 -17
  25. package/esm/src/actions/aavev4/AaveV4BorrowAction.js +0 -26
  26. package/esm/src/actions/aavev4/AaveV4CollateralSwitchAction.d.ts +0 -16
  27. package/esm/src/actions/aavev4/AaveV4CollateralSwitchAction.js +0 -24
  28. package/esm/src/actions/aavev4/AaveV4PaybackAction.d.ts +0 -23
  29. package/esm/src/actions/aavev4/AaveV4PaybackAction.js +0 -46
  30. package/esm/src/actions/aavev4/AaveV4RefreshPremiumAction.d.ts +0 -15
  31. package/esm/src/actions/aavev4/AaveV4RefreshPremiumAction.js +0 -22
  32. package/esm/src/actions/aavev4/AaveV4StoreRatioAction.d.ts +0 -14
  33. package/esm/src/actions/aavev4/AaveV4StoreRatioAction.js +0 -20
  34. package/esm/src/actions/aavev4/AaveV4SupplyAction.d.ts +0 -25
  35. package/esm/src/actions/aavev4/AaveV4SupplyAction.js +0 -49
  36. package/esm/src/actions/aavev4/AaveV4WithdrawAction.d.ts +0 -17
  37. package/esm/src/actions/aavev4/AaveV4WithdrawAction.js +0 -26
  38. package/esm/src/actions/aavev4/index.d.ts +0 -7
  39. package/esm/src/actions/aavev4/index.js +0 -7
  40. package/esm/src/actions/checkers/AaveV4RatioCheckAction.d.ts +0 -16
  41. package/esm/src/actions/checkers/AaveV4RatioCheckAction.js +0 -24
  42. package/esm/src/triggers/AaveV4QuotePriceRangeTrigger.d.ts +0 -10
  43. package/esm/src/triggers/AaveV4QuotePriceRangeTrigger.js +0 -12
  44. package/esm/src/triggers/AaveV4QuotePriceTrigger.d.ts +0 -10
  45. package/esm/src/triggers/AaveV4QuotePriceTrigger.js +0 -12
  46. package/esm/src/triggers/AaveV4RatioTrigger.d.ts +0 -10
  47. package/esm/src/triggers/AaveV4RatioTrigger.js +0 -12
  48. package/src/actions/aavev4/AaveV4BorrowAction.ts +0 -39
  49. package/src/actions/aavev4/AaveV4CollateralSwitchAction.ts +0 -36
  50. package/src/actions/aavev4/AaveV4PaybackAction.ts +0 -51
  51. package/src/actions/aavev4/AaveV4RefreshPremiumAction.ts +0 -33
  52. package/src/actions/aavev4/AaveV4StoreRatioAction.ts +0 -30
  53. package/src/actions/aavev4/AaveV4SupplyAction.ts +0 -55
  54. package/src/actions/aavev4/AaveV4WithdrawAction.ts +0 -39
  55. package/src/actions/aavev4/index.ts +0 -7
  56. package/src/actions/checkers/AaveV4RatioCheckAction.ts +0 -36
  57. package/src/triggers/AaveV4QuotePriceRangeTrigger.ts +0 -25
  58. package/src/triggers/AaveV4QuotePriceTrigger.ts +0 -25
  59. package/src/triggers/AaveV4RatioTrigger.ts +0 -24
@@ -13,7 +13,6 @@ export declare class Strategy {
13
13
  addSubSlot(name: string, type: string): void;
14
14
  addTrigger(newTrigger: Action): void;
15
15
  addAction(newAction: Action): void;
16
- addActions(newActions: Array<Action>): void;
17
16
  print(): void;
18
17
  getSubSlots(): any;
19
18
  encodeForDsProxyCall(): (string | string[] | number[][])[];
@@ -20,9 +20,6 @@ export class Strategy {
20
20
  addAction(newAction) {
21
21
  this.actions.push(newAction);
22
22
  }
23
- addActions(newActions) {
24
- this.actions.push(...newActions);
25
- }
26
23
  print() {
27
24
  console.log(`Name: ${this.name}`);
28
25
  console.log(`Slots: ${this.subSlots}`);
@@ -11,7 +11,7 @@ export class SparkRatioCheckAction extends Action {
11
11
  * @param targetRatio The ratio user want to be at
12
12
  */
13
13
  constructor(ratioState, targetRatio) {
14
- super('SparkRatioCheck', getAddr('SparkRatioCheck'), ['uint8', 'uint256'], [ratioState, targetRatio]);
14
+ super('SparkRatioCheck', getAddr('Empty'), ['uint8', 'uint256'], [ratioState, targetRatio]);
15
15
  this.mappableArgs = [
16
16
  this.args[0],
17
17
  this.args[1],
@@ -0,0 +1,14 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * SparkTargetRatioCheck - SparkRatioCheckAction - Checks spark ratio for users proxy position and reverts if faulty
5
+ *
6
+ * @category Checkers
7
+ */
8
+ export declare class SparkTargetRatioCheck extends Action {
9
+ /**
10
+ * @param targetRatio The ratio user want to be at
11
+ * @param market Address of the market
12
+ */
13
+ constructor(targetRatio: uint256, market: EthAddress);
14
+ }
@@ -0,0 +1,20 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * SparkTargetRatioCheck - SparkRatioCheckAction - Checks spark ratio for users proxy position and reverts if faulty
5
+ *
6
+ * @category Checkers
7
+ */
8
+ export class SparkTargetRatioCheck extends Action {
9
+ /**
10
+ * @param targetRatio The ratio user want to be at
11
+ * @param market Address of the market
12
+ */
13
+ constructor(targetRatio, market) {
14
+ super('SparkTargetRatioCheck', getAddr('Empty'), ['uint256', 'address'], [targetRatio, market]);
15
+ this.mappableArgs = [
16
+ this.args[0],
17
+ this.args[1],
18
+ ];
19
+ }
20
+ }
@@ -15,4 +15,4 @@ export * from './LiquityV2RatioCheckAction';
15
15
  export * from './LiquityV2TargetRatioCheckAction';
16
16
  export * from './LiquityV2NewInterestRateCheckerAction';
17
17
  export * from './FluidRatioCheckAction';
18
- export * from './AaveV4RatioCheckAction';
18
+ export * from './SparkTargetRatioCheck';
@@ -15,4 +15,4 @@ export * from './LiquityV2RatioCheckAction';
15
15
  export * from './LiquityV2TargetRatioCheckAction';
16
16
  export * from './LiquityV2NewInterestRateCheckerAction';
17
17
  export * from './FluidRatioCheckAction';
18
- export * from './AaveV4RatioCheckAction';
18
+ export * from './SparkTargetRatioCheck';
@@ -39,5 +39,4 @@ import * as etherfi from './etherfi';
39
39
  import * as fluid from './fluid';
40
40
  import * as pendle from './pendle';
41
41
  import * as umbrella from './umbrella';
42
- import * as aaveV4 from './aavev4';
43
- export { aave, maker, compound, basic, flashloan, uniswap, reflexer, dydx, uniswapV3, checkers, liquity, yearn, lido, insta, balancer, curve, guni, mstable, rari, aaveV3, convex, chickenBonds, compoundV3, morpho, bprotocol, lsv, spark, curveusd, morphoblue, summerfi, llamalend, merkl, eulerV2, sky, liquityV2, stkgho, renzo, etherfi, fluid, pendle, umbrella, aaveV4, };
42
+ export { aave, maker, compound, basic, flashloan, uniswap, reflexer, dydx, uniswapV3, checkers, liquity, yearn, lido, insta, balancer, curve, guni, mstable, rari, aaveV3, convex, chickenBonds, compoundV3, morpho, bprotocol, lsv, spark, curveusd, morphoblue, summerfi, llamalend, merkl, eulerV2, sky, liquityV2, stkgho, renzo, etherfi, fluid, pendle, umbrella, };
@@ -39,5 +39,4 @@ import * as etherfi from './etherfi';
39
39
  import * as fluid from './fluid';
40
40
  import * as pendle from './pendle';
41
41
  import * as umbrella from './umbrella';
42
- import * as aaveV4 from './aavev4';
43
- export { aave, maker, compound, basic, flashloan, uniswap, reflexer, dydx, uniswapV3, checkers, liquity, yearn, lido, insta, balancer, curve, guni, mstable, rari, aaveV3, convex, chickenBonds, compoundV3, morpho, bprotocol, lsv, spark, curveusd, morphoblue, summerfi, llamalend, merkl, eulerV2, sky, liquityV2, stkgho, renzo, etherfi, fluid, pendle, umbrella, aaveV4, };
42
+ export { aave, maker, compound, basic, flashloan, uniswap, reflexer, dydx, uniswapV3, checkers, liquity, yearn, lido, insta, balancer, curve, guni, mstable, rari, aaveV3, convex, chickenBonds, compoundV3, morpho, bprotocol, lsv, spark, curveusd, morphoblue, summerfi, llamalend, merkl, eulerV2, sky, liquityV2, stkgho, renzo, etherfi, fluid, pendle, umbrella, };
@@ -277,12 +277,6 @@ export declare const actionAddresses: {
277
277
  SFApproveTokens: string;
278
278
  SummerfiUnsub: string;
279
279
  SummerfiUnsubV2: string;
280
- AaveV4Supply: string;
281
- AaveV4Withdraw: string;
282
- AaveV4Borrow: string;
283
- AaveV4Payback: string;
284
- AaveV4CollateralSwitch: string;
285
- AaveV4RefreshPremium: string;
286
280
  AaveV3DelegateCredit?: undefined;
287
281
  AaveV3RatioTrigger?: undefined;
288
282
  GasFeeTakerL2?: undefined;
@@ -569,12 +563,6 @@ export declare const actionAddresses: {
569
563
  UmbrellaClaimRewards?: undefined;
570
564
  UmbrellaStake?: undefined;
571
565
  UmbrellaUnstake?: undefined;
572
- AaveV4Supply?: undefined;
573
- AaveV4Withdraw?: undefined;
574
- AaveV4Borrow?: undefined;
575
- AaveV4Payback?: undefined;
576
- AaveV4CollateralSwitch?: undefined;
577
- AaveV4RefreshPremium?: undefined;
578
566
  MorphoBlueView?: undefined;
579
567
  } | {
580
568
  DFSSell: string;
@@ -856,12 +844,6 @@ export declare const actionAddresses: {
856
844
  UmbrellaClaimRewards?: undefined;
857
845
  UmbrellaStake?: undefined;
858
846
  UmbrellaUnstake?: undefined;
859
- AaveV4Supply?: undefined;
860
- AaveV4Withdraw?: undefined;
861
- AaveV4Borrow?: undefined;
862
- AaveV4Payback?: undefined;
863
- AaveV4CollateralSwitch?: undefined;
864
- AaveV4RefreshPremium?: undefined;
865
847
  AaveV3DelegateCredit?: undefined;
866
848
  AaveV3RatioTrigger?: undefined;
867
849
  } | {
@@ -1143,12 +1125,6 @@ export declare const actionAddresses: {
1143
1125
  UmbrellaClaimRewards?: undefined;
1144
1126
  UmbrellaStake?: undefined;
1145
1127
  UmbrellaUnstake?: undefined;
1146
- AaveV4Supply?: undefined;
1147
- AaveV4Withdraw?: undefined;
1148
- AaveV4Borrow?: undefined;
1149
- AaveV4Payback?: undefined;
1150
- AaveV4CollateralSwitch?: undefined;
1151
- AaveV4RefreshPremium?: undefined;
1152
1128
  AaveV3DelegateCredit?: undefined;
1153
1129
  AaveV3RatioTrigger?: undefined;
1154
1130
  AaveV3RatioCheck?: undefined;
@@ -1430,12 +1406,6 @@ export declare const actionAddresses: {
1430
1406
  SFApproveTokens?: undefined;
1431
1407
  SummerfiUnsub?: undefined;
1432
1408
  SummerfiUnsubV2?: undefined;
1433
- AaveV4Supply?: undefined;
1434
- AaveV4Withdraw?: undefined;
1435
- AaveV4Borrow?: undefined;
1436
- AaveV4Payback?: undefined;
1437
- AaveV4CollateralSwitch?: undefined;
1438
- AaveV4RefreshPremium?: undefined;
1439
1409
  AaveV3RatioTrigger?: undefined;
1440
1410
  GasFeeTakerL2?: undefined;
1441
1411
  AaveV3RatioCheck?: undefined;
@@ -1718,12 +1688,6 @@ export declare const actionAddresses: {
1718
1688
  SFApproveTokens?: undefined;
1719
1689
  SummerfiUnsub?: undefined;
1720
1690
  SummerfiUnsubV2?: undefined;
1721
- AaveV4Supply?: undefined;
1722
- AaveV4Withdraw?: undefined;
1723
- AaveV4Borrow?: undefined;
1724
- AaveV4Payback?: undefined;
1725
- AaveV4CollateralSwitch?: undefined;
1726
- AaveV4RefreshPremium?: undefined;
1727
1691
  AaveV3RatioTrigger?: undefined;
1728
1692
  GasFeeTakerL2?: undefined;
1729
1693
  AaveV3RatioCheck?: undefined;
@@ -318,13 +318,6 @@ export const actionAddresses = {
318
318
  SFApproveTokens: '0x0aC29D44eeC8e8f3b010c2e8FC960957db0c8298',
319
319
  SummerfiUnsub: '0x926405D69b77A514ED974901095AcFf9e5131366',
320
320
  SummerfiUnsubV2: '0x5E805eD9B7581a9f1398F75833f9663a459F5E30',
321
- // AaveV4
322
- AaveV4Supply: '0x270A0C7eBd1C0a98FdA613782b51419300AB6322',
323
- AaveV4Withdraw: '0x561013c605A17f5dC5b738C8a3fF9c5F33DbC3d8',
324
- AaveV4Borrow: '0xC6C627c63389D8bB7913b55CD62fa451703AD1E1',
325
- AaveV4Payback: '0x6e31Dd331571209043c8CF997f86b4291F648537',
326
- AaveV4CollateralSwitch: '0x26C39FE05466dBA72A98d095d019dC5e067F6b28',
327
- AaveV4RefreshPremium: '0xb080DC160415Ffe1a4b80d75b0Be92EE38a0b426',
328
321
  },
329
322
  [NETWORKS.optimism.chainId]: {
330
323
  DFSSell: '0x9f234af5c10c136863a20865ba00b26951ab8269',
@@ -288,12 +288,6 @@ 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;
297
291
  AaveV3DelegateCredit?: undefined;
298
292
  AaveV3RatioTrigger?: undefined;
299
293
  GasFeeTakerL2?: undefined;
@@ -580,12 +574,6 @@ declare const actionAddressesAllChains: {
580
574
  UmbrellaClaimRewards?: undefined;
581
575
  UmbrellaStake?: undefined;
582
576
  UmbrellaUnstake?: undefined;
583
- AaveV4Supply?: undefined;
584
- AaveV4Withdraw?: undefined;
585
- AaveV4Borrow?: undefined;
586
- AaveV4Payback?: undefined;
587
- AaveV4CollateralSwitch?: undefined;
588
- AaveV4RefreshPremium?: undefined;
589
577
  MorphoBlueView?: undefined;
590
578
  } | {
591
579
  DFSSell: string;
@@ -867,12 +855,6 @@ declare const actionAddressesAllChains: {
867
855
  UmbrellaClaimRewards?: undefined;
868
856
  UmbrellaStake?: undefined;
869
857
  UmbrellaUnstake?: undefined;
870
- AaveV4Supply?: undefined;
871
- AaveV4Withdraw?: undefined;
872
- AaveV4Borrow?: undefined;
873
- AaveV4Payback?: undefined;
874
- AaveV4CollateralSwitch?: undefined;
875
- AaveV4RefreshPremium?: undefined;
876
858
  AaveV3DelegateCredit?: undefined;
877
859
  AaveV3RatioTrigger?: undefined;
878
860
  } | {
@@ -1154,12 +1136,6 @@ declare const actionAddressesAllChains: {
1154
1136
  UmbrellaClaimRewards?: undefined;
1155
1137
  UmbrellaStake?: undefined;
1156
1138
  UmbrellaUnstake?: undefined;
1157
- AaveV4Supply?: undefined;
1158
- AaveV4Withdraw?: undefined;
1159
- AaveV4Borrow?: undefined;
1160
- AaveV4Payback?: undefined;
1161
- AaveV4CollateralSwitch?: undefined;
1162
- AaveV4RefreshPremium?: undefined;
1163
1139
  AaveV3DelegateCredit?: undefined;
1164
1140
  AaveV3RatioTrigger?: undefined;
1165
1141
  AaveV3RatioCheck?: undefined;
@@ -1441,12 +1417,6 @@ declare const actionAddressesAllChains: {
1441
1417
  SFApproveTokens?: undefined;
1442
1418
  SummerfiUnsub?: undefined;
1443
1419
  SummerfiUnsubV2?: undefined;
1444
- AaveV4Supply?: undefined;
1445
- AaveV4Withdraw?: undefined;
1446
- AaveV4Borrow?: undefined;
1447
- AaveV4Payback?: undefined;
1448
- AaveV4CollateralSwitch?: undefined;
1449
- AaveV4RefreshPremium?: undefined;
1450
1420
  AaveV3RatioTrigger?: undefined;
1451
1421
  GasFeeTakerL2?: undefined;
1452
1422
  AaveV3RatioCheck?: undefined;
@@ -1729,12 +1699,6 @@ declare const actionAddressesAllChains: {
1729
1699
  SFApproveTokens?: undefined;
1730
1700
  SummerfiUnsub?: undefined;
1731
1701
  SummerfiUnsubV2?: undefined;
1732
- AaveV4Supply?: undefined;
1733
- AaveV4Withdraw?: undefined;
1734
- AaveV4Borrow?: undefined;
1735
- AaveV4Payback?: undefined;
1736
- AaveV4CollateralSwitch?: undefined;
1737
- AaveV4RefreshPremium?: undefined;
1738
1702
  AaveV3RatioTrigger?: undefined;
1739
1703
  GasFeeTakerL2?: undefined;
1740
1704
  AaveV3RatioCheck?: undefined;
@@ -2018,12 +1982,6 @@ declare const actionAddresses: (chainId?: null) => {
2018
1982
  SFApproveTokens: string;
2019
1983
  SummerfiUnsub: string;
2020
1984
  SummerfiUnsubV2: string;
2021
- AaveV4Supply: string;
2022
- AaveV4Withdraw: string;
2023
- AaveV4Borrow: string;
2024
- AaveV4Payback: string;
2025
- AaveV4CollateralSwitch: string;
2026
- AaveV4RefreshPremium: string;
2027
1985
  AaveV3DelegateCredit?: undefined;
2028
1986
  AaveV3RatioTrigger?: undefined;
2029
1987
  GasFeeTakerL2?: undefined;
@@ -2310,12 +2268,6 @@ declare const actionAddresses: (chainId?: null) => {
2310
2268
  UmbrellaClaimRewards?: undefined;
2311
2269
  UmbrellaStake?: undefined;
2312
2270
  UmbrellaUnstake?: undefined;
2313
- AaveV4Supply?: undefined;
2314
- AaveV4Withdraw?: undefined;
2315
- AaveV4Borrow?: undefined;
2316
- AaveV4Payback?: undefined;
2317
- AaveV4CollateralSwitch?: undefined;
2318
- AaveV4RefreshPremium?: undefined;
2319
2271
  MorphoBlueView?: undefined;
2320
2272
  } | {
2321
2273
  DFSSell: string;
@@ -2597,12 +2549,6 @@ declare const actionAddresses: (chainId?: null) => {
2597
2549
  UmbrellaClaimRewards?: undefined;
2598
2550
  UmbrellaStake?: undefined;
2599
2551
  UmbrellaUnstake?: undefined;
2600
- AaveV4Supply?: undefined;
2601
- AaveV4Withdraw?: undefined;
2602
- AaveV4Borrow?: undefined;
2603
- AaveV4Payback?: undefined;
2604
- AaveV4CollateralSwitch?: undefined;
2605
- AaveV4RefreshPremium?: undefined;
2606
2552
  AaveV3DelegateCredit?: undefined;
2607
2553
  AaveV3RatioTrigger?: undefined;
2608
2554
  } | {
@@ -2884,12 +2830,6 @@ declare const actionAddresses: (chainId?: null) => {
2884
2830
  UmbrellaClaimRewards?: undefined;
2885
2831
  UmbrellaStake?: undefined;
2886
2832
  UmbrellaUnstake?: undefined;
2887
- AaveV4Supply?: undefined;
2888
- AaveV4Withdraw?: undefined;
2889
- AaveV4Borrow?: undefined;
2890
- AaveV4Payback?: undefined;
2891
- AaveV4CollateralSwitch?: undefined;
2892
- AaveV4RefreshPremium?: undefined;
2893
2833
  AaveV3DelegateCredit?: undefined;
2894
2834
  AaveV3RatioTrigger?: undefined;
2895
2835
  AaveV3RatioCheck?: undefined;
@@ -3171,12 +3111,6 @@ declare const actionAddresses: (chainId?: null) => {
3171
3111
  SFApproveTokens?: undefined;
3172
3112
  SummerfiUnsub?: undefined;
3173
3113
  SummerfiUnsubV2?: undefined;
3174
- AaveV4Supply?: undefined;
3175
- AaveV4Withdraw?: undefined;
3176
- AaveV4Borrow?: undefined;
3177
- AaveV4Payback?: undefined;
3178
- AaveV4CollateralSwitch?: undefined;
3179
- AaveV4RefreshPremium?: undefined;
3180
3114
  AaveV3RatioTrigger?: undefined;
3181
3115
  GasFeeTakerL2?: undefined;
3182
3116
  AaveV3RatioCheck?: undefined;
@@ -3459,12 +3393,6 @@ declare const actionAddresses: (chainId?: null) => {
3459
3393
  SFApproveTokens?: undefined;
3460
3394
  SummerfiUnsub?: undefined;
3461
3395
  SummerfiUnsubV2?: undefined;
3462
- AaveV4Supply?: undefined;
3463
- AaveV4Withdraw?: undefined;
3464
- AaveV4Borrow?: undefined;
3465
- AaveV4Payback?: undefined;
3466
- AaveV4CollateralSwitch?: undefined;
3467
- AaveV4RefreshPremium?: undefined;
3468
3396
  AaveV3RatioTrigger?: undefined;
3469
3397
  GasFeeTakerL2?: undefined;
3470
3398
  AaveV3RatioCheck?: undefined;
@@ -3985,12 +3913,6 @@ declare const _default: {
3985
3913
  SFApproveTokens: string;
3986
3914
  SummerfiUnsub: string;
3987
3915
  SummerfiUnsubV2: string;
3988
- AaveV4Supply: string;
3989
- AaveV4Withdraw: string;
3990
- AaveV4Borrow: string;
3991
- AaveV4Payback: string;
3992
- AaveV4CollateralSwitch: string;
3993
- AaveV4RefreshPremium: string;
3994
3916
  AaveV3DelegateCredit?: undefined;
3995
3917
  AaveV3RatioTrigger?: undefined;
3996
3918
  GasFeeTakerL2?: undefined;
@@ -4277,12 +4199,6 @@ declare const _default: {
4277
4199
  UmbrellaClaimRewards?: undefined;
4278
4200
  UmbrellaStake?: undefined;
4279
4201
  UmbrellaUnstake?: undefined;
4280
- AaveV4Supply?: undefined;
4281
- AaveV4Withdraw?: undefined;
4282
- AaveV4Borrow?: undefined;
4283
- AaveV4Payback?: undefined;
4284
- AaveV4CollateralSwitch?: undefined;
4285
- AaveV4RefreshPremium?: undefined;
4286
4202
  MorphoBlueView?: undefined;
4287
4203
  } | {
4288
4204
  DFSSell: string;
@@ -4564,12 +4480,6 @@ declare const _default: {
4564
4480
  UmbrellaClaimRewards?: undefined;
4565
4481
  UmbrellaStake?: undefined;
4566
4482
  UmbrellaUnstake?: undefined;
4567
- AaveV4Supply?: undefined;
4568
- AaveV4Withdraw?: undefined;
4569
- AaveV4Borrow?: undefined;
4570
- AaveV4Payback?: undefined;
4571
- AaveV4CollateralSwitch?: undefined;
4572
- AaveV4RefreshPremium?: undefined;
4573
4483
  AaveV3DelegateCredit?: undefined;
4574
4484
  AaveV3RatioTrigger?: undefined;
4575
4485
  } | {
@@ -4851,12 +4761,6 @@ declare const _default: {
4851
4761
  UmbrellaClaimRewards?: undefined;
4852
4762
  UmbrellaStake?: undefined;
4853
4763
  UmbrellaUnstake?: undefined;
4854
- AaveV4Supply?: undefined;
4855
- AaveV4Withdraw?: undefined;
4856
- AaveV4Borrow?: undefined;
4857
- AaveV4Payback?: undefined;
4858
- AaveV4CollateralSwitch?: undefined;
4859
- AaveV4RefreshPremium?: undefined;
4860
4764
  AaveV3DelegateCredit?: undefined;
4861
4765
  AaveV3RatioTrigger?: undefined;
4862
4766
  AaveV3RatioCheck?: undefined;
@@ -5138,12 +5042,6 @@ declare const _default: {
5138
5042
  SFApproveTokens?: undefined;
5139
5043
  SummerfiUnsub?: undefined;
5140
5044
  SummerfiUnsubV2?: undefined;
5141
- AaveV4Supply?: undefined;
5142
- AaveV4Withdraw?: undefined;
5143
- AaveV4Borrow?: undefined;
5144
- AaveV4Payback?: undefined;
5145
- AaveV4CollateralSwitch?: undefined;
5146
- AaveV4RefreshPremium?: undefined;
5147
5045
  AaveV3RatioTrigger?: undefined;
5148
5046
  GasFeeTakerL2?: undefined;
5149
5047
  AaveV3RatioCheck?: undefined;
@@ -5426,12 +5324,6 @@ declare const _default: {
5426
5324
  SFApproveTokens?: undefined;
5427
5325
  SummerfiUnsub?: undefined;
5428
5326
  SummerfiUnsubV2?: undefined;
5429
- AaveV4Supply?: undefined;
5430
- AaveV4Withdraw?: undefined;
5431
- AaveV4Borrow?: undefined;
5432
- AaveV4Payback?: undefined;
5433
- AaveV4CollateralSwitch?: undefined;
5434
- AaveV4RefreshPremium?: undefined;
5435
5327
  AaveV3RatioTrigger?: undefined;
5436
5328
  GasFeeTakerL2?: undefined;
5437
5329
  AaveV3RatioCheck?: undefined;
@@ -5715,12 +5607,6 @@ declare const _default: {
5715
5607
  SFApproveTokens: string;
5716
5608
  SummerfiUnsub: string;
5717
5609
  SummerfiUnsubV2: string;
5718
- AaveV4Supply: string;
5719
- AaveV4Withdraw: string;
5720
- AaveV4Borrow: string;
5721
- AaveV4Payback: string;
5722
- AaveV4CollateralSwitch: string;
5723
- AaveV4RefreshPremium: string;
5724
5610
  AaveV3DelegateCredit?: undefined;
5725
5611
  AaveV3RatioTrigger?: undefined;
5726
5612
  GasFeeTakerL2?: undefined;
@@ -6007,12 +5893,6 @@ declare const _default: {
6007
5893
  UmbrellaClaimRewards?: undefined;
6008
5894
  UmbrellaStake?: undefined;
6009
5895
  UmbrellaUnstake?: undefined;
6010
- AaveV4Supply?: undefined;
6011
- AaveV4Withdraw?: undefined;
6012
- AaveV4Borrow?: undefined;
6013
- AaveV4Payback?: undefined;
6014
- AaveV4CollateralSwitch?: undefined;
6015
- AaveV4RefreshPremium?: undefined;
6016
5896
  MorphoBlueView?: undefined;
6017
5897
  } | {
6018
5898
  DFSSell: string;
@@ -6294,12 +6174,6 @@ declare const _default: {
6294
6174
  UmbrellaClaimRewards?: undefined;
6295
6175
  UmbrellaStake?: undefined;
6296
6176
  UmbrellaUnstake?: undefined;
6297
- AaveV4Supply?: undefined;
6298
- AaveV4Withdraw?: undefined;
6299
- AaveV4Borrow?: undefined;
6300
- AaveV4Payback?: undefined;
6301
- AaveV4CollateralSwitch?: undefined;
6302
- AaveV4RefreshPremium?: undefined;
6303
6177
  AaveV3DelegateCredit?: undefined;
6304
6178
  AaveV3RatioTrigger?: undefined;
6305
6179
  } | {
@@ -6581,12 +6455,6 @@ declare const _default: {
6581
6455
  UmbrellaClaimRewards?: undefined;
6582
6456
  UmbrellaStake?: undefined;
6583
6457
  UmbrellaUnstake?: undefined;
6584
- AaveV4Supply?: undefined;
6585
- AaveV4Withdraw?: undefined;
6586
- AaveV4Borrow?: undefined;
6587
- AaveV4Payback?: undefined;
6588
- AaveV4CollateralSwitch?: undefined;
6589
- AaveV4RefreshPremium?: undefined;
6590
6458
  AaveV3DelegateCredit?: undefined;
6591
6459
  AaveV3RatioTrigger?: undefined;
6592
6460
  AaveV3RatioCheck?: undefined;
@@ -6868,12 +6736,6 @@ declare const _default: {
6868
6736
  SFApproveTokens?: undefined;
6869
6737
  SummerfiUnsub?: undefined;
6870
6738
  SummerfiUnsubV2?: undefined;
6871
- AaveV4Supply?: undefined;
6872
- AaveV4Withdraw?: undefined;
6873
- AaveV4Borrow?: undefined;
6874
- AaveV4Payback?: undefined;
6875
- AaveV4CollateralSwitch?: undefined;
6876
- AaveV4RefreshPremium?: undefined;
6877
6739
  AaveV3RatioTrigger?: undefined;
6878
6740
  GasFeeTakerL2?: undefined;
6879
6741
  AaveV3RatioCheck?: undefined;
@@ -7156,12 +7018,6 @@ declare const _default: {
7156
7018
  SFApproveTokens?: undefined;
7157
7019
  SummerfiUnsub?: undefined;
7158
7020
  SummerfiUnsubV2?: undefined;
7159
- AaveV4Supply?: undefined;
7160
- AaveV4Withdraw?: undefined;
7161
- AaveV4Borrow?: undefined;
7162
- AaveV4Payback?: undefined;
7163
- AaveV4CollateralSwitch?: undefined;
7164
- AaveV4RefreshPremium?: undefined;
7165
7021
  AaveV3RatioTrigger?: undefined;
7166
7022
  GasFeeTakerL2?: undefined;
7167
7023
  AaveV3RatioCheck?: undefined;
@@ -31,6 +31,3 @@ 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,6 +31,3 @@ 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/sdk",
3
- "version": "1.3.18-aave-v4-1-dev",
3
+ "version": "1.3.18-spark-on-price-v1-dev",
4
4
  "description": "",
5
5
  "main": "./umd/index.js",
6
6
  "module": "./esm/src/index.js",
package/src/Strategy.ts CHANGED
@@ -36,10 +36,6 @@ export class Strategy {
36
36
  this.actions.push(newAction);
37
37
  }
38
38
 
39
- addActions(newActions: Array<Action>) {
40
- this.actions.push(...newActions);
41
- }
42
-
43
39
  print() {
44
40
  console.log(`Name: ${this.name}`);
45
41
  console.log(`Slots: ${this.subSlots}`);
@@ -13,7 +13,7 @@ export class SparkRatioCheckAction extends Action {
13
13
  * @param targetRatio The ratio user want to be at
14
14
  */
15
15
  constructor(ratioState:uint8, targetRatio:uint256) {
16
- super('SparkRatioCheck', getAddr('SparkRatioCheck'), ['uint8', 'uint256'], [ratioState, targetRatio]);
16
+ super('SparkRatioCheck', getAddr('Empty'), ['uint8', 'uint256'], [ratioState, targetRatio]);
17
17
 
18
18
  this.mappableArgs = [
19
19
  this.args[0],
@@ -0,0 +1,23 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ import { EthAddress, uint256 } from '../../types';
4
+
5
+ /**
6
+ * SparkTargetRatioCheck - SparkRatioCheckAction - Checks spark ratio for users proxy position and reverts if faulty
7
+ *
8
+ * @category Checkers
9
+ */
10
+ export class SparkTargetRatioCheck extends Action {
11
+ /**
12
+ * @param targetRatio The ratio user want to be at
13
+ * @param market Address of the market
14
+ */
15
+ constructor(targetRatio: uint256, market: EthAddress) {
16
+ super('SparkTargetRatioCheck', getAddr('Empty'), ['uint256', 'address'], [targetRatio, market]);
17
+
18
+ this.mappableArgs = [
19
+ this.args[0],
20
+ this.args[1],
21
+ ];
22
+ }
23
+ }
@@ -15,4 +15,4 @@ export * from './LiquityV2RatioCheckAction';
15
15
  export * from './LiquityV2TargetRatioCheckAction';
16
16
  export * from './LiquityV2NewInterestRateCheckerAction';
17
17
  export * from './FluidRatioCheckAction';
18
- export * from './AaveV4RatioCheckAction';
18
+ export * from './SparkTargetRatioCheck';
@@ -39,7 +39,6 @@ import * as etherfi from './etherfi';
39
39
  import * as fluid from './fluid';
40
40
  import * as pendle from './pendle';
41
41
  import * as umbrella from './umbrella';
42
- import * as aaveV4 from './aavev4';
43
42
 
44
43
  export {
45
44
  aave,
@@ -83,5 +82,4 @@ export {
83
82
  fluid,
84
83
  pendle,
85
84
  umbrella,
86
- aaveV4,
87
85
  };
package/src/addresses.ts CHANGED
@@ -389,14 +389,6 @@ export const actionAddresses = {
389
389
  SFApproveTokens: '0x0aC29D44eeC8e8f3b010c2e8FC960957db0c8298',
390
390
  SummerfiUnsub: '0x926405D69b77A514ED974901095AcFf9e5131366',
391
391
  SummerfiUnsubV2: '0x5E805eD9B7581a9f1398F75833f9663a459F5E30',
392
-
393
- // AaveV4
394
- AaveV4Supply: '0x270A0C7eBd1C0a98FdA613782b51419300AB6322',
395
- AaveV4Withdraw: '0x561013c605A17f5dC5b738C8a3fF9c5F33DbC3d8',
396
- AaveV4Borrow: '0xC6C627c63389D8bB7913b55CD62fa451703AD1E1',
397
- AaveV4Payback: '0x6e31Dd331571209043c8CF997f86b4291F648537',
398
- AaveV4CollateralSwitch: '0x26C39FE05466dBA72A98d095d019dC5e067F6b28',
399
- AaveV4RefreshPremium: '0xb080DC160415Ffe1a4b80d75b0Be92EE38a0b426',
400
392
  },
401
393
  [NETWORKS.optimism.chainId]: {
402
394
  DFSSell: '0x9f234af5c10c136863a20865ba00b26951ab8269',
@@ -30,7 +30,4 @@ export * from './CompV3PriceRangeTrigger';
30
30
  export * from './LiquityV2AdjustRateDebtInFrontTrigger';
31
31
  export * from './AaveV3QuotePriceRangeTrigger';
32
32
  export * from './SparkQuotePriceRangeTrigger';
33
- export * from './MorphoBluePriceRangeTrigger';
34
- export * from './AaveV4QuotePriceTrigger';
35
- export * from './AaveV4QuotePriceRangeTrigger';
36
- export * from './AaveV4RatioTrigger';
33
+ export * from './MorphoBluePriceRangeTrigger';