@defisaver/automation-sdk 3.3.16 → 3.3.17-liq-prot-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 (35) hide show
  1. package/cjs/constants/index.js +190 -0
  2. package/cjs/index.d.ts +2 -2
  3. package/cjs/index.js +5 -2
  4. package/cjs/services/strategiesService.js +169 -12
  5. package/cjs/services/strategySubService.d.ts +22 -17
  6. package/cjs/services/strategySubService.js +115 -38
  7. package/cjs/services/strategySubService.test.js +111 -41
  8. package/cjs/services/subDataService.d.ts +70 -20
  9. package/cjs/services/subDataService.js +23 -79
  10. package/cjs/services/subDataService.test.js +17 -202
  11. package/cjs/types/enums.d.ts +48 -6
  12. package/cjs/types/enums.js +42 -0
  13. package/esm/constants/index.js +190 -0
  14. package/esm/index.d.ts +2 -2
  15. package/esm/index.js +5 -2
  16. package/esm/services/strategiesService.js +169 -12
  17. package/esm/services/strategySubService.d.ts +22 -17
  18. package/esm/services/strategySubService.js +113 -37
  19. package/esm/services/strategySubService.test.js +112 -39
  20. package/esm/services/subDataService.d.ts +70 -20
  21. package/esm/services/subDataService.js +21 -77
  22. package/esm/services/subDataService.test.js +18 -200
  23. package/esm/types/enums.d.ts +48 -6
  24. package/esm/types/enums.js +42 -0
  25. package/package.json +1 -1
  26. package/src/constants/index.ts +192 -1
  27. package/src/index.ts +22 -6
  28. package/src/services/strategiesService.ts +234 -12
  29. package/src/services/strategySubService.test.ts +147 -47
  30. package/src/services/strategySubService.ts +246 -47
  31. package/src/services/subDataService.test.ts +18 -214
  32. package/src/services/subDataService.ts +42 -106
  33. package/src/services/utils.test.ts +1 -1
  34. package/src/services/utils.ts +3 -1
  35. package/src/types/enums.ts +42 -2
@@ -22,11 +22,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
25
  Object.defineProperty(exports, "__esModule", { value: true });
29
- const decimal_js_1 = __importDefault(require("decimal.js"));
30
26
  const chai_1 = require("chai");
31
27
  const tokens_1 = require("@defisaver/tokens");
32
28
  const web3Utils = __importStar(require("web3-utils"));
@@ -146,7 +142,7 @@ describe('Feature: subDataService.ts', () => {
146
142
  });
147
143
  });
148
144
  });
149
- describe('When testing subDataService.makerLeverageManagementSubData', () => {
145
+ describe('When testing subDataService.legacyMakerLeverageManagementSubData', () => {
150
146
  describe('decode()', () => {
151
147
  const examples = [
152
148
  [
@@ -159,12 +155,12 @@ describe('Feature: subDataService.ts', () => {
159
155
  ];
160
156
  examples.forEach(([expected, actual]) => {
161
157
  it(`Given ${actual} should return expected value: ${JSON.stringify(expected)}`, () => {
162
- (0, chai_1.expect)(subDataService.makerLeverageManagementSubData.decode(actual)).to.eql(expected);
158
+ (0, chai_1.expect)(subDataService.legacyMakerLeverageManagementSubData.decode(actual)).to.eql(expected);
163
159
  });
164
160
  });
165
161
  });
166
162
  });
167
- describe('When testing subDataService.makerLeverageManagementWithoutSubProxy', () => {
163
+ describe('When testing subDataService.makerLeverageManagementSubData', () => {
168
164
  describe('encode()', () => {
169
165
  const examples = [
170
166
  [
@@ -184,7 +180,7 @@ describe('Feature: subDataService.ts', () => {
184
180
  ];
185
181
  examples.forEach(([expected, actual]) => {
186
182
  it(`Given ${actual} should return expected value: ${expected}`, () => {
187
- (0, chai_1.expect)(subDataService.makerLeverageManagementWithoutSubProxy.encode(...actual)).to.eql(expected);
183
+ (0, chai_1.expect)(subDataService.makerLeverageManagementSubData.encode(...actual)).to.eql(expected);
188
184
  });
189
185
  });
190
186
  });
@@ -215,12 +211,12 @@ describe('Feature: subDataService.ts', () => {
215
211
  ];
216
212
  examples.forEach(([expected, actual]) => {
217
213
  it(`Given ${actual} should return expected value: ${JSON.stringify(expected)}`, () => {
218
- (0, chai_1.expect)(subDataService.makerLeverageManagementWithoutSubProxy.decode(actual)).to.eql(expected);
214
+ (0, chai_1.expect)(subDataService.makerLeverageManagementSubData.decode(actual)).to.eql(expected);
219
215
  });
220
216
  });
221
217
  });
222
218
  });
223
- describe('When testing subDataService.liquityLeverageManagementSubData', () => {
219
+ describe('When testing subDataService.legacyLiquityLeverageManagementSubData', () => {
224
220
  describe('decode()', () => {
225
221
  const examples = [
226
222
  [
@@ -233,7 +229,7 @@ describe('Feature: subDataService.ts', () => {
233
229
  ];
234
230
  examples.forEach(([expected, actual]) => {
235
231
  it(`Given ${actual} should return expected value: ${JSON.stringify(expected)}`, () => {
236
- (0, chai_1.expect)(subDataService.liquityLeverageManagementSubData.decode(actual)).to.eql(expected);
232
+ (0, chai_1.expect)(subDataService.legacyLiquityLeverageManagementSubData.decode(actual)).to.eql(expected);
237
233
  });
238
234
  });
239
235
  });
@@ -288,24 +284,7 @@ describe('Feature: subDataService.ts', () => {
288
284
  });
289
285
  });
290
286
  });
291
- describe('When testing subDataService.aaveV2LeverageManagementSubData', () => {
292
- describe('encode()', () => {
293
- const examples = [
294
- [
295
- [new decimal_js_1.default(160).mul(1e16).toString(), new decimal_js_1.default(220).mul(1e16).toString(), new decimal_js_1.default(180).mul(1e16).toString(), new decimal_js_1.default(190).mul(1e16).toString(), true],
296
- [160, 220, 180, 190, true]
297
- ],
298
- [
299
- [new decimal_js_1.default(160).mul(1e16).toString(), new decimal_js_1.default(200).mul(1e16).toString(), new decimal_js_1.default(180).mul(1e16).toString(), new decimal_js_1.default(190).mul(1e16).toString(), false],
300
- [160, 200, 180, 190, false]
301
- ],
302
- ];
303
- examples.forEach(([expected, actual]) => {
304
- it(`Given ${actual} should return expected value: ${expected}`, () => {
305
- (0, chai_1.expect)(subDataService.aaveV2LeverageManagementSubData.encode(...actual)).to.eql(expected);
306
- });
307
- });
308
- });
287
+ describe('When testing subDataService.legacyAaveV2LeverageManagementSubData', () => {
309
288
  describe('decode()', () => {
310
289
  const examples = [
311
290
  [
@@ -319,12 +298,12 @@ describe('Feature: subDataService.ts', () => {
319
298
  ];
320
299
  examples.forEach(([expected, actual]) => {
321
300
  it(`Given ${actual} should return expected value: ${JSON.stringify(expected)}`, () => {
322
- (0, chai_1.expect)(subDataService.aaveV2LeverageManagementSubData.decode(actual)).to.eql(expected);
301
+ (0, chai_1.expect)(subDataService.legacyAaveV2LeverageManagementSubData.decode(actual)).to.eql(expected);
323
302
  });
324
303
  });
325
304
  });
326
305
  });
327
- describe('When testing subDataService.aaveV3LeverageManagementSubData', () => {
306
+ describe('When testing subDataService.legacyAaveV3LeverageManagementSubData', () => {
328
307
  describe('decode()', () => {
329
308
  const examples = [
330
309
  [
@@ -338,7 +317,7 @@ describe('Feature: subDataService.ts', () => {
338
317
  ];
339
318
  examples.forEach(([expected, actual]) => {
340
319
  it(`Given ${actual} should return expected value: ${JSON.stringify(expected)}`, () => {
341
- (0, chai_1.expect)(subDataService.aaveV3LeverageManagementSubData.decode(actual)).to.eql(expected);
320
+ (0, chai_1.expect)(subDataService.legacyAaveV3LeverageManagementSubData.decode(actual)).to.eql(expected);
342
321
  });
343
322
  });
344
323
  });
@@ -677,24 +656,7 @@ describe('Feature: subDataService.ts', () => {
677
656
  });
678
657
  });
679
658
  });
680
- describe('When testing subDataService.compoundV2LeverageManagementSubData', () => {
681
- describe('encode()', () => {
682
- const examples = [
683
- [
684
- [new decimal_js_1.default(160).mul(1e16).toString(), new decimal_js_1.default(220).mul(1e16).toString(), new decimal_js_1.default(180).mul(1e16).toString(), new decimal_js_1.default(190).mul(1e16).toString(), true],
685
- [160, 220, 180, 190, true]
686
- ],
687
- [
688
- [new decimal_js_1.default(160).mul(1e16).toString(), new decimal_js_1.default(200).mul(1e16).toString(), new decimal_js_1.default(180).mul(1e16).toString(), new decimal_js_1.default(190).mul(1e16).toString(), false],
689
- [160, 200, 180, 190, false]
690
- ],
691
- ];
692
- examples.forEach(([expected, actual]) => {
693
- it(`Given ${actual} should return expected value: ${expected}`, () => {
694
- (0, chai_1.expect)(subDataService.compoundV2LeverageManagementSubData.encode(...actual)).to.eql(expected);
695
- });
696
- });
697
- });
659
+ describe('When testing subDataService.legacyCompoundV2LeverageManagementSubData', () => {
698
660
  describe('decode()', () => {
699
661
  const examples = [
700
662
  [
@@ -708,97 +670,12 @@ describe('Feature: subDataService.ts', () => {
708
670
  ];
709
671
  examples.forEach(([expected, actual]) => {
710
672
  it(`Given ${actual} should return expected value: ${JSON.stringify(expected)}`, () => {
711
- (0, chai_1.expect)(subDataService.compoundV2LeverageManagementSubData.decode(actual)).to.eql(expected);
712
- });
713
- });
714
- });
715
- });
716
- describe('When testing subDataService.compoundV3LeverageManagementSubData', () => {
717
- describe('encode()', () => {
718
- const examples = [
719
- [
720
- [
721
- web3Utils.toChecksumAddress('0x1C0F620155e85491f8D35440eb17538Ca5c55212'),
722
- web3Utils.toChecksumAddress((0, tokens_1.getAssetInfo)('USDC', enums_1.ChainId.Ethereum).address),
723
- new decimal_js_1.default(160).mul(1e16).toString(),
724
- new decimal_js_1.default(220).mul(1e16).toString(),
725
- new decimal_js_1.default(180).mul(1e16).toString(),
726
- new decimal_js_1.default(190).mul(1e16).toString(),
727
- true, false,
728
- ],
729
- [
730
- web3Utils.toChecksumAddress('0x1C0F620155e85491f8D35440eb17538Ca5c55212'),
731
- web3Utils.toChecksumAddress((0, tokens_1.getAssetInfo)('USDC', enums_1.ChainId.Ethereum).address),
732
- 160, 220, 180, 190,
733
- true, false,
734
- ]
735
- ],
736
- [
737
- [
738
- web3Utils.toChecksumAddress('0xaC0F620155e85491f8D35440eb17538Ca5c55212'),
739
- web3Utils.toChecksumAddress((0, tokens_1.getAssetInfo)('WETH', enums_1.ChainId.Ethereum).address),
740
- new decimal_js_1.default(160).mul(1e16).toString(),
741
- new decimal_js_1.default(210).mul(1e16).toString(),
742
- new decimal_js_1.default(180).mul(1e16).toString(),
743
- new decimal_js_1.default(190).mul(1e16).toString(),
744
- false, true,
745
- ],
746
- [
747
- web3Utils.toChecksumAddress('0xaC0F620155e85491f8D35440eb17538Ca5c55212'),
748
- web3Utils.toChecksumAddress((0, tokens_1.getAssetInfo)('WETH', enums_1.ChainId.Ethereum).address),
749
- 160, 210, 180, 190,
750
- false, true,
751
- ]
752
- ],
753
- ];
754
- examples.forEach(([expected, actual]) => {
755
- it(`Given ${actual} should return expected value: ${expected}`, () => {
756
- (0, chai_1.expect)(subDataService.compoundV3LeverageManagementSubData.encode(...actual)).to.eql(expected);
757
- });
758
- });
759
- });
760
- describe('decode()', () => {
761
- const examples = [
762
- [
763
- { targetRatio: 123 },
764
- [
765
- '0x0000000000000000000000000000000000000000000000000000000000000000', '0x0000000000000000000000000000000000000000000000000000000000000000',
766
- '0x0000000000000000000000000000000000000000000000000000000000000000', '0x0000000000000000000000000000000000000000000000001111d67bb1bb0000',
767
- ],
768
- ],
769
- [
770
- { targetRatio: 200 },
771
- [
772
- '0x0000000000000000000000000000000000000000000000000000000000000000', '0x0000000000000000000000000000000000000000000000000000000000000000',
773
- '0x0000000000000000000000000000000000000000000000000000000000000000', '0x0000000000000000000000000000000000000000000000001bc16d674ec80000',
774
- ],
775
- ],
776
- ];
777
- examples.forEach(([expected, actual]) => {
778
- it(`Given ${actual} should return expected value: ${JSON.stringify(expected)}`, () => {
779
- (0, chai_1.expect)(subDataService.compoundV3LeverageManagementSubData.decode(actual)).to.eql(expected);
673
+ (0, chai_1.expect)(subDataService.legacyCompoundV2LeverageManagementSubData.decode(actual)).to.eql(expected);
780
674
  });
781
675
  });
782
676
  });
783
677
  });
784
678
  describe('When testing subDataService.morphoAaveV2LeverageManagementSubData', () => {
785
- describe('encode()', () => {
786
- const examples = [
787
- [
788
- [new decimal_js_1.default(160).mul(1e16).toString(), new decimal_js_1.default(220).mul(1e16).toString(), new decimal_js_1.default(180).mul(1e16).toString(), new decimal_js_1.default(190).mul(1e16).toString(), true],
789
- [160, 220, 180, 190, true]
790
- ],
791
- [
792
- [new decimal_js_1.default(160).mul(1e16).toString(), new decimal_js_1.default(200).mul(1e16).toString(), new decimal_js_1.default(180).mul(1e16).toString(), new decimal_js_1.default(190).mul(1e16).toString(), false],
793
- [160, 200, 180, 190, false]
794
- ],
795
- ];
796
- examples.forEach(([expected, actual]) => {
797
- it(`Given ${actual} should return expected value: ${expected}`, () => {
798
- (0, chai_1.expect)(subDataService.morphoAaveV2LeverageManagementSubData.encode(...actual)).to.eql(expected);
799
- });
800
- });
801
- });
802
679
  describe('decode()', () => {
803
680
  const examples = [
804
681
  [
@@ -818,23 +695,6 @@ describe('Feature: subDataService.ts', () => {
818
695
  });
819
696
  });
820
697
  describe('When testing subDataService.cBondsRebondSubData', () => {
821
- describe('encode()', () => {
822
- const examples = [
823
- [
824
- ['0x00000000000000000000000000000000000000000000000000000000000000c8'],
825
- [200]
826
- ],
827
- [
828
- ['0x000000000000000000000000000000000000000000000000000000000000a119'],
829
- [41241]
830
- ],
831
- ];
832
- examples.forEach(([expected, actual]) => {
833
- it(`Given ${actual} should return expected value: ${expected}`, () => {
834
- (0, chai_1.expect)(subDataService.cBondsRebondSubData.encode(...actual)).to.eql(expected);
835
- });
836
- });
837
- });
838
698
  describe('decode()', () => {
839
699
  const examples = [
840
700
  [
@@ -975,52 +835,7 @@ describe('Feature: subDataService.ts', () => {
975
835
  });
976
836
  });
977
837
  });
978
- describe('When testing subDataService.exchangeLimitOrderSubData', () => {
979
- describe('encode()', () => {
980
- const examples = [
981
- [
982
- [
983
- web3Utils.toChecksumAddress((0, tokens_1.getAssetInfo)('WETH', enums_1.ChainId.Ethereum).address),
984
- web3Utils.toChecksumAddress((0, tokens_1.getAssetInfo)('DAI', enums_1.ChainId.Ethereum).address),
985
- '2131',
986
- '0.53123',
987
- '1696590921159',
988
- `${enums_1.OrderType.STOP_LOSS}`
989
- ],
990
- [
991
- web3Utils.toChecksumAddress((0, tokens_1.getAssetInfo)('WETH', enums_1.ChainId.Ethereum).address),
992
- web3Utils.toChecksumAddress((0, tokens_1.getAssetInfo)('DAI', enums_1.ChainId.Ethereum).address),
993
- '2131',
994
- '0.53123',
995
- 1696590921159,
996
- enums_1.OrderType.STOP_LOSS
997
- ]
998
- ],
999
- [
1000
- [
1001
- web3Utils.toChecksumAddress((0, tokens_1.getAssetInfo)('LINK', enums_1.ChainId.Arbitrum).address),
1002
- web3Utils.toChecksumAddress((0, tokens_1.getAssetInfo)('USDC', enums_1.ChainId.Arbitrum).address),
1003
- '2131',
1004
- '0.43123',
1005
- '1646590921159',
1006
- `${enums_1.OrderType.TAKE_PROFIT}`
1007
- ],
1008
- [
1009
- web3Utils.toChecksumAddress((0, tokens_1.getAssetInfo)('LINK', enums_1.ChainId.Arbitrum).address),
1010
- web3Utils.toChecksumAddress((0, tokens_1.getAssetInfo)('USDC', enums_1.ChainId.Arbitrum).address),
1011
- '2131',
1012
- '0.43123',
1013
- 1646590921159,
1014
- enums_1.OrderType.TAKE_PROFIT
1015
- ]
1016
- ],
1017
- ];
1018
- examples.forEach(([expected, actual]) => {
1019
- it(`Given ${actual} should return expected value: ${expected}`, () => {
1020
- (0, chai_1.expect)(subDataService.exchangeLimitOrderSubData.encode(...actual)).to.eql(expected);
1021
- });
1022
- });
1023
- });
838
+ describe('When testing subDataService.legacyExchangeLimitOrderSubData', () => {
1024
839
  describe('decode()', () => {
1025
840
  const examples = [
1026
841
  [
@@ -1054,12 +869,12 @@ describe('Feature: subDataService.ts', () => {
1054
869
  ];
1055
870
  examples.forEach(([expected, actual]) => {
1056
871
  it(`Given ${actual} should return expected value: ${JSON.stringify(expected)}`, () => {
1057
- (0, chai_1.expect)(subDataService.exchangeLimitOrderSubData.decode(...actual)).to.eql(expected);
872
+ (0, chai_1.expect)(subDataService.legacyExchangeLimitOrderSubData.decode(...actual)).to.eql(expected);
1058
873
  });
1059
874
  });
1060
875
  });
1061
876
  });
1062
- describe('When testing subDataService.sparkLeverageManagementSubData', () => {
877
+ describe('When testing subDataService.legacySparkLeverageManagementSubData', () => {
1063
878
  describe('decode()', () => {
1064
879
  const examples = [
1065
880
  [
@@ -1073,7 +888,7 @@ describe('Feature: subDataService.ts', () => {
1073
888
  ];
1074
889
  examples.forEach(([expected, actual]) => {
1075
890
  it(`Given ${actual} should return expected value: ${JSON.stringify(expected)}`, () => {
1076
- (0, chai_1.expect)(subDataService.sparkLeverageManagementSubData.decode(actual)).to.eql(expected);
891
+ (0, chai_1.expect)(subDataService.legacySparkLeverageManagementSubData.decode(actual)).to.eql(expected);
1077
892
  });
1078
893
  });
1079
894
  });
@@ -138,7 +138,9 @@ export declare namespace Strategies {
138
138
  EoaBoostOnPrice = "eoa-boost-on-price",
139
139
  EoaRepayOnPrice = "eoa-repay-on-price",
140
140
  CollateralSwitch = "collateral-switch",
141
- EoaCollateralSwitch = "eoa-collateral-switch"
141
+ EoaCollateralSwitch = "eoa-collateral-switch",
142
+ LiquidationProtection = "liquidation-protection",
143
+ EoaLiquidationProtection = "liquidation-protection-eoa"
142
144
  }
143
145
  enum IdOverrides {
144
146
  TakeProfit = "take-profit",
@@ -149,7 +151,9 @@ export declare namespace Strategies {
149
151
  LeverageManagement = "leverage-management",
150
152
  EoaLeverageManagement = "leverage-management-eoa",
151
153
  LeverageManagementOnPrice = "leverage-management-on-price",
152
- EoaLeverageManagementOnPrice = "leverage-management-on-price-eoa"
154
+ EoaLeverageManagementOnPrice = "leverage-management-on-price-eoa",
155
+ LiquidationProtection = "liquidation-protection",
156
+ EoaLiquidationProtection = "liquidation-protection-eoa"
153
157
  }
154
158
  }
155
159
  export declare namespace Bundles {
@@ -225,7 +229,21 @@ export declare namespace Bundles {
225
229
  AAVE_V4_EOA_REPAY_ON_PRICE = 68,
226
230
  AAVE_V4_EOA_BOOST_ON_PRICE = 69,
227
231
  AAVE_V4_EOA_CLOSE = 70,
228
- MORPHO_BLUE_REPAY_ON_PRICE = 84
232
+ AAVE_V3_SW_LIQUIDATION_PROTECTION = 71,
233
+ SPARK_SW_LIQUIDATION_PROTECTION = 72,
234
+ MAKER_SW_LIQUIDATION_PROTECTION = 75,
235
+ FLUID_T1_SW_LIQUIDATION_PROTECTION = 76,
236
+ AAVE_V4_SW_LIQUIDATION_PROTECTION = 77,
237
+ MORPHO_BLUE_SW_LIQUIDATION_PROTECTION = 78,
238
+ AAVE_V3_EOA_LIQUIDATION_PROTECTION = 79,
239
+ AAVE_V4_EOA_LIQUIDATION_PROTECTION = 80,
240
+ MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION = 81,
241
+ COMP_V3_SW_LIQUIDATION_PROTECTION = 82,
242
+ COMP_V3_EOA_LIQUIDATION_PROTECTION = 83,
243
+ MORPHO_BLUE_REPAY_ON_PRICE = 84,
244
+ MORPHO_BLUE_EOA_BOOST_ON_PRICE = 85,
245
+ MORPHO_BLUE_EOA_REPAY_ON_PRICE = 86,
246
+ MORPHO_BLUE_EOA_CLOSE = 87
229
247
  }
230
248
  enum OptimismIds {
231
249
  AAVE_V3_REPAY = 0,
@@ -238,7 +256,9 @@ export declare namespace Bundles {
238
256
  AAVE_V3_EOA_BOOST = 7,
239
257
  AAVE_V3_EOA_REPAY_ON_PRICE = 8,
240
258
  AAVE_V3_EOA_BOOST_ON_PRICE = 9,
241
- AAVE_V3_EOA_CLOSE = 10
259
+ AAVE_V3_EOA_CLOSE = 10,
260
+ AAVE_V3_SW_LIQUIDATION_PROTECTION = 11,
261
+ AAVE_V3_EOA_LIQUIDATION_PROTECTION = 12
242
262
  }
243
263
  enum BaseIds {
244
264
  AAVE_V3_REPAY = 0,
@@ -268,7 +288,19 @@ export declare namespace Bundles {
268
288
  AAVE_V3_EOA_BOOST_ON_PRICE = 26,
269
289
  AAVE_V3_EOA_CLOSE = 27,
270
290
  MORPHO_BLUE_CLOSE = 28,
271
- MORPHO_BLUE_REPAY_ON_PRICE = 36
291
+ AAVE_V3_SW_LIQUIDATION_PROTECTION = 29,
292
+ FLUID_T1_SW_LIQUIDATION_PROTECTION = 30,
293
+ COMP_V3_SW_LIQUIDATION_PROTECTION = 32,
294
+ COMP_V3_EOA_LIQUIDATION_PROTECTION = 33,
295
+ AAVE_V3_EOA_LIQUIDATION_PROTECTION = 34,
296
+ MORPHO_BLUE_SW_LIQUIDATION_PROTECTION = 35,
297
+ MORPHO_BLUE_REPAY_ON_PRICE = 36,
298
+ MORPHO_BLUE_EOA_REPAY = 37,
299
+ MORPHO_BLUE_EOA_BOOST = 38,
300
+ MORPHO_BLUE_EOA_BOOST_ON_PRICE = 39,
301
+ MORPHO_BLUE_EOA_REPAY_ON_PRICE = 40,
302
+ MORPHO_BLUE_EOA_CLOSE = 41,
303
+ MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION = 42
272
304
  }
273
305
  enum ArbitrumIds {
274
306
  AAVE_V3_REPAY = 0,
@@ -300,6 +332,16 @@ export declare namespace Bundles {
300
332
  MORPHO_BLUE_EOA_REPAY = 26,
301
333
  MORPHO_BLUE_EOA_BOOST = 27,
302
334
  MORPHO_BLUE_CLOSE = 28,
303
- MORPHO_BLUE_REPAY_ON_PRICE = 36
335
+ AAVE_V3_SW_LIQUIDATION_PROTECTION = 29,
336
+ FLUID_T1_SW_LIQUIDATION_PROTECTION = 30,
337
+ MORPHO_BLUE_SW_LIQUIDATION_PROTECTION = 31,
338
+ COMP_V3_SW_LIQUIDATION_PROTECTION = 32,
339
+ COMP_V3_EOA_LIQUIDATION_PROTECTION = 33,
340
+ AAVE_V3_EOA_LIQUIDATION_PROTECTION = 34,
341
+ MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION = 35,
342
+ MORPHO_BLUE_REPAY_ON_PRICE = 36,
343
+ MORPHO_BLUE_EOA_BOOST_ON_PRICE = 37,
344
+ MORPHO_BLUE_EOA_REPAY_ON_PRICE = 38,
345
+ MORPHO_BLUE_EOA_CLOSE = 39
304
346
  }
305
347
  }
@@ -159,6 +159,8 @@ var Strategies;
159
159
  Identifiers["EoaRepayOnPrice"] = "eoa-repay-on-price";
160
160
  Identifiers["CollateralSwitch"] = "collateral-switch";
161
161
  Identifiers["EoaCollateralSwitch"] = "eoa-collateral-switch";
162
+ Identifiers["LiquidationProtection"] = "liquidation-protection";
163
+ Identifiers["EoaLiquidationProtection"] = "liquidation-protection-eoa";
162
164
  })(Identifiers = Strategies.Identifiers || (Strategies.Identifiers = {}));
163
165
  let IdOverrides;
164
166
  (function (IdOverrides) {
@@ -171,6 +173,8 @@ var Strategies;
171
173
  IdOverrides["EoaLeverageManagement"] = "leverage-management-eoa";
172
174
  IdOverrides["LeverageManagementOnPrice"] = "leverage-management-on-price";
173
175
  IdOverrides["EoaLeverageManagementOnPrice"] = "leverage-management-on-price-eoa";
176
+ IdOverrides["LiquidationProtection"] = "liquidation-protection";
177
+ IdOverrides["EoaLiquidationProtection"] = "liquidation-protection-eoa";
174
178
  })(IdOverrides = Strategies.IdOverrides || (Strategies.IdOverrides = {}));
175
179
  })(Strategies = exports.Strategies || (exports.Strategies = {}));
176
180
  var Bundles;
@@ -248,7 +252,21 @@ var Bundles;
248
252
  MainnetIds[MainnetIds["AAVE_V4_EOA_REPAY_ON_PRICE"] = 68] = "AAVE_V4_EOA_REPAY_ON_PRICE";
249
253
  MainnetIds[MainnetIds["AAVE_V4_EOA_BOOST_ON_PRICE"] = 69] = "AAVE_V4_EOA_BOOST_ON_PRICE";
250
254
  MainnetIds[MainnetIds["AAVE_V4_EOA_CLOSE"] = 70] = "AAVE_V4_EOA_CLOSE";
255
+ MainnetIds[MainnetIds["AAVE_V3_SW_LIQUIDATION_PROTECTION"] = 71] = "AAVE_V3_SW_LIQUIDATION_PROTECTION";
256
+ MainnetIds[MainnetIds["SPARK_SW_LIQUIDATION_PROTECTION"] = 72] = "SPARK_SW_LIQUIDATION_PROTECTION";
257
+ MainnetIds[MainnetIds["MAKER_SW_LIQUIDATION_PROTECTION"] = 75] = "MAKER_SW_LIQUIDATION_PROTECTION";
258
+ MainnetIds[MainnetIds["FLUID_T1_SW_LIQUIDATION_PROTECTION"] = 76] = "FLUID_T1_SW_LIQUIDATION_PROTECTION";
259
+ MainnetIds[MainnetIds["AAVE_V4_SW_LIQUIDATION_PROTECTION"] = 77] = "AAVE_V4_SW_LIQUIDATION_PROTECTION";
260
+ MainnetIds[MainnetIds["MORPHO_BLUE_SW_LIQUIDATION_PROTECTION"] = 78] = "MORPHO_BLUE_SW_LIQUIDATION_PROTECTION";
261
+ MainnetIds[MainnetIds["AAVE_V3_EOA_LIQUIDATION_PROTECTION"] = 79] = "AAVE_V3_EOA_LIQUIDATION_PROTECTION";
262
+ MainnetIds[MainnetIds["AAVE_V4_EOA_LIQUIDATION_PROTECTION"] = 80] = "AAVE_V4_EOA_LIQUIDATION_PROTECTION";
263
+ MainnetIds[MainnetIds["MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION"] = 81] = "MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION";
264
+ MainnetIds[MainnetIds["COMP_V3_SW_LIQUIDATION_PROTECTION"] = 82] = "COMP_V3_SW_LIQUIDATION_PROTECTION";
265
+ MainnetIds[MainnetIds["COMP_V3_EOA_LIQUIDATION_PROTECTION"] = 83] = "COMP_V3_EOA_LIQUIDATION_PROTECTION";
251
266
  MainnetIds[MainnetIds["MORPHO_BLUE_REPAY_ON_PRICE"] = 84] = "MORPHO_BLUE_REPAY_ON_PRICE";
267
+ MainnetIds[MainnetIds["MORPHO_BLUE_EOA_BOOST_ON_PRICE"] = 85] = "MORPHO_BLUE_EOA_BOOST_ON_PRICE";
268
+ MainnetIds[MainnetIds["MORPHO_BLUE_EOA_REPAY_ON_PRICE"] = 86] = "MORPHO_BLUE_EOA_REPAY_ON_PRICE";
269
+ MainnetIds[MainnetIds["MORPHO_BLUE_EOA_CLOSE"] = 87] = "MORPHO_BLUE_EOA_CLOSE";
252
270
  })(MainnetIds = Bundles.MainnetIds || (Bundles.MainnetIds = {}));
253
271
  let OptimismIds;
254
272
  (function (OptimismIds) {
@@ -263,6 +281,8 @@ var Bundles;
263
281
  OptimismIds[OptimismIds["AAVE_V3_EOA_REPAY_ON_PRICE"] = 8] = "AAVE_V3_EOA_REPAY_ON_PRICE";
264
282
  OptimismIds[OptimismIds["AAVE_V3_EOA_BOOST_ON_PRICE"] = 9] = "AAVE_V3_EOA_BOOST_ON_PRICE";
265
283
  OptimismIds[OptimismIds["AAVE_V3_EOA_CLOSE"] = 10] = "AAVE_V3_EOA_CLOSE";
284
+ OptimismIds[OptimismIds["AAVE_V3_SW_LIQUIDATION_PROTECTION"] = 11] = "AAVE_V3_SW_LIQUIDATION_PROTECTION";
285
+ OptimismIds[OptimismIds["AAVE_V3_EOA_LIQUIDATION_PROTECTION"] = 12] = "AAVE_V3_EOA_LIQUIDATION_PROTECTION";
266
286
  })(OptimismIds = Bundles.OptimismIds || (Bundles.OptimismIds = {}));
267
287
  let BaseIds;
268
288
  (function (BaseIds) {
@@ -293,7 +313,19 @@ var Bundles;
293
313
  BaseIds[BaseIds["AAVE_V3_EOA_BOOST_ON_PRICE"] = 26] = "AAVE_V3_EOA_BOOST_ON_PRICE";
294
314
  BaseIds[BaseIds["AAVE_V3_EOA_CLOSE"] = 27] = "AAVE_V3_EOA_CLOSE";
295
315
  BaseIds[BaseIds["MORPHO_BLUE_CLOSE"] = 28] = "MORPHO_BLUE_CLOSE";
316
+ BaseIds[BaseIds["AAVE_V3_SW_LIQUIDATION_PROTECTION"] = 29] = "AAVE_V3_SW_LIQUIDATION_PROTECTION";
317
+ BaseIds[BaseIds["FLUID_T1_SW_LIQUIDATION_PROTECTION"] = 30] = "FLUID_T1_SW_LIQUIDATION_PROTECTION";
318
+ BaseIds[BaseIds["COMP_V3_SW_LIQUIDATION_PROTECTION"] = 32] = "COMP_V3_SW_LIQUIDATION_PROTECTION";
319
+ BaseIds[BaseIds["COMP_V3_EOA_LIQUIDATION_PROTECTION"] = 33] = "COMP_V3_EOA_LIQUIDATION_PROTECTION";
320
+ BaseIds[BaseIds["AAVE_V3_EOA_LIQUIDATION_PROTECTION"] = 34] = "AAVE_V3_EOA_LIQUIDATION_PROTECTION";
321
+ BaseIds[BaseIds["MORPHO_BLUE_SW_LIQUIDATION_PROTECTION"] = 35] = "MORPHO_BLUE_SW_LIQUIDATION_PROTECTION";
296
322
  BaseIds[BaseIds["MORPHO_BLUE_REPAY_ON_PRICE"] = 36] = "MORPHO_BLUE_REPAY_ON_PRICE";
323
+ BaseIds[BaseIds["MORPHO_BLUE_EOA_REPAY"] = 37] = "MORPHO_BLUE_EOA_REPAY";
324
+ BaseIds[BaseIds["MORPHO_BLUE_EOA_BOOST"] = 38] = "MORPHO_BLUE_EOA_BOOST";
325
+ BaseIds[BaseIds["MORPHO_BLUE_EOA_BOOST_ON_PRICE"] = 39] = "MORPHO_BLUE_EOA_BOOST_ON_PRICE";
326
+ BaseIds[BaseIds["MORPHO_BLUE_EOA_REPAY_ON_PRICE"] = 40] = "MORPHO_BLUE_EOA_REPAY_ON_PRICE";
327
+ BaseIds[BaseIds["MORPHO_BLUE_EOA_CLOSE"] = 41] = "MORPHO_BLUE_EOA_CLOSE";
328
+ BaseIds[BaseIds["MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION"] = 42] = "MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION";
297
329
  })(BaseIds = Bundles.BaseIds || (Bundles.BaseIds = {}));
298
330
  let ArbitrumIds;
299
331
  (function (ArbitrumIds) {
@@ -326,6 +358,16 @@ var Bundles;
326
358
  ArbitrumIds[ArbitrumIds["MORPHO_BLUE_EOA_REPAY"] = 26] = "MORPHO_BLUE_EOA_REPAY";
327
359
  ArbitrumIds[ArbitrumIds["MORPHO_BLUE_EOA_BOOST"] = 27] = "MORPHO_BLUE_EOA_BOOST";
328
360
  ArbitrumIds[ArbitrumIds["MORPHO_BLUE_CLOSE"] = 28] = "MORPHO_BLUE_CLOSE";
361
+ ArbitrumIds[ArbitrumIds["AAVE_V3_SW_LIQUIDATION_PROTECTION"] = 29] = "AAVE_V3_SW_LIQUIDATION_PROTECTION";
362
+ ArbitrumIds[ArbitrumIds["FLUID_T1_SW_LIQUIDATION_PROTECTION"] = 30] = "FLUID_T1_SW_LIQUIDATION_PROTECTION";
363
+ ArbitrumIds[ArbitrumIds["MORPHO_BLUE_SW_LIQUIDATION_PROTECTION"] = 31] = "MORPHO_BLUE_SW_LIQUIDATION_PROTECTION";
364
+ ArbitrumIds[ArbitrumIds["COMP_V3_SW_LIQUIDATION_PROTECTION"] = 32] = "COMP_V3_SW_LIQUIDATION_PROTECTION";
365
+ ArbitrumIds[ArbitrumIds["COMP_V3_EOA_LIQUIDATION_PROTECTION"] = 33] = "COMP_V3_EOA_LIQUIDATION_PROTECTION";
366
+ ArbitrumIds[ArbitrumIds["AAVE_V3_EOA_LIQUIDATION_PROTECTION"] = 34] = "AAVE_V3_EOA_LIQUIDATION_PROTECTION";
367
+ ArbitrumIds[ArbitrumIds["MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION"] = 35] = "MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION";
329
368
  ArbitrumIds[ArbitrumIds["MORPHO_BLUE_REPAY_ON_PRICE"] = 36] = "MORPHO_BLUE_REPAY_ON_PRICE";
369
+ ArbitrumIds[ArbitrumIds["MORPHO_BLUE_EOA_BOOST_ON_PRICE"] = 37] = "MORPHO_BLUE_EOA_BOOST_ON_PRICE";
370
+ ArbitrumIds[ArbitrumIds["MORPHO_BLUE_EOA_REPAY_ON_PRICE"] = 38] = "MORPHO_BLUE_EOA_REPAY_ON_PRICE";
371
+ ArbitrumIds[ArbitrumIds["MORPHO_BLUE_EOA_CLOSE"] = 39] = "MORPHO_BLUE_EOA_CLOSE";
330
372
  })(ArbitrumIds = Bundles.ArbitrumIds || (Bundles.ArbitrumIds = {}));
331
373
  })(Bundles = exports.Bundles || (exports.Bundles = {}));