@defisaver/automation-sdk 3.3.15-liq-prot-3-dev → 3.3.16-dev-13082-morpho-eoa-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/cjs/constants/index.js +51 -111
- package/cjs/index.d.ts +2 -2
- package/cjs/index.js +2 -5
- package/cjs/services/strategiesService.js +13 -157
- package/cjs/services/strategySubService.d.ts +21 -18
- package/cjs/services/strategySubService.js +74 -78
- package/cjs/services/strategySubService.test.js +216 -3
- package/cjs/services/subDataService.d.ts +20 -70
- package/cjs/services/subDataService.js +79 -23
- package/cjs/services/subDataService.test.js +302 -17
- package/cjs/services/triggerService.test.js +60 -0
- package/cjs/services/utils.d.ts +1 -2
- package/cjs/services/utils.js +1 -14
- package/cjs/types/enums.d.ts +17 -33
- package/cjs/types/enums.js +14 -30
- package/esm/constants/index.js +51 -111
- package/esm/index.d.ts +2 -2
- package/esm/index.js +2 -5
- package/esm/services/strategiesService.js +13 -157
- package/esm/services/strategySubService.d.ts +21 -18
- package/esm/services/strategySubService.js +73 -78
- package/esm/services/strategySubService.test.js +214 -4
- package/esm/services/subDataService.d.ts +20 -70
- package/esm/services/subDataService.js +77 -21
- package/esm/services/subDataService.test.js +300 -18
- package/esm/services/triggerService.test.js +61 -1
- package/esm/services/utils.d.ts +1 -2
- package/esm/services/utils.js +1 -13
- package/esm/types/enums.d.ts +17 -33
- package/esm/types/enums.js +14 -30
- package/package.json +1 -1
- package/src/constants/index.ts +52 -113
- package/src/index.ts +6 -22
- package/src/services/strategiesService.ts +13 -221
- package/src/services/strategySubService.test.ts +275 -3
- package/src/services/strategySubService.ts +121 -173
- package/src/services/subDataService.test.ts +324 -18
- package/src/services/subDataService.ts +106 -42
- package/src/services/triggerService.test.ts +69 -0
- package/src/services/utils.test.ts +1 -1
- package/src/services/utils.ts +1 -15
- package/src/types/enums.ts +16 -30
package/esm/types/enums.js
CHANGED
|
@@ -156,8 +156,6 @@ export var Strategies;
|
|
|
156
156
|
Identifiers["EoaRepayOnPrice"] = "eoa-repay-on-price";
|
|
157
157
|
Identifiers["CollateralSwitch"] = "collateral-switch";
|
|
158
158
|
Identifiers["EoaCollateralSwitch"] = "eoa-collateral-switch";
|
|
159
|
-
Identifiers["LiquidationProtection"] = "liquidation-protection";
|
|
160
|
-
Identifiers["EoaLiquidationProtection"] = "liquidation-protection-eoa";
|
|
161
159
|
})(Identifiers = Strategies.Identifiers || (Strategies.Identifiers = {}));
|
|
162
160
|
let IdOverrides;
|
|
163
161
|
(function (IdOverrides) {
|
|
@@ -170,8 +168,6 @@ export var Strategies;
|
|
|
170
168
|
IdOverrides["EoaLeverageManagement"] = "leverage-management-eoa";
|
|
171
169
|
IdOverrides["LeverageManagementOnPrice"] = "leverage-management-on-price";
|
|
172
170
|
IdOverrides["EoaLeverageManagementOnPrice"] = "leverage-management-on-price-eoa";
|
|
173
|
-
IdOverrides["LiquidationProtection"] = "liquidation-protection";
|
|
174
|
-
IdOverrides["EoaLiquidationProtection"] = "liquidation-protection-eoa";
|
|
175
171
|
})(IdOverrides = Strategies.IdOverrides || (Strategies.IdOverrides = {}));
|
|
176
172
|
})(Strategies || (Strategies = {}));
|
|
177
173
|
export var Bundles;
|
|
@@ -249,17 +245,10 @@ export var Bundles;
|
|
|
249
245
|
MainnetIds[MainnetIds["AAVE_V4_EOA_REPAY_ON_PRICE"] = 68] = "AAVE_V4_EOA_REPAY_ON_PRICE";
|
|
250
246
|
MainnetIds[MainnetIds["AAVE_V4_EOA_BOOST_ON_PRICE"] = 69] = "AAVE_V4_EOA_BOOST_ON_PRICE";
|
|
251
247
|
MainnetIds[MainnetIds["AAVE_V4_EOA_CLOSE"] = 70] = "AAVE_V4_EOA_CLOSE";
|
|
252
|
-
MainnetIds[MainnetIds["
|
|
253
|
-
MainnetIds[MainnetIds["
|
|
254
|
-
MainnetIds[MainnetIds["
|
|
255
|
-
MainnetIds[MainnetIds["
|
|
256
|
-
MainnetIds[MainnetIds["AAVE_V4_SW_LIQUIDATION_PROTECTION"] = 77] = "AAVE_V4_SW_LIQUIDATION_PROTECTION";
|
|
257
|
-
MainnetIds[MainnetIds["MORPHO_BLUE_SW_LIQUIDATION_PROTECTION"] = 78] = "MORPHO_BLUE_SW_LIQUIDATION_PROTECTION";
|
|
258
|
-
MainnetIds[MainnetIds["AAVE_V3_EOA_LIQUIDATION_PROTECTION"] = 79] = "AAVE_V3_EOA_LIQUIDATION_PROTECTION";
|
|
259
|
-
MainnetIds[MainnetIds["AAVE_V4_EOA_LIQUIDATION_PROTECTION"] = 80] = "AAVE_V4_EOA_LIQUIDATION_PROTECTION";
|
|
260
|
-
MainnetIds[MainnetIds["MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION"] = 81] = "MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION";
|
|
261
|
-
MainnetIds[MainnetIds["COMP_V3_SW_LIQUIDATION_PROTECTION"] = 82] = "COMP_V3_SW_LIQUIDATION_PROTECTION";
|
|
262
|
-
MainnetIds[MainnetIds["COMP_V3_EOA_LIQUIDATION_PROTECTION"] = 83] = "COMP_V3_EOA_LIQUIDATION_PROTECTION";
|
|
248
|
+
MainnetIds[MainnetIds["MORPHO_BLUE_REPAY_ON_PRICE"] = 84] = "MORPHO_BLUE_REPAY_ON_PRICE";
|
|
249
|
+
MainnetIds[MainnetIds["MORPHO_BLUE_EOA_BOOST_ON_PRICE"] = 85] = "MORPHO_BLUE_EOA_BOOST_ON_PRICE";
|
|
250
|
+
MainnetIds[MainnetIds["MORPHO_BLUE_EOA_REPAY_ON_PRICE"] = 86] = "MORPHO_BLUE_EOA_REPAY_ON_PRICE";
|
|
251
|
+
MainnetIds[MainnetIds["MORPHO_BLUE_EOA_CLOSE"] = 87] = "MORPHO_BLUE_EOA_CLOSE";
|
|
263
252
|
})(MainnetIds = Bundles.MainnetIds || (Bundles.MainnetIds = {}));
|
|
264
253
|
let OptimismIds;
|
|
265
254
|
(function (OptimismIds) {
|
|
@@ -274,8 +263,6 @@ export var Bundles;
|
|
|
274
263
|
OptimismIds[OptimismIds["AAVE_V3_EOA_REPAY_ON_PRICE"] = 8] = "AAVE_V3_EOA_REPAY_ON_PRICE";
|
|
275
264
|
OptimismIds[OptimismIds["AAVE_V3_EOA_BOOST_ON_PRICE"] = 9] = "AAVE_V3_EOA_BOOST_ON_PRICE";
|
|
276
265
|
OptimismIds[OptimismIds["AAVE_V3_EOA_CLOSE"] = 10] = "AAVE_V3_EOA_CLOSE";
|
|
277
|
-
OptimismIds[OptimismIds["AAVE_V3_SW_LIQUIDATION_PROTECTION"] = 11] = "AAVE_V3_SW_LIQUIDATION_PROTECTION";
|
|
278
|
-
OptimismIds[OptimismIds["AAVE_V3_EOA_LIQUIDATION_PROTECTION"] = 12] = "AAVE_V3_EOA_LIQUIDATION_PROTECTION";
|
|
279
266
|
})(OptimismIds = Bundles.OptimismIds || (Bundles.OptimismIds = {}));
|
|
280
267
|
let BaseIds;
|
|
281
268
|
(function (BaseIds) {
|
|
@@ -306,12 +293,12 @@ export var Bundles;
|
|
|
306
293
|
BaseIds[BaseIds["AAVE_V3_EOA_BOOST_ON_PRICE"] = 26] = "AAVE_V3_EOA_BOOST_ON_PRICE";
|
|
307
294
|
BaseIds[BaseIds["AAVE_V3_EOA_CLOSE"] = 27] = "AAVE_V3_EOA_CLOSE";
|
|
308
295
|
BaseIds[BaseIds["MORPHO_BLUE_CLOSE"] = 28] = "MORPHO_BLUE_CLOSE";
|
|
309
|
-
BaseIds[BaseIds["
|
|
310
|
-
BaseIds[BaseIds["
|
|
311
|
-
BaseIds[BaseIds["
|
|
312
|
-
BaseIds[BaseIds["
|
|
313
|
-
BaseIds[BaseIds["
|
|
314
|
-
BaseIds[BaseIds["
|
|
296
|
+
BaseIds[BaseIds["MORPHO_BLUE_REPAY_ON_PRICE"] = 36] = "MORPHO_BLUE_REPAY_ON_PRICE";
|
|
297
|
+
BaseIds[BaseIds["MORPHO_BLUE_EOA_REPAY"] = 37] = "MORPHO_BLUE_EOA_REPAY";
|
|
298
|
+
BaseIds[BaseIds["MORPHO_BLUE_EOA_BOOST"] = 38] = "MORPHO_BLUE_EOA_BOOST";
|
|
299
|
+
BaseIds[BaseIds["MORPHO_BLUE_EOA_BOOST_ON_PRICE"] = 39] = "MORPHO_BLUE_EOA_BOOST_ON_PRICE";
|
|
300
|
+
BaseIds[BaseIds["MORPHO_BLUE_EOA_REPAY_ON_PRICE"] = 40] = "MORPHO_BLUE_EOA_REPAY_ON_PRICE";
|
|
301
|
+
BaseIds[BaseIds["MORPHO_BLUE_EOA_CLOSE"] = 41] = "MORPHO_BLUE_EOA_CLOSE";
|
|
315
302
|
})(BaseIds = Bundles.BaseIds || (Bundles.BaseIds = {}));
|
|
316
303
|
let ArbitrumIds;
|
|
317
304
|
(function (ArbitrumIds) {
|
|
@@ -344,12 +331,9 @@ export var Bundles;
|
|
|
344
331
|
ArbitrumIds[ArbitrumIds["MORPHO_BLUE_EOA_REPAY"] = 26] = "MORPHO_BLUE_EOA_REPAY";
|
|
345
332
|
ArbitrumIds[ArbitrumIds["MORPHO_BLUE_EOA_BOOST"] = 27] = "MORPHO_BLUE_EOA_BOOST";
|
|
346
333
|
ArbitrumIds[ArbitrumIds["MORPHO_BLUE_CLOSE"] = 28] = "MORPHO_BLUE_CLOSE";
|
|
347
|
-
ArbitrumIds[ArbitrumIds["
|
|
348
|
-
ArbitrumIds[ArbitrumIds["
|
|
349
|
-
ArbitrumIds[ArbitrumIds["
|
|
350
|
-
ArbitrumIds[ArbitrumIds["
|
|
351
|
-
ArbitrumIds[ArbitrumIds["COMP_V3_EOA_LIQUIDATION_PROTECTION"] = 33] = "COMP_V3_EOA_LIQUIDATION_PROTECTION";
|
|
352
|
-
ArbitrumIds[ArbitrumIds["AAVE_V3_EOA_LIQUIDATION_PROTECTION"] = 34] = "AAVE_V3_EOA_LIQUIDATION_PROTECTION";
|
|
353
|
-
ArbitrumIds[ArbitrumIds["MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION"] = 35] = "MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION";
|
|
334
|
+
ArbitrumIds[ArbitrumIds["MORPHO_BLUE_REPAY_ON_PRICE"] = 36] = "MORPHO_BLUE_REPAY_ON_PRICE";
|
|
335
|
+
ArbitrumIds[ArbitrumIds["MORPHO_BLUE_EOA_BOOST_ON_PRICE"] = 37] = "MORPHO_BLUE_EOA_BOOST_ON_PRICE";
|
|
336
|
+
ArbitrumIds[ArbitrumIds["MORPHO_BLUE_EOA_REPAY_ON_PRICE"] = 38] = "MORPHO_BLUE_EOA_REPAY_ON_PRICE";
|
|
337
|
+
ArbitrumIds[ArbitrumIds["MORPHO_BLUE_EOA_CLOSE"] = 39] = "MORPHO_BLUE_EOA_CLOSE";
|
|
354
338
|
})(ArbitrumIds = Bundles.ArbitrumIds || (Bundles.ArbitrumIds = {}));
|
|
355
339
|
})(Bundles || (Bundles = {}));
|
package/package.json
CHANGED
package/src/constants/index.ts
CHANGED
|
@@ -573,60 +573,24 @@ export const MAINNET_BUNDLES_INFO: MainnetBundleInfo = {
|
|
|
573
573
|
strategyId: Strategies.Identifiers.EoaCloseOnPrice,
|
|
574
574
|
protocol: PROTOCOLS.AaveV4,
|
|
575
575
|
},
|
|
576
|
-
[Bundles.MainnetIds.
|
|
577
|
-
strategyOrBundleId: Bundles.MainnetIds.
|
|
578
|
-
strategyId: Strategies.Identifiers.
|
|
579
|
-
protocol: PROTOCOLS.MakerDAO,
|
|
580
|
-
},
|
|
581
|
-
[Bundles.MainnetIds.AAVE_V3_SW_LIQUIDATION_PROTECTION]: {
|
|
582
|
-
strategyOrBundleId: Bundles.MainnetIds.AAVE_V3_SW_LIQUIDATION_PROTECTION,
|
|
583
|
-
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
584
|
-
protocol: PROTOCOLS.AaveV3,
|
|
585
|
-
},
|
|
586
|
-
[Bundles.MainnetIds.AAVE_V4_SW_LIQUIDATION_PROTECTION]: {
|
|
587
|
-
strategyOrBundleId: Bundles.MainnetIds.AAVE_V4_SW_LIQUIDATION_PROTECTION,
|
|
588
|
-
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
589
|
-
protocol: PROTOCOLS.AaveV4,
|
|
590
|
-
},
|
|
591
|
-
[Bundles.MainnetIds.SPARK_SW_LIQUIDATION_PROTECTION]: {
|
|
592
|
-
strategyOrBundleId: Bundles.MainnetIds.SPARK_SW_LIQUIDATION_PROTECTION,
|
|
593
|
-
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
594
|
-
protocol: PROTOCOLS.Spark,
|
|
595
|
-
},
|
|
596
|
-
[Bundles.MainnetIds.COMP_V3_SW_LIQUIDATION_PROTECTION]: {
|
|
597
|
-
strategyOrBundleId: Bundles.MainnetIds.COMP_V3_SW_LIQUIDATION_PROTECTION,
|
|
598
|
-
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
599
|
-
protocol: PROTOCOLS.CompoundV3,
|
|
600
|
-
},
|
|
601
|
-
[Bundles.MainnetIds.COMP_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
602
|
-
strategyOrBundleId: Bundles.MainnetIds.COMP_V3_EOA_LIQUIDATION_PROTECTION,
|
|
603
|
-
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
604
|
-
protocol: PROTOCOLS.CompoundV3,
|
|
605
|
-
},
|
|
606
|
-
[Bundles.MainnetIds.MORPHO_BLUE_SW_LIQUIDATION_PROTECTION]: {
|
|
607
|
-
strategyOrBundleId:
|
|
608
|
-
Bundles.MainnetIds.MORPHO_BLUE_SW_LIQUIDATION_PROTECTION,
|
|
609
|
-
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
576
|
+
[Bundles.MainnetIds.MORPHO_BLUE_REPAY_ON_PRICE]: {
|
|
577
|
+
strategyOrBundleId: Bundles.MainnetIds.MORPHO_BLUE_REPAY_ON_PRICE,
|
|
578
|
+
strategyId: Strategies.Identifiers.RepayOnPrice,
|
|
610
579
|
protocol: PROTOCOLS.MorphoBlue,
|
|
611
580
|
},
|
|
612
|
-
[Bundles.MainnetIds.
|
|
613
|
-
strategyOrBundleId: Bundles.MainnetIds.
|
|
614
|
-
strategyId: Strategies.Identifiers.
|
|
615
|
-
protocol: PROTOCOLS.
|
|
616
|
-
},
|
|
617
|
-
[Bundles.MainnetIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
618
|
-
strategyOrBundleId: Bundles.MainnetIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION,
|
|
619
|
-
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
620
|
-
protocol: PROTOCOLS.AaveV3,
|
|
581
|
+
[Bundles.MainnetIds.MORPHO_BLUE_EOA_BOOST_ON_PRICE]: {
|
|
582
|
+
strategyOrBundleId: Bundles.MainnetIds.MORPHO_BLUE_EOA_BOOST_ON_PRICE,
|
|
583
|
+
strategyId: Strategies.Identifiers.EoaBoostOnPrice,
|
|
584
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
621
585
|
},
|
|
622
|
-
[Bundles.MainnetIds.
|
|
623
|
-
strategyOrBundleId: Bundles.MainnetIds.
|
|
624
|
-
strategyId: Strategies.Identifiers.
|
|
625
|
-
protocol: PROTOCOLS.
|
|
586
|
+
[Bundles.MainnetIds.MORPHO_BLUE_EOA_REPAY_ON_PRICE]: {
|
|
587
|
+
strategyOrBundleId: Bundles.MainnetIds.MORPHO_BLUE_EOA_REPAY_ON_PRICE,
|
|
588
|
+
strategyId: Strategies.Identifiers.EoaRepayOnPrice,
|
|
589
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
626
590
|
},
|
|
627
|
-
[Bundles.MainnetIds.
|
|
628
|
-
strategyOrBundleId: Bundles.MainnetIds.
|
|
629
|
-
strategyId: Strategies.Identifiers.
|
|
591
|
+
[Bundles.MainnetIds.MORPHO_BLUE_EOA_CLOSE]: {
|
|
592
|
+
strategyOrBundleId: Bundles.MainnetIds.MORPHO_BLUE_EOA_CLOSE,
|
|
593
|
+
strategyId: Strategies.Identifiers.EoaCloseOnPrice,
|
|
630
594
|
protocol: PROTOCOLS.MorphoBlue,
|
|
631
595
|
},
|
|
632
596
|
};
|
|
@@ -687,16 +651,7 @@ export const OPTIMISM_BUNDLES_INFO: OptimismBundleInfo = {
|
|
|
687
651
|
strategyId: Strategies.Identifiers.EoaCloseOnPrice,
|
|
688
652
|
protocol: PROTOCOLS.AaveV3,
|
|
689
653
|
},
|
|
690
|
-
|
|
691
|
-
strategyOrBundleId: Bundles.OptimismIds.AAVE_V3_SW_LIQUIDATION_PROTECTION,
|
|
692
|
-
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
693
|
-
protocol: PROTOCOLS.AaveV3,
|
|
694
|
-
},
|
|
695
|
-
[Bundles.OptimismIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
696
|
-
strategyOrBundleId: Bundles.OptimismIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION,
|
|
697
|
-
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
698
|
-
protocol: PROTOCOLS.AaveV3,
|
|
699
|
-
},
|
|
654
|
+
|
|
700
655
|
};
|
|
701
656
|
|
|
702
657
|
export const BASE_BUNDLES_INFO: BaseBundleInfo = {
|
|
@@ -835,35 +790,35 @@ export const BASE_BUNDLES_INFO: BaseBundleInfo = {
|
|
|
835
790
|
strategyId: Strategies.Identifiers.CloseOnPrice,
|
|
836
791
|
protocol: PROTOCOLS.MorphoBlue,
|
|
837
792
|
},
|
|
838
|
-
[Bundles.BaseIds.
|
|
839
|
-
strategyOrBundleId: Bundles.BaseIds.
|
|
840
|
-
strategyId: Strategies.Identifiers.
|
|
841
|
-
protocol: PROTOCOLS.
|
|
793
|
+
[Bundles.BaseIds.MORPHO_BLUE_REPAY_ON_PRICE]: {
|
|
794
|
+
strategyOrBundleId: Bundles.BaseIds.MORPHO_BLUE_REPAY_ON_PRICE,
|
|
795
|
+
strategyId: Strategies.Identifiers.RepayOnPrice,
|
|
796
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
842
797
|
},
|
|
843
|
-
[Bundles.BaseIds.
|
|
844
|
-
strategyOrBundleId: Bundles.BaseIds.
|
|
845
|
-
strategyId: Strategies.Identifiers.
|
|
846
|
-
protocol: PROTOCOLS.
|
|
798
|
+
[Bundles.BaseIds.MORPHO_BLUE_EOA_REPAY]: {
|
|
799
|
+
strategyOrBundleId: Bundles.BaseIds.MORPHO_BLUE_EOA_REPAY,
|
|
800
|
+
strategyId: Strategies.Identifiers.EoaRepay,
|
|
801
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
847
802
|
},
|
|
848
|
-
[Bundles.BaseIds.
|
|
849
|
-
strategyOrBundleId: Bundles.BaseIds.
|
|
850
|
-
strategyId: Strategies.Identifiers.
|
|
851
|
-
protocol: PROTOCOLS.
|
|
803
|
+
[Bundles.BaseIds.MORPHO_BLUE_EOA_BOOST]: {
|
|
804
|
+
strategyOrBundleId: Bundles.BaseIds.MORPHO_BLUE_EOA_BOOST,
|
|
805
|
+
strategyId: Strategies.Identifiers.EoaBoost,
|
|
806
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
852
807
|
},
|
|
853
|
-
[Bundles.BaseIds.
|
|
854
|
-
strategyOrBundleId: Bundles.BaseIds.
|
|
855
|
-
strategyId: Strategies.Identifiers.
|
|
808
|
+
[Bundles.BaseIds.MORPHO_BLUE_EOA_BOOST_ON_PRICE]: {
|
|
809
|
+
strategyOrBundleId: Bundles.BaseIds.MORPHO_BLUE_EOA_BOOST_ON_PRICE,
|
|
810
|
+
strategyId: Strategies.Identifiers.EoaBoostOnPrice,
|
|
856
811
|
protocol: PROTOCOLS.MorphoBlue,
|
|
857
812
|
},
|
|
858
|
-
[Bundles.BaseIds.
|
|
859
|
-
strategyOrBundleId: Bundles.BaseIds.
|
|
860
|
-
strategyId: Strategies.Identifiers.
|
|
861
|
-
protocol: PROTOCOLS.
|
|
813
|
+
[Bundles.BaseIds.MORPHO_BLUE_EOA_REPAY_ON_PRICE]: {
|
|
814
|
+
strategyOrBundleId: Bundles.BaseIds.MORPHO_BLUE_EOA_REPAY_ON_PRICE,
|
|
815
|
+
strategyId: Strategies.Identifiers.EoaRepayOnPrice,
|
|
816
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
862
817
|
},
|
|
863
|
-
[Bundles.BaseIds.
|
|
864
|
-
strategyOrBundleId: Bundles.BaseIds.
|
|
865
|
-
strategyId: Strategies.Identifiers.
|
|
866
|
-
protocol: PROTOCOLS.
|
|
818
|
+
[Bundles.BaseIds.MORPHO_BLUE_EOA_CLOSE]: {
|
|
819
|
+
strategyOrBundleId: Bundles.BaseIds.MORPHO_BLUE_EOA_CLOSE,
|
|
820
|
+
strategyId: Strategies.Identifiers.EoaCloseOnPrice,
|
|
821
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
867
822
|
},
|
|
868
823
|
};
|
|
869
824
|
|
|
@@ -1013,40 +968,24 @@ export const ARBITRUM_BUNDLES_INFO: ArbitrumBundleInfo = {
|
|
|
1013
968
|
strategyId: Strategies.Identifiers.CloseOnPrice,
|
|
1014
969
|
protocol: PROTOCOLS.MorphoBlue,
|
|
1015
970
|
},
|
|
1016
|
-
[Bundles.ArbitrumIds.
|
|
1017
|
-
strategyOrBundleId: Bundles.ArbitrumIds.
|
|
1018
|
-
strategyId: Strategies.Identifiers.
|
|
1019
|
-
protocol: PROTOCOLS.AaveV3,
|
|
1020
|
-
},
|
|
1021
|
-
[Bundles.ArbitrumIds.COMP_V3_SW_LIQUIDATION_PROTECTION]: {
|
|
1022
|
-
strategyOrBundleId: Bundles.ArbitrumIds.COMP_V3_SW_LIQUIDATION_PROTECTION,
|
|
1023
|
-
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
1024
|
-
protocol: PROTOCOLS.CompoundV3,
|
|
1025
|
-
},
|
|
1026
|
-
[Bundles.ArbitrumIds.COMP_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
1027
|
-
strategyOrBundleId: Bundles.ArbitrumIds.COMP_V3_EOA_LIQUIDATION_PROTECTION,
|
|
1028
|
-
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
1029
|
-
protocol: PROTOCOLS.CompoundV3,
|
|
1030
|
-
},
|
|
1031
|
-
[Bundles.ArbitrumIds.MORPHO_BLUE_SW_LIQUIDATION_PROTECTION]: {
|
|
1032
|
-
strategyOrBundleId:
|
|
1033
|
-
Bundles.ArbitrumIds.MORPHO_BLUE_SW_LIQUIDATION_PROTECTION,
|
|
1034
|
-
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
971
|
+
[Bundles.ArbitrumIds.MORPHO_BLUE_REPAY_ON_PRICE]: {
|
|
972
|
+
strategyOrBundleId: Bundles.ArbitrumIds.MORPHO_BLUE_REPAY_ON_PRICE,
|
|
973
|
+
strategyId: Strategies.Identifiers.RepayOnPrice,
|
|
1035
974
|
protocol: PROTOCOLS.MorphoBlue,
|
|
1036
975
|
},
|
|
1037
|
-
[Bundles.ArbitrumIds.
|
|
1038
|
-
strategyOrBundleId: Bundles.ArbitrumIds.
|
|
1039
|
-
strategyId: Strategies.Identifiers.
|
|
1040
|
-
protocol: PROTOCOLS.
|
|
976
|
+
[Bundles.ArbitrumIds.MORPHO_BLUE_EOA_BOOST_ON_PRICE]: {
|
|
977
|
+
strategyOrBundleId: Bundles.ArbitrumIds.MORPHO_BLUE_EOA_BOOST_ON_PRICE,
|
|
978
|
+
strategyId: Strategies.Identifiers.EoaBoostOnPrice,
|
|
979
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
1041
980
|
},
|
|
1042
|
-
[Bundles.ArbitrumIds.
|
|
1043
|
-
strategyOrBundleId: Bundles.ArbitrumIds.
|
|
1044
|
-
strategyId: Strategies.Identifiers.
|
|
1045
|
-
protocol: PROTOCOLS.
|
|
981
|
+
[Bundles.ArbitrumIds.MORPHO_BLUE_EOA_REPAY_ON_PRICE]: {
|
|
982
|
+
strategyOrBundleId: Bundles.ArbitrumIds.MORPHO_BLUE_EOA_REPAY_ON_PRICE,
|
|
983
|
+
strategyId: Strategies.Identifiers.EoaRepayOnPrice,
|
|
984
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
1046
985
|
},
|
|
1047
|
-
[Bundles.ArbitrumIds.
|
|
1048
|
-
strategyOrBundleId: Bundles.ArbitrumIds.
|
|
1049
|
-
strategyId: Strategies.Identifiers.
|
|
986
|
+
[Bundles.ArbitrumIds.MORPHO_BLUE_EOA_CLOSE]: {
|
|
987
|
+
strategyOrBundleId: Bundles.ArbitrumIds.MORPHO_BLUE_EOA_CLOSE,
|
|
988
|
+
strategyId: Strategies.Identifiers.EoaCloseOnPrice,
|
|
1050
989
|
protocol: PROTOCOLS.MorphoBlue,
|
|
1051
990
|
},
|
|
1052
991
|
};
|
package/src/index.ts
CHANGED
|
@@ -24,34 +24,18 @@ import * as enums from './types/enums';
|
|
|
24
24
|
import type * as types from './types';
|
|
25
25
|
|
|
26
26
|
import {
|
|
27
|
-
getRatioStateInfoForAaveCloseStrategy,
|
|
28
|
-
compareSubHashes,
|
|
29
|
-
encodeSubId,
|
|
30
|
-
getCloseStrategyType,
|
|
27
|
+
getRatioStateInfoForAaveCloseStrategy, compareSubHashes, encodeSubId, getCloseStrategyType,
|
|
31
28
|
} from './services/utils';
|
|
32
29
|
|
|
33
30
|
const utils = {
|
|
34
|
-
compareSubHashes,
|
|
35
|
-
encodeSubId,
|
|
36
|
-
getCloseStrategyType,
|
|
37
|
-
getRatioStateInfoForAaveCloseStrategy,
|
|
31
|
+
getRatioStateInfoForAaveCloseStrategy, compareSubHashes, encodeSubId, getCloseStrategyType,
|
|
38
32
|
};
|
|
39
33
|
|
|
40
34
|
export {
|
|
41
|
-
|
|
42
|
-
BaseStrategies,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
LegacyCompoundAutomation,
|
|
46
|
-
LegacyMakerAutomation,
|
|
47
|
-
OptimismStrategies,
|
|
48
|
-
constants,
|
|
49
|
-
enums,
|
|
50
|
-
strategiesService,
|
|
51
|
-
strategySubService,
|
|
52
|
-
subDataService,
|
|
53
|
-
triggerService,
|
|
54
|
-
utils,
|
|
35
|
+
LegacyMakerAutomation, LegacyAaveAutomation, LegacyCompoundAutomation,
|
|
36
|
+
EthereumStrategies, OptimismStrategies, ArbitrumStrategies, BaseStrategies,
|
|
37
|
+
triggerService, subDataService, strategySubService, utils,
|
|
38
|
+
enums, constants, strategiesService,
|
|
55
39
|
};
|
|
56
40
|
|
|
57
41
|
export type { types };
|