@defisaver/automation-sdk 3.3.14 → 3.3.15-liq-prot-1-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/constants/index.js +130 -0
- package/cjs/index.d.ts +4 -3
- package/cjs/index.js +6 -2
- package/cjs/services/strategiesService.js +178 -17
- package/cjs/services/strategySubService.d.ts +14 -13
- package/cjs/services/strategySubService.js +79 -63
- package/cjs/services/strategySubService.test.js +0 -234
- package/cjs/services/subDataService.d.ts +92 -4
- package/cjs/services/subDataService.js +245 -35
- package/cjs/services/subDataService.test.js +0 -110
- package/cjs/services/utils.d.ts +3 -1
- package/cjs/services/utils.js +34 -1
- package/cjs/services/utils.test.js +25 -0
- package/cjs/types/enums.d.ts +36 -6
- package/cjs/types/enums.js +30 -0
- package/esm/constants/index.js +130 -0
- package/esm/index.d.ts +4 -3
- package/esm/index.js +7 -3
- package/esm/services/strategiesService.js +178 -17
- package/esm/services/strategySubService.d.ts +14 -13
- package/esm/services/strategySubService.js +79 -60
- package/esm/services/strategySubService.test.js +2 -236
- package/esm/services/subDataService.d.ts +92 -4
- package/esm/services/subDataService.js +243 -34
- package/esm/services/subDataService.test.js +0 -110
- package/esm/services/utils.d.ts +3 -1
- package/esm/services/utils.js +32 -1
- package/esm/services/utils.test.js +27 -2
- package/esm/types/enums.d.ts +36 -6
- package/esm/types/enums.js +30 -0
- package/package.json +1 -1
- package/src/constants/index.ts +132 -1
- package/src/index.ts +24 -6
- package/src/services/strategiesService.ts +242 -17
- package/src/services/strategySubService.test.ts +0 -279
- package/src/services/strategySubService.ts +209 -116
- package/src/services/subDataService.test.ts +0 -120
- package/src/services/subDataService.ts +335 -49
- package/src/services/utils.test.ts +32 -1
- package/src/services/utils.ts +32 -1
- package/src/types/enums.ts +30 -2
|
@@ -713,74 +713,6 @@ describe('Feature: subDataService.ts', () => {
|
|
|
713
713
|
});
|
|
714
714
|
});
|
|
715
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);
|
|
780
|
-
});
|
|
781
|
-
});
|
|
782
|
-
});
|
|
783
|
-
});
|
|
784
716
|
describe('When testing subDataService.morphoAaveV2LeverageManagementSubData', () => {
|
|
785
717
|
describe('encode()', () => {
|
|
786
718
|
const examples = [
|
|
@@ -1337,48 +1269,6 @@ describe('Feature: subDataService.ts', () => {
|
|
|
1337
1269
|
});
|
|
1338
1270
|
});
|
|
1339
1271
|
});
|
|
1340
|
-
describe('When testing subDataService.compoundV3L2LeverageManagementSubData', () => {
|
|
1341
|
-
describe('encode()', () => {
|
|
1342
|
-
const examples = [
|
|
1343
|
-
[
|
|
1344
|
-
'0x0313D212133AFab8F2b829B1066c7e43caD94e2c0213D212133AfaB8F2b829B1066C7E43cAD94E2c000000000000000016345785d8a0000000000000000000001e87f85809dc0000000000000000000018fae27693b4000000000000000000001a5e27eef13e00000100',
|
|
1345
|
-
[web3Utils.toChecksumAddress('0x0313d212133AFaB8F2B829B1066c7E43cAd94E2c'), web3Utils.toChecksumAddress('0x0213d212133AFaB8F2B829B1066c7E43cAd94E2c'), 160, 220, 180, 190, true, false]
|
|
1346
|
-
],
|
|
1347
|
-
[
|
|
1348
|
-
'0x0313D212133AFab8F2b829B1066c7e43caD94e2c0413d212133afAb8F2B829b1066C7e43cAd94e2c000000000000000016345785d8a0000000000000000000001e87f85809dc0000000000000000000018fae27693b4000000000000000000000f43fc2c04ee00000000',
|
|
1349
|
-
[web3Utils.toChecksumAddress('0x0313d212133AFaB8F2B829B1066c7E43cAd94E2c'), web3Utils.toChecksumAddress('0x0413d212133AFaB8F2B829B1066c7E43cAd94E2c'), 160, 220, 180, 110, false, false]
|
|
1350
|
-
],
|
|
1351
|
-
];
|
|
1352
|
-
examples.forEach(([expected, actual]) => {
|
|
1353
|
-
it(`Given ${actual} should return expected value: ${expected}`, () => {
|
|
1354
|
-
(0, chai_1.expect)(subDataService.compoundV3L2LeverageManagementSubData.encode(...actual)).to.eql(expected);
|
|
1355
|
-
});
|
|
1356
|
-
});
|
|
1357
|
-
});
|
|
1358
|
-
describe('decode()', () => {
|
|
1359
|
-
const examples = [
|
|
1360
|
-
[
|
|
1361
|
-
{ targetRatio: 200 },
|
|
1362
|
-
[
|
|
1363
|
-
'0x0000000000000000000000000313d212133AFaB8F2B829B1066c7E43cAd94E2c', '0x0000000000000000000000000213d212133AFaB8F2B829B1066c7E43cAd94E2c',
|
|
1364
|
-
'0x0000000000000000000000000000000000000000000000000000000000000001', '0x0000000000000000000000000000000000000000000000001bc16d674ec80000',
|
|
1365
|
-
],
|
|
1366
|
-
],
|
|
1367
|
-
[
|
|
1368
|
-
{ targetRatio: 123 },
|
|
1369
|
-
[
|
|
1370
|
-
'0x0000000000000000000000000313d212133AFaB8F2B829B1066c7E43cAd94E2c', '0x0000000000000000000000000413d212133AFaB8F2B829B1066c7E43cAd94E2c',
|
|
1371
|
-
'0x0000000000000000000000000000000000000000000000000000000000000000', '0x0000000000000000000000000000000000000000000000001111d67bb1bb0000',
|
|
1372
|
-
],
|
|
1373
|
-
],
|
|
1374
|
-
];
|
|
1375
|
-
examples.forEach(([expected, actual]) => {
|
|
1376
|
-
it(`Given ${actual} should return expected value: ${JSON.stringify(expected)}`, () => {
|
|
1377
|
-
(0, chai_1.expect)(subDataService.compoundV3L2LeverageManagementSubData.decode(actual)).to.eql(expected);
|
|
1378
|
-
});
|
|
1379
|
-
});
|
|
1380
|
-
});
|
|
1381
|
-
});
|
|
1382
1272
|
describe('When testing subDataService.morphoBlueLeverageManagementSubData', () => {
|
|
1383
1273
|
describe('encode()', () => {
|
|
1384
1274
|
const examples = [
|
package/cjs/services/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EthereumAddress } from '../types';
|
|
2
|
-
import { ChainId, CloseStrategyType, CloseToAssetType, RatioState } from '../types/enums';
|
|
2
|
+
import { Bundles, ChainId, CloseStrategyType, CloseToAssetType, RatioState } from '../types/enums';
|
|
3
3
|
export declare function isDefined<T>(value: T): value is NonNullable<T>;
|
|
4
4
|
export declare function isUndefined(value: unknown): boolean;
|
|
5
5
|
export declare function compareAddresses(firstAddress: EthereumAddress, secondAddress: EthereumAddress): boolean;
|
|
@@ -28,3 +28,5 @@ export declare function getStopLossAndTakeProfitTypeByCloseStrategyType(closeStr
|
|
|
28
28
|
stopLossType: CloseToAssetType | undefined;
|
|
29
29
|
takeProfitType: CloseToAssetType | undefined;
|
|
30
30
|
};
|
|
31
|
+
export declare function getBundleIdsByNetwork(network: ChainId): typeof Bundles.MainnetIds | typeof Bundles.ArbitrumIds | typeof Bundles.BaseIds;
|
|
32
|
+
export declare function getCompoundV3LeverageManagementBundleId(network: ChainId, isEOA: boolean, isBoost: boolean): number;
|
package/cjs/services/utils.js
CHANGED
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.getStopLossAndTakeProfitTypeByCloseStrategyType = exports.getCloseStrategyType = exports.getPositionId = exports.getRatioStateInfoForAaveCloseStrategy = exports.requireAddresses = exports.requireAddress = exports.isEmptyBytes = exports.isRatioStateUnder = exports.isRatioStateOver = exports.weiToRatioPercentage = exports.ratioPercentageToWei = exports.encodeSubId = exports.compareSubHashes = exports.wethToEthByAddress = exports.wethToEth = exports.ethToWeth = exports.addToObjectIf = exports.addToArrayIf = exports.isAddress = exports.compareAddresses = exports.isUndefined = exports.isDefined = void 0;
|
|
29
|
+
exports.getCompoundV3LeverageManagementBundleId = exports.getBundleIdsByNetwork = exports.getStopLossAndTakeProfitTypeByCloseStrategyType = exports.getCloseStrategyType = exports.getPositionId = exports.getRatioStateInfoForAaveCloseStrategy = exports.requireAddresses = exports.requireAddress = exports.isEmptyBytes = exports.isRatioStateUnder = exports.isRatioStateOver = exports.weiToRatioPercentage = exports.ratioPercentageToWei = exports.encodeSubId = exports.compareSubHashes = exports.wethToEthByAddress = exports.wethToEth = exports.ethToWeth = exports.addToObjectIf = exports.addToArrayIf = exports.isAddress = exports.compareAddresses = exports.isUndefined = exports.isDefined = void 0;
|
|
30
30
|
const decimal_js_1 = __importDefault(require("decimal.js"));
|
|
31
31
|
const web3Utils = __importStar(require("web3-utils"));
|
|
32
32
|
const web3_eth_abi_1 = __importDefault(require("web3-eth-abi"));
|
|
@@ -188,3 +188,36 @@ function getStopLossAndTakeProfitTypeByCloseStrategyType(closeStrategyType) {
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
exports.getStopLossAndTakeProfitTypeByCloseStrategyType = getStopLossAndTakeProfitTypeByCloseStrategyType;
|
|
191
|
+
function getBundleIdsByNetwork(network) {
|
|
192
|
+
switch (Number(network)) {
|
|
193
|
+
case enums_1.ChainId.Ethereum:
|
|
194
|
+
return enums_1.Bundles.MainnetIds;
|
|
195
|
+
case enums_1.ChainId.Arbitrum:
|
|
196
|
+
return enums_1.Bundles.ArbitrumIds;
|
|
197
|
+
case enums_1.ChainId.Base:
|
|
198
|
+
return enums_1.Bundles.BaseIds;
|
|
199
|
+
default:
|
|
200
|
+
throw new Error(`Unsupported network ${network}`);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
exports.getBundleIdsByNetwork = getBundleIdsByNetwork;
|
|
204
|
+
// Mainnet uses the V2 bundle ids; L2s use the original bundle ids.
|
|
205
|
+
function getCompoundV3LeverageManagementBundleId(network, isEOA, isBoost) {
|
|
206
|
+
switch (Number(network)) {
|
|
207
|
+
case enums_1.ChainId.Ethereum:
|
|
208
|
+
if (isEOA)
|
|
209
|
+
return isBoost ? enums_1.Bundles.MainnetIds.COMP_V3_EOA_BOOST_V2_BUNDLE : enums_1.Bundles.MainnetIds.COMP_V3_EOA_REPAY_V2_BUNDLE;
|
|
210
|
+
return isBoost ? enums_1.Bundles.MainnetIds.COMP_V3_SW_BOOST_V2_BUNDLE : enums_1.Bundles.MainnetIds.COMP_V3_SW_REPAY_V2_BUNDLE;
|
|
211
|
+
case enums_1.ChainId.Base:
|
|
212
|
+
if (isEOA)
|
|
213
|
+
return isBoost ? enums_1.Bundles.BaseIds.COMP_V3_EOA_BOOST : enums_1.Bundles.BaseIds.COMP_V3_EOA_REPAY;
|
|
214
|
+
return isBoost ? enums_1.Bundles.BaseIds.COMP_V3_SW_BOOST_BUNDLE : enums_1.Bundles.BaseIds.COMP_V3_SW_REPAY_BUNDLE;
|
|
215
|
+
case enums_1.ChainId.Arbitrum:
|
|
216
|
+
if (isEOA)
|
|
217
|
+
return isBoost ? enums_1.Bundles.ArbitrumIds.COMP_V3_EOA_BOOST : enums_1.Bundles.ArbitrumIds.COMP_V3_EOA_REPAY;
|
|
218
|
+
return isBoost ? enums_1.Bundles.ArbitrumIds.COMP_V3_SW_BOOST_BUNDLE : enums_1.Bundles.ArbitrumIds.COMP_V3_SW_REPAY_BUNDLE;
|
|
219
|
+
default:
|
|
220
|
+
throw new Error(`Compound V3 leverage management is not supported on network ${network}`);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
exports.getCompoundV3LeverageManagementBundleId = getCompoundV3LeverageManagementBundleId;
|
|
@@ -296,4 +296,29 @@ describe('Feature: utils.ts', () => {
|
|
|
296
296
|
});
|
|
297
297
|
});
|
|
298
298
|
});
|
|
299
|
+
describe('When testing utils.getCompoundV3LeverageManagementBundleId()', () => {
|
|
300
|
+
// Mainnet uses the V2 bundle ids; L2s use the original bundle ids.
|
|
301
|
+
const examples = [
|
|
302
|
+
[enums_1.Bundles.MainnetIds.COMP_V3_SW_REPAY_V2_BUNDLE, [enums_1.ChainId.Ethereum, false, false]],
|
|
303
|
+
[enums_1.Bundles.MainnetIds.COMP_V3_SW_BOOST_V2_BUNDLE, [enums_1.ChainId.Ethereum, false, true]],
|
|
304
|
+
[enums_1.Bundles.MainnetIds.COMP_V3_EOA_REPAY_V2_BUNDLE, [enums_1.ChainId.Ethereum, true, false]],
|
|
305
|
+
[enums_1.Bundles.MainnetIds.COMP_V3_EOA_BOOST_V2_BUNDLE, [enums_1.ChainId.Ethereum, true, true]],
|
|
306
|
+
[enums_1.Bundles.BaseIds.COMP_V3_SW_REPAY_BUNDLE, [enums_1.ChainId.Base, false, false]],
|
|
307
|
+
[enums_1.Bundles.BaseIds.COMP_V3_SW_BOOST_BUNDLE, [enums_1.ChainId.Base, false, true]],
|
|
308
|
+
[enums_1.Bundles.BaseIds.COMP_V3_EOA_REPAY, [enums_1.ChainId.Base, true, false]],
|
|
309
|
+
[enums_1.Bundles.BaseIds.COMP_V3_EOA_BOOST, [enums_1.ChainId.Base, true, true]],
|
|
310
|
+
[enums_1.Bundles.ArbitrumIds.COMP_V3_SW_REPAY_BUNDLE, [enums_1.ChainId.Arbitrum, false, false]],
|
|
311
|
+
[enums_1.Bundles.ArbitrumIds.COMP_V3_SW_BOOST_BUNDLE, [enums_1.ChainId.Arbitrum, false, true]],
|
|
312
|
+
[enums_1.Bundles.ArbitrumIds.COMP_V3_EOA_REPAY, [enums_1.ChainId.Arbitrum, true, false]],
|
|
313
|
+
[enums_1.Bundles.ArbitrumIds.COMP_V3_EOA_BOOST, [enums_1.ChainId.Arbitrum, true, true]],
|
|
314
|
+
];
|
|
315
|
+
examples.forEach(([expected, actual]) => {
|
|
316
|
+
it(`Given ${actual} should return expected value: ${expected}`, () => {
|
|
317
|
+
(0, chai_1.expect)((0, utils_1.getCompoundV3LeverageManagementBundleId)(...actual)).to.equal(expected);
|
|
318
|
+
});
|
|
319
|
+
});
|
|
320
|
+
it(`Given ${enums_1.ChainId.Optimism} (unsupported) should throw an error`, () => {
|
|
321
|
+
(0, chai_1.expect)(() => (0, utils_1.getCompoundV3LeverageManagementBundleId)(enums_1.ChainId.Optimism, false, false)).to.throw(Error);
|
|
322
|
+
});
|
|
323
|
+
});
|
|
299
324
|
});
|
package/cjs/types/enums.d.ts
CHANGED
|
@@ -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 = "eoa-liquidation-protection"
|
|
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 {
|
|
@@ -224,7 +228,18 @@ export declare namespace Bundles {
|
|
|
224
228
|
AAVE_V4_EOA_BOOST = 67,
|
|
225
229
|
AAVE_V4_EOA_REPAY_ON_PRICE = 68,
|
|
226
230
|
AAVE_V4_EOA_BOOST_ON_PRICE = 69,
|
|
227
|
-
AAVE_V4_EOA_CLOSE = 70
|
|
231
|
+
AAVE_V4_EOA_CLOSE = 70,
|
|
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
|
|
228
243
|
}
|
|
229
244
|
enum OptimismIds {
|
|
230
245
|
AAVE_V3_REPAY = 0,
|
|
@@ -237,7 +252,9 @@ export declare namespace Bundles {
|
|
|
237
252
|
AAVE_V3_EOA_BOOST = 7,
|
|
238
253
|
AAVE_V3_EOA_REPAY_ON_PRICE = 8,
|
|
239
254
|
AAVE_V3_EOA_BOOST_ON_PRICE = 9,
|
|
240
|
-
AAVE_V3_EOA_CLOSE = 10
|
|
255
|
+
AAVE_V3_EOA_CLOSE = 10,
|
|
256
|
+
AAVE_V3_SW_LIQUIDATION_PROTECTION = 11,
|
|
257
|
+
AAVE_V3_EOA_LIQUIDATION_PROTECTION = 12
|
|
241
258
|
}
|
|
242
259
|
enum BaseIds {
|
|
243
260
|
AAVE_V3_REPAY = 0,
|
|
@@ -266,7 +283,13 @@ export declare namespace Bundles {
|
|
|
266
283
|
AAVE_V3_EOA_REPAY_ON_PRICE = 25,
|
|
267
284
|
AAVE_V3_EOA_BOOST_ON_PRICE = 26,
|
|
268
285
|
AAVE_V3_EOA_CLOSE = 27,
|
|
269
|
-
MORPHO_BLUE_CLOSE = 28
|
|
286
|
+
MORPHO_BLUE_CLOSE = 28,
|
|
287
|
+
AAVE_V3_SW_LIQUIDATION_PROTECTION = 29,
|
|
288
|
+
FLUID_T1_SW_LIQUIDATION_PROTECTION = 30,
|
|
289
|
+
COMP_V3_SW_LIQUIDATION_PROTECTION = 32,
|
|
290
|
+
COMP_V3_EOA_LIQUIDATION_PROTECTION = 33,
|
|
291
|
+
AAVE_V3_EOA_LIQUIDATION_PROTECTION = 34,
|
|
292
|
+
MORPHO_BLUE_SW_LIQUIDATION_PROTECTION = 35
|
|
270
293
|
}
|
|
271
294
|
enum ArbitrumIds {
|
|
272
295
|
AAVE_V3_REPAY = 0,
|
|
@@ -297,6 +320,13 @@ export declare namespace Bundles {
|
|
|
297
320
|
MORPHO_BLUE_BOOST_ON_PRICE = 25,
|
|
298
321
|
MORPHO_BLUE_EOA_REPAY = 26,
|
|
299
322
|
MORPHO_BLUE_EOA_BOOST = 27,
|
|
300
|
-
MORPHO_BLUE_CLOSE = 28
|
|
323
|
+
MORPHO_BLUE_CLOSE = 28,
|
|
324
|
+
AAVE_V3_SW_LIQUIDATION_PROTECTION = 29,
|
|
325
|
+
FLUID_T1_SW_LIQUIDATION_PROTECTION = 30,
|
|
326
|
+
MORPHO_BLUE_SW_LIQUIDATION_PROTECTION = 31,
|
|
327
|
+
COMP_V3_SW_LIQUIDATION_PROTECTION = 32,
|
|
328
|
+
COMP_V3_EOA_LIQUIDATION_PROTECTION = 33,
|
|
329
|
+
AAVE_V3_EOA_LIQUIDATION_PROTECTION = 34,
|
|
330
|
+
MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION = 35
|
|
301
331
|
}
|
|
302
332
|
}
|
package/cjs/types/enums.js
CHANGED
|
@@ -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"] = "eoa-liquidation-protection";
|
|
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,6 +252,17 @@ 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 = Bundles.MainnetIds || (Bundles.MainnetIds = {}));
|
|
252
267
|
let OptimismIds;
|
|
253
268
|
(function (OptimismIds) {
|
|
@@ -262,6 +277,8 @@ var Bundles;
|
|
|
262
277
|
OptimismIds[OptimismIds["AAVE_V3_EOA_REPAY_ON_PRICE"] = 8] = "AAVE_V3_EOA_REPAY_ON_PRICE";
|
|
263
278
|
OptimismIds[OptimismIds["AAVE_V3_EOA_BOOST_ON_PRICE"] = 9] = "AAVE_V3_EOA_BOOST_ON_PRICE";
|
|
264
279
|
OptimismIds[OptimismIds["AAVE_V3_EOA_CLOSE"] = 10] = "AAVE_V3_EOA_CLOSE";
|
|
280
|
+
OptimismIds[OptimismIds["AAVE_V3_SW_LIQUIDATION_PROTECTION"] = 11] = "AAVE_V3_SW_LIQUIDATION_PROTECTION";
|
|
281
|
+
OptimismIds[OptimismIds["AAVE_V3_EOA_LIQUIDATION_PROTECTION"] = 12] = "AAVE_V3_EOA_LIQUIDATION_PROTECTION";
|
|
265
282
|
})(OptimismIds = Bundles.OptimismIds || (Bundles.OptimismIds = {}));
|
|
266
283
|
let BaseIds;
|
|
267
284
|
(function (BaseIds) {
|
|
@@ -292,6 +309,12 @@ var Bundles;
|
|
|
292
309
|
BaseIds[BaseIds["AAVE_V3_EOA_BOOST_ON_PRICE"] = 26] = "AAVE_V3_EOA_BOOST_ON_PRICE";
|
|
293
310
|
BaseIds[BaseIds["AAVE_V3_EOA_CLOSE"] = 27] = "AAVE_V3_EOA_CLOSE";
|
|
294
311
|
BaseIds[BaseIds["MORPHO_BLUE_CLOSE"] = 28] = "MORPHO_BLUE_CLOSE";
|
|
312
|
+
BaseIds[BaseIds["AAVE_V3_SW_LIQUIDATION_PROTECTION"] = 29] = "AAVE_V3_SW_LIQUIDATION_PROTECTION";
|
|
313
|
+
BaseIds[BaseIds["FLUID_T1_SW_LIQUIDATION_PROTECTION"] = 30] = "FLUID_T1_SW_LIQUIDATION_PROTECTION";
|
|
314
|
+
BaseIds[BaseIds["COMP_V3_SW_LIQUIDATION_PROTECTION"] = 32] = "COMP_V3_SW_LIQUIDATION_PROTECTION";
|
|
315
|
+
BaseIds[BaseIds["COMP_V3_EOA_LIQUIDATION_PROTECTION"] = 33] = "COMP_V3_EOA_LIQUIDATION_PROTECTION";
|
|
316
|
+
BaseIds[BaseIds["AAVE_V3_EOA_LIQUIDATION_PROTECTION"] = 34] = "AAVE_V3_EOA_LIQUIDATION_PROTECTION";
|
|
317
|
+
BaseIds[BaseIds["MORPHO_BLUE_SW_LIQUIDATION_PROTECTION"] = 35] = "MORPHO_BLUE_SW_LIQUIDATION_PROTECTION";
|
|
295
318
|
})(BaseIds = Bundles.BaseIds || (Bundles.BaseIds = {}));
|
|
296
319
|
let ArbitrumIds;
|
|
297
320
|
(function (ArbitrumIds) {
|
|
@@ -324,5 +347,12 @@ var Bundles;
|
|
|
324
347
|
ArbitrumIds[ArbitrumIds["MORPHO_BLUE_EOA_REPAY"] = 26] = "MORPHO_BLUE_EOA_REPAY";
|
|
325
348
|
ArbitrumIds[ArbitrumIds["MORPHO_BLUE_EOA_BOOST"] = 27] = "MORPHO_BLUE_EOA_BOOST";
|
|
326
349
|
ArbitrumIds[ArbitrumIds["MORPHO_BLUE_CLOSE"] = 28] = "MORPHO_BLUE_CLOSE";
|
|
350
|
+
ArbitrumIds[ArbitrumIds["AAVE_V3_SW_LIQUIDATION_PROTECTION"] = 29] = "AAVE_V3_SW_LIQUIDATION_PROTECTION";
|
|
351
|
+
ArbitrumIds[ArbitrumIds["FLUID_T1_SW_LIQUIDATION_PROTECTION"] = 30] = "FLUID_T1_SW_LIQUIDATION_PROTECTION";
|
|
352
|
+
ArbitrumIds[ArbitrumIds["MORPHO_BLUE_SW_LIQUIDATION_PROTECTION"] = 31] = "MORPHO_BLUE_SW_LIQUIDATION_PROTECTION";
|
|
353
|
+
ArbitrumIds[ArbitrumIds["COMP_V3_SW_LIQUIDATION_PROTECTION"] = 32] = "COMP_V3_SW_LIQUIDATION_PROTECTION";
|
|
354
|
+
ArbitrumIds[ArbitrumIds["COMP_V3_EOA_LIQUIDATION_PROTECTION"] = 33] = "COMP_V3_EOA_LIQUIDATION_PROTECTION";
|
|
355
|
+
ArbitrumIds[ArbitrumIds["AAVE_V3_EOA_LIQUIDATION_PROTECTION"] = 34] = "AAVE_V3_EOA_LIQUIDATION_PROTECTION";
|
|
356
|
+
ArbitrumIds[ArbitrumIds["MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION"] = 35] = "MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION";
|
|
327
357
|
})(ArbitrumIds = Bundles.ArbitrumIds || (Bundles.ArbitrumIds = {}));
|
|
328
358
|
})(Bundles = exports.Bundles || (exports.Bundles = {}));
|
package/esm/constants/index.js
CHANGED
|
@@ -543,6 +543,61 @@ export const MAINNET_BUNDLES_INFO = {
|
|
|
543
543
|
strategyId: Strategies.Identifiers.EoaCloseOnPrice,
|
|
544
544
|
protocol: PROTOCOLS.AaveV4,
|
|
545
545
|
},
|
|
546
|
+
[Bundles.MainnetIds.MAKER_SW_LIQUIDATION_PROTECTION]: {
|
|
547
|
+
strategyOrBundleId: Bundles.MainnetIds.MAKER_SW_LIQUIDATION_PROTECTION,
|
|
548
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
549
|
+
protocol: PROTOCOLS.MakerDAO,
|
|
550
|
+
},
|
|
551
|
+
[Bundles.MainnetIds.AAVE_V3_SW_LIQUIDATION_PROTECTION]: {
|
|
552
|
+
strategyOrBundleId: Bundles.MainnetIds.AAVE_V3_SW_LIQUIDATION_PROTECTION,
|
|
553
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
554
|
+
protocol: PROTOCOLS.AaveV3,
|
|
555
|
+
},
|
|
556
|
+
[Bundles.MainnetIds.AAVE_V4_SW_LIQUIDATION_PROTECTION]: {
|
|
557
|
+
strategyOrBundleId: Bundles.MainnetIds.AAVE_V4_SW_LIQUIDATION_PROTECTION,
|
|
558
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
559
|
+
protocol: PROTOCOLS.AaveV4,
|
|
560
|
+
},
|
|
561
|
+
[Bundles.MainnetIds.SPARK_SW_LIQUIDATION_PROTECTION]: {
|
|
562
|
+
strategyOrBundleId: Bundles.MainnetIds.SPARK_SW_LIQUIDATION_PROTECTION,
|
|
563
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
564
|
+
protocol: PROTOCOLS.Spark,
|
|
565
|
+
},
|
|
566
|
+
[Bundles.MainnetIds.COMP_V3_SW_LIQUIDATION_PROTECTION]: {
|
|
567
|
+
strategyOrBundleId: Bundles.MainnetIds.COMP_V3_SW_LIQUIDATION_PROTECTION,
|
|
568
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
569
|
+
protocol: PROTOCOLS.CompoundV3,
|
|
570
|
+
},
|
|
571
|
+
[Bundles.MainnetIds.COMP_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
572
|
+
strategyOrBundleId: Bundles.MainnetIds.COMP_V3_EOA_LIQUIDATION_PROTECTION,
|
|
573
|
+
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
574
|
+
protocol: PROTOCOLS.CompoundV3,
|
|
575
|
+
},
|
|
576
|
+
[Bundles.MainnetIds.MORPHO_BLUE_SW_LIQUIDATION_PROTECTION]: {
|
|
577
|
+
strategyOrBundleId: Bundles.MainnetIds.MORPHO_BLUE_SW_LIQUIDATION_PROTECTION,
|
|
578
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
579
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
580
|
+
},
|
|
581
|
+
[Bundles.MainnetIds.FLUID_T1_SW_LIQUIDATION_PROTECTION]: {
|
|
582
|
+
strategyOrBundleId: Bundles.MainnetIds.FLUID_T1_SW_LIQUIDATION_PROTECTION,
|
|
583
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
584
|
+
protocol: PROTOCOLS.FluidT1,
|
|
585
|
+
},
|
|
586
|
+
[Bundles.MainnetIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
587
|
+
strategyOrBundleId: Bundles.MainnetIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION,
|
|
588
|
+
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
589
|
+
protocol: PROTOCOLS.AaveV3,
|
|
590
|
+
},
|
|
591
|
+
[Bundles.MainnetIds.AAVE_V4_EOA_LIQUIDATION_PROTECTION]: {
|
|
592
|
+
strategyOrBundleId: Bundles.MainnetIds.AAVE_V4_EOA_LIQUIDATION_PROTECTION,
|
|
593
|
+
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
594
|
+
protocol: PROTOCOLS.AaveV4,
|
|
595
|
+
},
|
|
596
|
+
[Bundles.MainnetIds.MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION]: {
|
|
597
|
+
strategyOrBundleId: Bundles.MainnetIds.MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION,
|
|
598
|
+
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
599
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
600
|
+
},
|
|
546
601
|
};
|
|
547
602
|
export const OPTIMISM_BUNDLES_INFO = {
|
|
548
603
|
[Bundles.OptimismIds.AAVE_V3_REPAY]: {
|
|
@@ -600,6 +655,16 @@ export const OPTIMISM_BUNDLES_INFO = {
|
|
|
600
655
|
strategyId: Strategies.Identifiers.EoaCloseOnPrice,
|
|
601
656
|
protocol: PROTOCOLS.AaveV3,
|
|
602
657
|
},
|
|
658
|
+
[Bundles.OptimismIds.AAVE_V3_SW_LIQUIDATION_PROTECTION]: {
|
|
659
|
+
strategyOrBundleId: Bundles.OptimismIds.AAVE_V3_SW_LIQUIDATION_PROTECTION,
|
|
660
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
661
|
+
protocol: PROTOCOLS.AaveV3,
|
|
662
|
+
},
|
|
663
|
+
[Bundles.OptimismIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
664
|
+
strategyOrBundleId: Bundles.OptimismIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION,
|
|
665
|
+
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
666
|
+
protocol: PROTOCOLS.AaveV3,
|
|
667
|
+
},
|
|
603
668
|
};
|
|
604
669
|
export const BASE_BUNDLES_INFO = {
|
|
605
670
|
[Bundles.BaseIds.AAVE_V3_REPAY]: {
|
|
@@ -737,6 +802,36 @@ export const BASE_BUNDLES_INFO = {
|
|
|
737
802
|
strategyId: Strategies.Identifiers.CloseOnPrice,
|
|
738
803
|
protocol: PROTOCOLS.MorphoBlue,
|
|
739
804
|
},
|
|
805
|
+
[Bundles.BaseIds.AAVE_V3_SW_LIQUIDATION_PROTECTION]: {
|
|
806
|
+
strategyOrBundleId: Bundles.BaseIds.AAVE_V3_SW_LIQUIDATION_PROTECTION,
|
|
807
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
808
|
+
protocol: PROTOCOLS.AaveV3,
|
|
809
|
+
},
|
|
810
|
+
[Bundles.BaseIds.COMP_V3_SW_LIQUIDATION_PROTECTION]: {
|
|
811
|
+
strategyOrBundleId: Bundles.BaseIds.COMP_V3_SW_LIQUIDATION_PROTECTION,
|
|
812
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
813
|
+
protocol: PROTOCOLS.CompoundV3,
|
|
814
|
+
},
|
|
815
|
+
[Bundles.BaseIds.COMP_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
816
|
+
strategyOrBundleId: Bundles.BaseIds.COMP_V3_EOA_LIQUIDATION_PROTECTION,
|
|
817
|
+
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
818
|
+
protocol: PROTOCOLS.CompoundV3,
|
|
819
|
+
},
|
|
820
|
+
[Bundles.BaseIds.MORPHO_BLUE_SW_LIQUIDATION_PROTECTION]: {
|
|
821
|
+
strategyOrBundleId: Bundles.BaseIds.MORPHO_BLUE_SW_LIQUIDATION_PROTECTION,
|
|
822
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
823
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
824
|
+
},
|
|
825
|
+
[Bundles.BaseIds.FLUID_T1_SW_LIQUIDATION_PROTECTION]: {
|
|
826
|
+
strategyOrBundleId: Bundles.BaseIds.FLUID_T1_SW_LIQUIDATION_PROTECTION,
|
|
827
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
828
|
+
protocol: PROTOCOLS.FluidT1,
|
|
829
|
+
},
|
|
830
|
+
[Bundles.BaseIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
831
|
+
strategyOrBundleId: Bundles.BaseIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION,
|
|
832
|
+
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
833
|
+
protocol: PROTOCOLS.AaveV3,
|
|
834
|
+
},
|
|
740
835
|
};
|
|
741
836
|
export const ARBITRUM_BUNDLES_INFO = {
|
|
742
837
|
[Bundles.ArbitrumIds.AAVE_V3_REPAY]: {
|
|
@@ -884,6 +979,41 @@ export const ARBITRUM_BUNDLES_INFO = {
|
|
|
884
979
|
strategyId: Strategies.Identifiers.CloseOnPrice,
|
|
885
980
|
protocol: PROTOCOLS.MorphoBlue,
|
|
886
981
|
},
|
|
982
|
+
[Bundles.ArbitrumIds.AAVE_V3_SW_LIQUIDATION_PROTECTION]: {
|
|
983
|
+
strategyOrBundleId: Bundles.ArbitrumIds.AAVE_V3_SW_LIQUIDATION_PROTECTION,
|
|
984
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
985
|
+
protocol: PROTOCOLS.AaveV3,
|
|
986
|
+
},
|
|
987
|
+
[Bundles.ArbitrumIds.COMP_V3_SW_LIQUIDATION_PROTECTION]: {
|
|
988
|
+
strategyOrBundleId: Bundles.ArbitrumIds.COMP_V3_SW_LIQUIDATION_PROTECTION,
|
|
989
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
990
|
+
protocol: PROTOCOLS.CompoundV3,
|
|
991
|
+
},
|
|
992
|
+
[Bundles.ArbitrumIds.COMP_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
993
|
+
strategyOrBundleId: Bundles.ArbitrumIds.COMP_V3_EOA_LIQUIDATION_PROTECTION,
|
|
994
|
+
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
995
|
+
protocol: PROTOCOLS.CompoundV3,
|
|
996
|
+
},
|
|
997
|
+
[Bundles.ArbitrumIds.MORPHO_BLUE_SW_LIQUIDATION_PROTECTION]: {
|
|
998
|
+
strategyOrBundleId: Bundles.ArbitrumIds.MORPHO_BLUE_SW_LIQUIDATION_PROTECTION,
|
|
999
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
1000
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
1001
|
+
},
|
|
1002
|
+
[Bundles.ArbitrumIds.FLUID_T1_SW_LIQUIDATION_PROTECTION]: {
|
|
1003
|
+
strategyOrBundleId: Bundles.ArbitrumIds.FLUID_T1_SW_LIQUIDATION_PROTECTION,
|
|
1004
|
+
strategyId: Strategies.Identifiers.LiquidationProtection,
|
|
1005
|
+
protocol: PROTOCOLS.FluidT1,
|
|
1006
|
+
},
|
|
1007
|
+
[Bundles.ArbitrumIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION]: {
|
|
1008
|
+
strategyOrBundleId: Bundles.ArbitrumIds.AAVE_V3_EOA_LIQUIDATION_PROTECTION,
|
|
1009
|
+
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
1010
|
+
protocol: PROTOCOLS.AaveV3,
|
|
1011
|
+
},
|
|
1012
|
+
[Bundles.ArbitrumIds.MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION]: {
|
|
1013
|
+
strategyOrBundleId: Bundles.ArbitrumIds.MORPHO_BLUE_EOA_LIQUIDATION_PROTECTION,
|
|
1014
|
+
strategyId: Strategies.Identifiers.EoaLiquidationProtection,
|
|
1015
|
+
protocol: PROTOCOLS.MorphoBlue,
|
|
1016
|
+
},
|
|
887
1017
|
};
|
|
888
1018
|
export const BUNDLES_INFO = {
|
|
889
1019
|
[ChainId.Ethereum]: MAINNET_BUNDLES_INFO,
|
package/esm/index.d.ts
CHANGED
|
@@ -13,12 +13,13 @@ import * as strategiesService from './services/strategiesService';
|
|
|
13
13
|
import * as constants from './constants';
|
|
14
14
|
import * as enums from './types/enums';
|
|
15
15
|
import type * as types from './types';
|
|
16
|
-
import { getRatioStateInfoForAaveCloseStrategy, compareSubHashes, encodeSubId, getCloseStrategyType } from './services/utils';
|
|
16
|
+
import { getRatioStateInfoForAaveCloseStrategy, compareSubHashes, encodeSubId, getCloseStrategyType, getCompoundV3LeverageManagementBundleId } from './services/utils';
|
|
17
17
|
declare const utils: {
|
|
18
|
-
getRatioStateInfoForAaveCloseStrategy: typeof getRatioStateInfoForAaveCloseStrategy;
|
|
19
18
|
compareSubHashes: typeof compareSubHashes;
|
|
20
19
|
encodeSubId: typeof encodeSubId;
|
|
21
20
|
getCloseStrategyType: typeof getCloseStrategyType;
|
|
21
|
+
getCompoundV3LeverageManagementBundleId: typeof getCompoundV3LeverageManagementBundleId;
|
|
22
|
+
getRatioStateInfoForAaveCloseStrategy: typeof getRatioStateInfoForAaveCloseStrategy;
|
|
22
23
|
};
|
|
23
|
-
export {
|
|
24
|
+
export { ArbitrumStrategies, BaseStrategies, EthereumStrategies, LegacyAaveAutomation, LegacyCompoundAutomation, LegacyMakerAutomation, OptimismStrategies, constants, enums, strategiesService, strategySubService, subDataService, triggerService, utils, };
|
|
24
25
|
export type { types };
|
package/esm/index.js
CHANGED
|
@@ -16,8 +16,12 @@ import * as strategySubService from './services/strategySubService';
|
|
|
16
16
|
import * as strategiesService from './services/strategiesService';
|
|
17
17
|
import * as constants from './constants';
|
|
18
18
|
import * as enums from './types/enums';
|
|
19
|
-
import { getRatioStateInfoForAaveCloseStrategy, compareSubHashes, encodeSubId, getCloseStrategyType, } from './services/utils';
|
|
19
|
+
import { getRatioStateInfoForAaveCloseStrategy, compareSubHashes, encodeSubId, getCloseStrategyType, getCompoundV3LeverageManagementBundleId, } from './services/utils';
|
|
20
20
|
const utils = {
|
|
21
|
-
|
|
21
|
+
compareSubHashes,
|
|
22
|
+
encodeSubId,
|
|
23
|
+
getCloseStrategyType,
|
|
24
|
+
getCompoundV3LeverageManagementBundleId,
|
|
25
|
+
getRatioStateInfoForAaveCloseStrategy,
|
|
22
26
|
};
|
|
23
|
-
export {
|
|
27
|
+
export { ArbitrumStrategies, BaseStrategies, EthereumStrategies, LegacyAaveAutomation, LegacyCompoundAutomation, LegacyMakerAutomation, OptimismStrategies, constants, enums, strategiesService, strategySubService, subDataService, triggerService, utils, };
|