@defisaver/automation-sdk 3.2.5 → 3.3.0
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/.babelrc +3 -3
- package/.editorconfig +9 -9
- package/.env.dev +4 -4
- package/.eslintignore +6 -6
- package/.eslintrc.js +39 -39
- package/.mocharc.json +4 -4
- package/.nvmrc +1 -1
- package/README.md +46 -46
- package/cjs/abis/Erc20.json +223 -223
- package/cjs/abis/SubStorage.json +21 -21
- package/cjs/abis/UniMulticall.json +17 -17
- package/cjs/abis/index.d.ts +9 -9
- package/cjs/abis/index.js +30 -30
- package/cjs/abis/legacy_AaveV2Subscriptions.json +8 -8
- package/cjs/abis/legacy_AuthCheck.json +8 -8
- package/cjs/abis/legacy_CompoundV2Subscriptions.json +9 -9
- package/cjs/abis/legacy_MakerSubscriptions.json +9 -9
- package/cjs/automation/private/Automation.d.ts +12 -12
- package/cjs/automation/private/Automation.js +42 -42
- package/cjs/automation/private/LegacyAutomation.d.ts +25 -25
- package/cjs/automation/private/LegacyAutomation.js +118 -118
- package/cjs/automation/private/LegacyProtocol.d.ts +22 -22
- package/cjs/automation/private/LegacyProtocol.js +41 -41
- package/cjs/automation/private/LegacyProtocol.test.d.ts +1 -1
- package/cjs/automation/private/LegacyProtocol.test.js +25 -25
- package/cjs/automation/private/Protocol.d.ts +22 -22
- package/cjs/automation/private/Protocol.js +41 -41
- package/cjs/automation/private/Protocol.test.d.ts +1 -1
- package/cjs/automation/private/Protocol.test.js +25 -25
- package/cjs/automation/private/StrategiesAutomation.d.ts +33 -33
- package/cjs/automation/private/StrategiesAutomation.js +189 -189
- package/cjs/automation/private/StrategiesAutomation.test.d.ts +1 -1
- package/cjs/automation/private/StrategiesAutomation.test.js +671 -671
- package/cjs/automation/public/ArbitrumStrategies.d.ts +5 -5
- package/cjs/automation/public/ArbitrumStrategies.js +13 -13
- package/cjs/automation/public/BaseStrategies.d.ts +5 -5
- package/cjs/automation/public/BaseStrategies.js +13 -13
- package/cjs/automation/public/EthereumStrategies.d.ts +5 -5
- package/cjs/automation/public/EthereumStrategies.js +13 -13
- package/cjs/automation/public/OptimismStrategies.d.ts +5 -5
- package/cjs/automation/public/OptimismStrategies.js +13 -13
- package/cjs/automation/public/Strategies.test.d.ts +1 -1
- package/cjs/automation/public/Strategies.test.js +61 -61
- package/cjs/automation/public/legacy/LegacyAaveAutomation.d.ts +6 -6
- package/cjs/automation/public/legacy/LegacyAaveAutomation.js +20 -20
- package/cjs/automation/public/legacy/LegacyCompoundAutomation.d.ts +6 -6
- package/cjs/automation/public/legacy/LegacyCompoundAutomation.js +20 -20
- package/cjs/automation/public/legacy/LegacyMakerAutomation.d.ts +6 -6
- package/cjs/automation/public/legacy/LegacyMakerAutomation.js +20 -20
- package/cjs/configuration.d.ts +1 -1
- package/cjs/configuration.js +12 -12
- package/cjs/constants/index.d.ts +28 -28
- package/cjs/constants/index.js +674 -564
- package/cjs/index.d.ts +23 -23
- package/cjs/index.js +65 -65
- package/cjs/services/contractService.d.ts +12 -12
- package/cjs/services/contractService.js +54 -54
- package/cjs/services/ethereumService.d.ts +7 -7
- package/cjs/services/ethereumService.js +49 -49
- package/cjs/services/ethereumService.test.d.ts +1 -1
- package/cjs/services/ethereumService.test.js +242 -242
- package/cjs/services/strategiesService.d.ts +2 -2
- package/cjs/services/strategiesService.js +946 -898
- package/cjs/services/strategiesService.test.d.ts +1 -1
- package/cjs/services/strategiesService.test.js +110 -110
- package/cjs/services/strategySubService.d.ts +113 -111
- package/cjs/services/strategySubService.js +328 -314
- package/cjs/services/strategySubService.test.d.ts +1 -1
- package/cjs/services/strategySubService.test.js +1058 -936
- package/cjs/services/subDataService.d.ts +282 -261
- package/cjs/services/subDataService.js +740 -683
- package/cjs/services/subDataService.test.d.ts +1 -1
- package/cjs/services/subDataService.test.js +1458 -1282
- package/cjs/services/triggerService.d.ts +268 -249
- package/cjs/services/triggerService.js +509 -473
- package/cjs/services/triggerService.test.d.ts +1 -1
- package/cjs/services/triggerService.test.js +1139 -1045
- package/cjs/services/utils.d.ts +30 -30
- package/cjs/services/utils.js +182 -182
- package/cjs/services/utils.test.d.ts +1 -1
- package/cjs/services/utils.test.js +376 -376
- package/cjs/types/contracts/generated/Erc20.d.ts +53 -53
- package/cjs/types/contracts/generated/Erc20.js +5 -5
- package/cjs/types/contracts/generated/Legacy_AaveV2Subscriptions.d.ts +129 -129
- package/cjs/types/contracts/generated/Legacy_AaveV2Subscriptions.js +5 -5
- package/cjs/types/contracts/generated/Legacy_AuthCheck.d.ts +20 -20
- package/cjs/types/contracts/generated/Legacy_AuthCheck.js +5 -5
- package/cjs/types/contracts/generated/Legacy_CompoundV2Subscriptions.d.ts +128 -128
- package/cjs/types/contracts/generated/Legacy_CompoundV2Subscriptions.js +5 -5
- package/cjs/types/contracts/generated/Legacy_MakerSubscriptions.d.ts +246 -246
- package/cjs/types/contracts/generated/Legacy_MakerSubscriptions.js +5 -5
- package/cjs/types/contracts/generated/SubStorage.d.ts +114 -114
- package/cjs/types/contracts/generated/SubStorage.js +5 -5
- package/cjs/types/contracts/generated/UniMulticall.d.ts +55 -55
- package/cjs/types/contracts/generated/UniMulticall.js +5 -5
- package/cjs/types/contracts/generated/index.d.ts +7 -7
- package/cjs/types/contracts/generated/index.js +2 -2
- package/cjs/types/contracts/generated/types.d.ts +54 -54
- package/cjs/types/contracts/generated/types.js +2 -2
- package/cjs/types/enums.d.ts +253 -226
- package/cjs/types/enums.js +279 -252
- package/cjs/types/index.d.ts +264 -248
- package/cjs/types/index.js +2 -2
- package/esm/abis/Erc20.json +223 -223
- package/esm/abis/SubStorage.json +21 -21
- package/esm/abis/UniMulticall.json +17 -17
- package/esm/abis/index.d.ts +9 -9
- package/esm/abis/index.js +18 -18
- package/esm/abis/legacy_AaveV2Subscriptions.json +8 -8
- package/esm/abis/legacy_AuthCheck.json +8 -8
- package/esm/abis/legacy_CompoundV2Subscriptions.json +9 -9
- package/esm/abis/legacy_MakerSubscriptions.json +9 -9
- package/esm/automation/private/Automation.d.ts +12 -12
- package/esm/automation/private/Automation.js +39 -39
- package/esm/automation/private/LegacyAutomation.d.ts +25 -25
- package/esm/automation/private/LegacyAutomation.js +112 -112
- package/esm/automation/private/LegacyProtocol.d.ts +22 -22
- package/esm/automation/private/LegacyProtocol.js +38 -38
- package/esm/automation/private/LegacyProtocol.test.d.ts +1 -1
- package/esm/automation/private/LegacyProtocol.test.js +20 -20
- package/esm/automation/private/Protocol.d.ts +22 -22
- package/esm/automation/private/Protocol.js +38 -38
- package/esm/automation/private/Protocol.test.d.ts +1 -1
- package/esm/automation/private/Protocol.test.js +20 -20
- package/esm/automation/private/StrategiesAutomation.d.ts +33 -33
- package/esm/automation/private/StrategiesAutomation.js +183 -183
- package/esm/automation/private/StrategiesAutomation.test.d.ts +1 -1
- package/esm/automation/private/StrategiesAutomation.test.js +666 -666
- package/esm/automation/public/ArbitrumStrategies.d.ts +5 -5
- package/esm/automation/public/ArbitrumStrategies.js +7 -7
- package/esm/automation/public/BaseStrategies.d.ts +5 -5
- package/esm/automation/public/BaseStrategies.js +7 -7
- package/esm/automation/public/EthereumStrategies.d.ts +5 -5
- package/esm/automation/public/EthereumStrategies.js +7 -7
- package/esm/automation/public/OptimismStrategies.d.ts +5 -5
- package/esm/automation/public/OptimismStrategies.js +7 -7
- package/esm/automation/public/Strategies.test.d.ts +1 -1
- package/esm/automation/public/Strategies.test.js +56 -56
- package/esm/automation/public/legacy/LegacyAaveAutomation.d.ts +6 -6
- package/esm/automation/public/legacy/LegacyAaveAutomation.js +14 -14
- package/esm/automation/public/legacy/LegacyCompoundAutomation.d.ts +6 -6
- package/esm/automation/public/legacy/LegacyCompoundAutomation.js +14 -14
- package/esm/automation/public/legacy/LegacyMakerAutomation.d.ts +6 -6
- package/esm/automation/public/legacy/LegacyMakerAutomation.js +14 -14
- package/esm/configuration.d.ts +1 -1
- package/esm/configuration.js +7 -7
- package/esm/constants/index.d.ts +28 -28
- package/esm/constants/index.js +668 -558
- package/esm/index.d.ts +23 -23
- package/esm/index.js +23 -23
- package/esm/services/contractService.d.ts +12 -12
- package/esm/services/contractService.js +45 -45
- package/esm/services/ethereumService.d.ts +7 -7
- package/esm/services/ethereumService.js +41 -41
- package/esm/services/ethereumService.test.d.ts +1 -1
- package/esm/services/ethereumService.test.js +237 -237
- package/esm/services/strategiesService.d.ts +2 -2
- package/esm/services/strategiesService.js +916 -868
- package/esm/services/strategiesService.test.d.ts +1 -1
- package/esm/services/strategiesService.test.js +108 -108
- package/esm/services/strategySubService.d.ts +113 -111
- package/esm/services/strategySubService.js +299 -285
- package/esm/services/strategySubService.test.d.ts +1 -1
- package/esm/services/strategySubService.test.js +1030 -908
- package/esm/services/subDataService.d.ts +282 -261
- package/esm/services/subDataService.js +734 -677
- package/esm/services/subDataService.test.d.ts +1 -1
- package/esm/services/subDataService.test.js +1430 -1254
- package/esm/services/triggerService.d.ts +268 -249
- package/esm/services/triggerService.js +480 -444
- package/esm/services/triggerService.test.d.ts +1 -1
- package/esm/services/triggerService.test.js +1114 -1020
- package/esm/services/utils.d.ts +30 -30
- package/esm/services/utils.js +131 -131
- package/esm/services/utils.test.d.ts +1 -1
- package/esm/services/utils.test.js +348 -348
- package/esm/types/contracts/generated/Erc20.d.ts +53 -53
- package/esm/types/contracts/generated/Erc20.js +4 -4
- package/esm/types/contracts/generated/Legacy_AaveV2Subscriptions.d.ts +129 -129
- package/esm/types/contracts/generated/Legacy_AaveV2Subscriptions.js +4 -4
- package/esm/types/contracts/generated/Legacy_AuthCheck.d.ts +20 -20
- package/esm/types/contracts/generated/Legacy_AuthCheck.js +4 -4
- package/esm/types/contracts/generated/Legacy_CompoundV2Subscriptions.d.ts +128 -128
- package/esm/types/contracts/generated/Legacy_CompoundV2Subscriptions.js +4 -4
- package/esm/types/contracts/generated/Legacy_MakerSubscriptions.d.ts +246 -246
- package/esm/types/contracts/generated/Legacy_MakerSubscriptions.js +4 -4
- package/esm/types/contracts/generated/SubStorage.d.ts +114 -114
- package/esm/types/contracts/generated/SubStorage.js +4 -4
- package/esm/types/contracts/generated/UniMulticall.d.ts +55 -55
- package/esm/types/contracts/generated/UniMulticall.js +4 -4
- package/esm/types/contracts/generated/index.d.ts +7 -7
- package/esm/types/contracts/generated/index.js +1 -1
- package/esm/types/contracts/generated/types.d.ts +54 -54
- package/esm/types/contracts/generated/types.js +1 -1
- package/esm/types/enums.d.ts +253 -226
- package/esm/types/enums.js +276 -249
- package/esm/types/index.d.ts +264 -248
- package/esm/types/index.js +1 -1
- package/package.json +60 -60
- package/scripts/generateContractTypes.js +39 -39
- package/src/abis/Erc20.json +222 -222
- package/src/abis/SubStorage.json +21 -21
- package/src/abis/UniMulticall.json +17 -17
- package/src/abis/index.ts +28 -28
- package/src/abis/legacy_AaveV2Subscriptions.json +7 -7
- package/src/abis/legacy_AuthCheck.json +7 -7
- package/src/abis/legacy_CompoundV2Subscriptions.json +8 -8
- package/src/abis/legacy_MakerSubscriptions.json +8 -8
- package/src/automation/private/Automation.ts +44 -44
- package/src/automation/private/LegacyAutomation.ts +135 -135
- package/src/automation/private/LegacyProtocol.test.ts +23 -23
- package/src/automation/private/LegacyProtocol.ts +51 -51
- package/src/automation/private/Protocol.test.ts +23 -23
- package/src/automation/private/Protocol.ts +51 -51
- package/src/automation/private/StrategiesAutomation.test.ts +663 -663
- package/src/automation/private/StrategiesAutomation.ts +254 -254
- package/src/automation/public/ArbitrumStrategies.ts +10 -10
- package/src/automation/public/BaseStrategies.ts +10 -10
- package/src/automation/public/EthereumStrategies.ts +10 -10
- package/src/automation/public/OptimismStrategies.ts +10 -10
- package/src/automation/public/Strategies.test.ts +49 -49
- package/src/automation/public/legacy/LegacyAaveAutomation.ts +20 -20
- package/src/automation/public/legacy/LegacyCompoundAutomation.ts +20 -20
- package/src/automation/public/legacy/LegacyMakerAutomation.ts +20 -20
- package/src/configuration.ts +8 -8
- package/src/constants/index.ts +702 -593
- package/src/index.ts +39 -39
- package/src/services/contractService.ts +77 -77
- package/src/services/ethereumService.test.ts +257 -257
- package/src/services/ethereumService.ts +69 -69
- package/src/services/strategiesService.test.ts +105 -105
- package/src/services/strategiesService.ts +1219 -1158
- package/src/services/strategySubService.test.ts +1250 -1122
- package/src/services/strategySubService.ts +685 -648
- package/src/services/subDataService.test.ts +1546 -1387
- package/src/services/subDataService.ts +1024 -934
- package/src/services/triggerService.test.ts +1234 -1130
- package/src/services/triggerService.ts +659 -602
- package/src/services/utils.test.ts +430 -430
- package/src/services/utils.ts +162 -162
- package/src/types/enums.ts +273 -246
- package/src/types/index.ts +333 -312
- package/tsconfig.esm.json +8 -8
- package/tsconfig.json +22 -22
package/cjs/types/enums.js
CHANGED
|
@@ -1,252 +1,279 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Bundles = exports.Strategies = exports.ProtocolIdentifiers = exports.CloseToAssetType = exports.CloseStrategyType = exports.DebtActionType = exports.CollActionType = exports.BundleProtocols = exports.OrderType = exports.RatioState = exports.ChainId = void 0;
|
|
4
|
-
var ChainId;
|
|
5
|
-
(function (ChainId) {
|
|
6
|
-
ChainId[ChainId["Ethereum"] = 1] = "Ethereum";
|
|
7
|
-
ChainId[ChainId["Optimism"] = 10] = "Optimism";
|
|
8
|
-
ChainId[ChainId["Arbitrum"] = 42161] = "Arbitrum";
|
|
9
|
-
ChainId[ChainId["Base"] = 8453] = "Base";
|
|
10
|
-
})(ChainId = exports.ChainId || (exports.ChainId = {}));
|
|
11
|
-
var RatioState;
|
|
12
|
-
(function (RatioState) {
|
|
13
|
-
RatioState[RatioState["OVER"] = 0] = "OVER";
|
|
14
|
-
RatioState[RatioState["UNDER"] = 1] = "UNDER";
|
|
15
|
-
})(RatioState = exports.RatioState || (exports.RatioState = {}));
|
|
16
|
-
var OrderType;
|
|
17
|
-
(function (OrderType) {
|
|
18
|
-
OrderType[OrderType["TAKE_PROFIT"] = 0] = "TAKE_PROFIT";
|
|
19
|
-
OrderType[OrderType["STOP_LOSS"] = 1] = "STOP_LOSS";
|
|
20
|
-
})(OrderType = exports.OrderType || (exports.OrderType = {}));
|
|
21
|
-
var BundleProtocols;
|
|
22
|
-
(function (BundleProtocols) {
|
|
23
|
-
BundleProtocols["MStable"] = "mstable";
|
|
24
|
-
BundleProtocols["Yearn"] = "yearn";
|
|
25
|
-
BundleProtocols["Rari"] = "rari";
|
|
26
|
-
})(BundleProtocols = exports.BundleProtocols || (exports.BundleProtocols = {}));
|
|
27
|
-
var CollActionType;
|
|
28
|
-
(function (CollActionType) {
|
|
29
|
-
CollActionType[CollActionType["SUPPLY"] = 0] = "SUPPLY";
|
|
30
|
-
CollActionType[CollActionType["WITHDRAW"] = 1] = "WITHDRAW";
|
|
31
|
-
})(CollActionType = exports.CollActionType || (exports.CollActionType = {}));
|
|
32
|
-
var DebtActionType;
|
|
33
|
-
(function (DebtActionType) {
|
|
34
|
-
DebtActionType[DebtActionType["PAYBACK"] = 0] = "PAYBACK";
|
|
35
|
-
DebtActionType[DebtActionType["BORROW"] = 1] = "BORROW";
|
|
36
|
-
})(DebtActionType = exports.DebtActionType || (exports.DebtActionType = {}));
|
|
37
|
-
var CloseStrategyType;
|
|
38
|
-
(function (CloseStrategyType) {
|
|
39
|
-
CloseStrategyType[CloseStrategyType["TAKE_PROFIT_IN_COLLATERAL"] = 0] = "TAKE_PROFIT_IN_COLLATERAL";
|
|
40
|
-
CloseStrategyType[CloseStrategyType["STOP_LOSS_IN_COLLATERAL"] = 1] = "STOP_LOSS_IN_COLLATERAL";
|
|
41
|
-
CloseStrategyType[CloseStrategyType["TAKE_PROFIT_IN_DEBT"] = 2] = "TAKE_PROFIT_IN_DEBT";
|
|
42
|
-
CloseStrategyType[CloseStrategyType["STOP_LOSS_IN_DEBT"] = 3] = "STOP_LOSS_IN_DEBT";
|
|
43
|
-
CloseStrategyType[CloseStrategyType["TAKE_PROFIT_AND_STOP_LOSS_IN_COLLATERAL"] = 4] = "TAKE_PROFIT_AND_STOP_LOSS_IN_COLLATERAL";
|
|
44
|
-
CloseStrategyType[CloseStrategyType["TAKE_PROFIT_IN_COLLATERAL_AND_STOP_LOSS_IN_DEBT"] = 5] = "TAKE_PROFIT_IN_COLLATERAL_AND_STOP_LOSS_IN_DEBT";
|
|
45
|
-
CloseStrategyType[CloseStrategyType["TAKE_PROFIT_AND_STOP_LOSS_IN_DEBT"] = 6] = "TAKE_PROFIT_AND_STOP_LOSS_IN_DEBT";
|
|
46
|
-
CloseStrategyType[CloseStrategyType["TAKE_PROFIT_IN_DEBT_AND_STOP_LOSS_IN_COLLATERAL"] = 7] = "TAKE_PROFIT_IN_DEBT_AND_STOP_LOSS_IN_COLLATERAL";
|
|
47
|
-
})(CloseStrategyType = exports.CloseStrategyType || (exports.CloseStrategyType = {}));
|
|
48
|
-
var CloseToAssetType;
|
|
49
|
-
(function (CloseToAssetType) {
|
|
50
|
-
CloseToAssetType[CloseToAssetType["COLLATERAL"] = 0] = "COLLATERAL";
|
|
51
|
-
CloseToAssetType[CloseToAssetType["DEBT"] = 1] = "DEBT";
|
|
52
|
-
})(CloseToAssetType = exports.CloseToAssetType || (exports.CloseToAssetType = {}));
|
|
53
|
-
/**
|
|
54
|
-
* @dev Follow the naming convention:
|
|
55
|
-
* - Enum name consists of two parts, name and version
|
|
56
|
-
* - Name should be human-readable name of the protocol, it can include spaces or any characters needed
|
|
57
|
-
* - Version should be separated from the name with double underscores `__` (If there is no version leave it out)
|
|
58
|
-
* - Example `Name of ThePROTOCOL__v1` (Without version `Name of ThePROTOCOL`)
|
|
59
|
-
*/
|
|
60
|
-
var ProtocolIdentifiers;
|
|
61
|
-
(function (ProtocolIdentifiers) {
|
|
62
|
-
let StrategiesAutomation;
|
|
63
|
-
(function (StrategiesAutomation) {
|
|
64
|
-
StrategiesAutomation["MakerDAO"] = "MakerDAO";
|
|
65
|
-
StrategiesAutomation["Liquity"] = "Liquity";
|
|
66
|
-
StrategiesAutomation["LiquityV2"] = "Liquity__V2";
|
|
67
|
-
StrategiesAutomation["ChickenBonds"] = "Chicken Bonds";
|
|
68
|
-
StrategiesAutomation["CompoundV2"] = "Compound__V2";
|
|
69
|
-
StrategiesAutomation["CompoundV3"] = "Compound__V3";
|
|
70
|
-
StrategiesAutomation["AaveV2"] = "Aave__V2";
|
|
71
|
-
StrategiesAutomation["AaveV3"] = "Aave__V3";
|
|
72
|
-
StrategiesAutomation["MorphoAaveV2"] = "Morpho-Aave__V2";
|
|
73
|
-
StrategiesAutomation["Exchange"] = "Exchange";
|
|
74
|
-
StrategiesAutomation["Spark"] = "Spark";
|
|
75
|
-
StrategiesAutomation["CrvUSD"] = "CurveUSD";
|
|
76
|
-
StrategiesAutomation["MorphoBlue"] = "MorphoBlue";
|
|
77
|
-
StrategiesAutomation["FluidT1"] = "FluidT1";
|
|
78
|
-
})(StrategiesAutomation = ProtocolIdentifiers.StrategiesAutomation || (ProtocolIdentifiers.StrategiesAutomation = {}));
|
|
79
|
-
let LegacyAutomation;
|
|
80
|
-
(function (LegacyAutomation) {
|
|
81
|
-
LegacyAutomation["MakerDAO"] = "MakerDAO";
|
|
82
|
-
LegacyAutomation["CompoundV2"] = "Compound__V2";
|
|
83
|
-
LegacyAutomation["AaveV2"] = "Aave__V2";
|
|
84
|
-
})(LegacyAutomation = ProtocolIdentifiers.LegacyAutomation || (ProtocolIdentifiers.LegacyAutomation = {}));
|
|
85
|
-
})(ProtocolIdentifiers = exports.ProtocolIdentifiers || (exports.ProtocolIdentifiers = {}));
|
|
86
|
-
var Strategies;
|
|
87
|
-
(function (Strategies) {
|
|
88
|
-
let MainnetIds;
|
|
89
|
-
(function (MainnetIds) {
|
|
90
|
-
MainnetIds[MainnetIds["MAKER_CLOSE_ON_PRICE_TO_DAI"] = 7] = "MAKER_CLOSE_ON_PRICE_TO_DAI";
|
|
91
|
-
MainnetIds[MainnetIds["MAKER_CLOSE_ON_PRICE_TO_COLL"] = 9] = "MAKER_CLOSE_ON_PRICE_TO_COLL";
|
|
92
|
-
MainnetIds[MainnetIds["LIQUITY_CLOSE_ON_PRICE_TO_COLL_DEPRECATED"] = 10] = "LIQUITY_CLOSE_ON_PRICE_TO_COLL_DEPRECATED";
|
|
93
|
-
MainnetIds[MainnetIds["MAKER_TRAILING_STOP_LOSS_TO_COLL"] = 11] = "MAKER_TRAILING_STOP_LOSS_TO_COLL";
|
|
94
|
-
MainnetIds[MainnetIds["MAKER_TRAILING_STOP_LOSS_TO_DAI"] = 12] = "MAKER_TRAILING_STOP_LOSS_TO_DAI";
|
|
95
|
-
MainnetIds[MainnetIds["LIQUITY_TRAILING_STOP_LOSS_TO_COLL"] = 13] = "LIQUITY_TRAILING_STOP_LOSS_TO_COLL";
|
|
96
|
-
MainnetIds[MainnetIds["LIQUITY_CLOSE_ON_PRICE_TO_COLL"] = 14] = "LIQUITY_CLOSE_ON_PRICE_TO_COLL";
|
|
97
|
-
MainnetIds[MainnetIds["CHICKEN_BONDS_REBOND"] = 31] = "CHICKEN_BONDS_REBOND";
|
|
98
|
-
MainnetIds[MainnetIds["EXCHANGE_DCA"] = 46] = "EXCHANGE_DCA";
|
|
99
|
-
MainnetIds[MainnetIds["EXCHANGE_LIMIT_ORDER"] = 51] = "EXCHANGE_LIMIT_ORDER";
|
|
100
|
-
MainnetIds[MainnetIds["LIQUITY_DSR_PAYBACK"] = 69] = "LIQUITY_DSR_PAYBACK";
|
|
101
|
-
MainnetIds[MainnetIds["LIQUITY_DSR_SUPPLY"] = 70] = "LIQUITY_DSR_SUPPLY";
|
|
102
|
-
MainnetIds[MainnetIds["LIQUITY_DEBT_IN_FRONT_REPAY"] = 75] = "LIQUITY_DEBT_IN_FRONT_REPAY";
|
|
103
|
-
MainnetIds[MainnetIds["CURVEUSD_PAYBACK"] = 92] = "CURVEUSD_PAYBACK";
|
|
104
|
-
MainnetIds[MainnetIds["LIQUITY_V2_PAYBACK"] = 113] = "LIQUITY_V2_PAYBACK";
|
|
105
|
-
})(MainnetIds = Strategies.MainnetIds || (Strategies.MainnetIds = {}));
|
|
106
|
-
let OptimismIds;
|
|
107
|
-
(function (OptimismIds) {
|
|
108
|
-
OptimismIds[OptimismIds["EXCHANGE_DCA"] = 8] = "EXCHANGE_DCA";
|
|
109
|
-
OptimismIds[OptimismIds["EXCHANGE_LIMIT_ORDER"] = 9] = "EXCHANGE_LIMIT_ORDER";
|
|
110
|
-
})(OptimismIds = Strategies.OptimismIds || (Strategies.OptimismIds = {}));
|
|
111
|
-
let BaseIds;
|
|
112
|
-
(function (BaseIds) {
|
|
113
|
-
BaseIds[BaseIds["EXCHANGE_DCA"] = 8] = "EXCHANGE_DCA";
|
|
114
|
-
BaseIds[BaseIds["EXCHANGE_LIMIT_ORDER"] = 9] = "EXCHANGE_LIMIT_ORDER";
|
|
115
|
-
})(BaseIds = Strategies.BaseIds || (Strategies.BaseIds = {}));
|
|
116
|
-
let ArbitrumIds;
|
|
117
|
-
(function (ArbitrumIds) {
|
|
118
|
-
ArbitrumIds[ArbitrumIds["EXCHANGE_DCA"] = 8] = "EXCHANGE_DCA";
|
|
119
|
-
ArbitrumIds[ArbitrumIds["EXCHANGE_LIMIT_ORDER"] = 9] = "EXCHANGE_LIMIT_ORDER";
|
|
120
|
-
})(ArbitrumIds = Strategies.ArbitrumIds || (Strategies.ArbitrumIds = {}));
|
|
121
|
-
let Identifiers;
|
|
122
|
-
(function (Identifiers) {
|
|
123
|
-
Identifiers["SavingsLiqProtection"] = "smart-savings-liquidation-protection";
|
|
124
|
-
Identifiers["SavingsDsrPayback"] = "smart-savings-dsr-payback";
|
|
125
|
-
Identifiers["SavingsDsrSupply"] = "smart-savings-dsr-supply";
|
|
126
|
-
Identifiers["Repay"] = "repay";
|
|
127
|
-
Identifiers["EoaRepay"] = "eoa-repay";
|
|
128
|
-
Identifiers["Boost"] = "boost";
|
|
129
|
-
Identifiers["EoaBoost"] = "eoa-boost";
|
|
130
|
-
Identifiers["CloseToDebt"] = "close-to-debt";
|
|
131
|
-
Identifiers["CloseToDebtWithGasPrice"] = "close-to-debt-with-gas-price";
|
|
132
|
-
Identifiers["CloseToCollateral"] = "close-to-collateral";
|
|
133
|
-
Identifiers["CloseToCollateralWithGasPrice"] = "close-to-collateral-with-gas-price";
|
|
134
|
-
Identifiers["CloseOnPriceToDebt"] = "close-on-price-to-debt";
|
|
135
|
-
Identifiers["CloseOnPriceToColl"] = "close-on-price-to-collateral";
|
|
136
|
-
Identifiers["CloseOnPrice"] = "close-on-price";
|
|
137
|
-
Identifiers["
|
|
138
|
-
Identifiers["
|
|
139
|
-
Identifiers["
|
|
140
|
-
Identifiers["
|
|
141
|
-
Identifiers["
|
|
142
|
-
Identifiers["
|
|
143
|
-
Identifiers["
|
|
144
|
-
Identifiers["
|
|
145
|
-
Identifiers["
|
|
146
|
-
Identifiers["
|
|
147
|
-
Identifiers["
|
|
148
|
-
Identifiers["
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
IdOverrides["
|
|
156
|
-
IdOverrides["
|
|
157
|
-
IdOverrides["
|
|
158
|
-
IdOverrides["
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
(
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
MainnetIds[MainnetIds["
|
|
171
|
-
MainnetIds[MainnetIds["
|
|
172
|
-
MainnetIds[MainnetIds["
|
|
173
|
-
MainnetIds[MainnetIds["
|
|
174
|
-
MainnetIds[MainnetIds["
|
|
175
|
-
MainnetIds[MainnetIds["
|
|
176
|
-
MainnetIds[MainnetIds["
|
|
177
|
-
MainnetIds[MainnetIds["
|
|
178
|
-
MainnetIds[MainnetIds["
|
|
179
|
-
MainnetIds[MainnetIds["
|
|
180
|
-
MainnetIds[MainnetIds["
|
|
181
|
-
MainnetIds[MainnetIds["
|
|
182
|
-
MainnetIds[MainnetIds["
|
|
183
|
-
MainnetIds[MainnetIds["
|
|
184
|
-
MainnetIds[MainnetIds["
|
|
185
|
-
MainnetIds[MainnetIds["
|
|
186
|
-
MainnetIds[MainnetIds["
|
|
187
|
-
MainnetIds[MainnetIds["
|
|
188
|
-
MainnetIds[MainnetIds["
|
|
189
|
-
MainnetIds[MainnetIds["
|
|
190
|
-
MainnetIds[MainnetIds["
|
|
191
|
-
MainnetIds[MainnetIds["
|
|
192
|
-
MainnetIds[MainnetIds["
|
|
193
|
-
MainnetIds[MainnetIds["
|
|
194
|
-
MainnetIds[MainnetIds["
|
|
195
|
-
MainnetIds[MainnetIds["
|
|
196
|
-
MainnetIds[MainnetIds["
|
|
197
|
-
MainnetIds[MainnetIds["
|
|
198
|
-
MainnetIds[MainnetIds["
|
|
199
|
-
MainnetIds[MainnetIds["
|
|
200
|
-
MainnetIds[MainnetIds["
|
|
201
|
-
MainnetIds[MainnetIds["
|
|
202
|
-
MainnetIds[MainnetIds["
|
|
203
|
-
MainnetIds[MainnetIds["
|
|
204
|
-
MainnetIds[MainnetIds["
|
|
205
|
-
MainnetIds[MainnetIds["
|
|
206
|
-
MainnetIds[MainnetIds["
|
|
207
|
-
MainnetIds[MainnetIds["
|
|
208
|
-
MainnetIds[MainnetIds["
|
|
209
|
-
MainnetIds[MainnetIds["
|
|
210
|
-
MainnetIds[MainnetIds["
|
|
211
|
-
MainnetIds[MainnetIds["
|
|
212
|
-
MainnetIds[MainnetIds["
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
(
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
BaseIds[BaseIds["
|
|
237
|
-
BaseIds[BaseIds["
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Bundles = exports.Strategies = exports.ProtocolIdentifiers = exports.CloseToAssetType = exports.CloseStrategyType = exports.DebtActionType = exports.CollActionType = exports.BundleProtocols = exports.OrderType = exports.RatioState = exports.ChainId = void 0;
|
|
4
|
+
var ChainId;
|
|
5
|
+
(function (ChainId) {
|
|
6
|
+
ChainId[ChainId["Ethereum"] = 1] = "Ethereum";
|
|
7
|
+
ChainId[ChainId["Optimism"] = 10] = "Optimism";
|
|
8
|
+
ChainId[ChainId["Arbitrum"] = 42161] = "Arbitrum";
|
|
9
|
+
ChainId[ChainId["Base"] = 8453] = "Base";
|
|
10
|
+
})(ChainId = exports.ChainId || (exports.ChainId = {}));
|
|
11
|
+
var RatioState;
|
|
12
|
+
(function (RatioState) {
|
|
13
|
+
RatioState[RatioState["OVER"] = 0] = "OVER";
|
|
14
|
+
RatioState[RatioState["UNDER"] = 1] = "UNDER";
|
|
15
|
+
})(RatioState = exports.RatioState || (exports.RatioState = {}));
|
|
16
|
+
var OrderType;
|
|
17
|
+
(function (OrderType) {
|
|
18
|
+
OrderType[OrderType["TAKE_PROFIT"] = 0] = "TAKE_PROFIT";
|
|
19
|
+
OrderType[OrderType["STOP_LOSS"] = 1] = "STOP_LOSS";
|
|
20
|
+
})(OrderType = exports.OrderType || (exports.OrderType = {}));
|
|
21
|
+
var BundleProtocols;
|
|
22
|
+
(function (BundleProtocols) {
|
|
23
|
+
BundleProtocols["MStable"] = "mstable";
|
|
24
|
+
BundleProtocols["Yearn"] = "yearn";
|
|
25
|
+
BundleProtocols["Rari"] = "rari";
|
|
26
|
+
})(BundleProtocols = exports.BundleProtocols || (exports.BundleProtocols = {}));
|
|
27
|
+
var CollActionType;
|
|
28
|
+
(function (CollActionType) {
|
|
29
|
+
CollActionType[CollActionType["SUPPLY"] = 0] = "SUPPLY";
|
|
30
|
+
CollActionType[CollActionType["WITHDRAW"] = 1] = "WITHDRAW";
|
|
31
|
+
})(CollActionType = exports.CollActionType || (exports.CollActionType = {}));
|
|
32
|
+
var DebtActionType;
|
|
33
|
+
(function (DebtActionType) {
|
|
34
|
+
DebtActionType[DebtActionType["PAYBACK"] = 0] = "PAYBACK";
|
|
35
|
+
DebtActionType[DebtActionType["BORROW"] = 1] = "BORROW";
|
|
36
|
+
})(DebtActionType = exports.DebtActionType || (exports.DebtActionType = {}));
|
|
37
|
+
var CloseStrategyType;
|
|
38
|
+
(function (CloseStrategyType) {
|
|
39
|
+
CloseStrategyType[CloseStrategyType["TAKE_PROFIT_IN_COLLATERAL"] = 0] = "TAKE_PROFIT_IN_COLLATERAL";
|
|
40
|
+
CloseStrategyType[CloseStrategyType["STOP_LOSS_IN_COLLATERAL"] = 1] = "STOP_LOSS_IN_COLLATERAL";
|
|
41
|
+
CloseStrategyType[CloseStrategyType["TAKE_PROFIT_IN_DEBT"] = 2] = "TAKE_PROFIT_IN_DEBT";
|
|
42
|
+
CloseStrategyType[CloseStrategyType["STOP_LOSS_IN_DEBT"] = 3] = "STOP_LOSS_IN_DEBT";
|
|
43
|
+
CloseStrategyType[CloseStrategyType["TAKE_PROFIT_AND_STOP_LOSS_IN_COLLATERAL"] = 4] = "TAKE_PROFIT_AND_STOP_LOSS_IN_COLLATERAL";
|
|
44
|
+
CloseStrategyType[CloseStrategyType["TAKE_PROFIT_IN_COLLATERAL_AND_STOP_LOSS_IN_DEBT"] = 5] = "TAKE_PROFIT_IN_COLLATERAL_AND_STOP_LOSS_IN_DEBT";
|
|
45
|
+
CloseStrategyType[CloseStrategyType["TAKE_PROFIT_AND_STOP_LOSS_IN_DEBT"] = 6] = "TAKE_PROFIT_AND_STOP_LOSS_IN_DEBT";
|
|
46
|
+
CloseStrategyType[CloseStrategyType["TAKE_PROFIT_IN_DEBT_AND_STOP_LOSS_IN_COLLATERAL"] = 7] = "TAKE_PROFIT_IN_DEBT_AND_STOP_LOSS_IN_COLLATERAL";
|
|
47
|
+
})(CloseStrategyType = exports.CloseStrategyType || (exports.CloseStrategyType = {}));
|
|
48
|
+
var CloseToAssetType;
|
|
49
|
+
(function (CloseToAssetType) {
|
|
50
|
+
CloseToAssetType[CloseToAssetType["COLLATERAL"] = 0] = "COLLATERAL";
|
|
51
|
+
CloseToAssetType[CloseToAssetType["DEBT"] = 1] = "DEBT";
|
|
52
|
+
})(CloseToAssetType = exports.CloseToAssetType || (exports.CloseToAssetType = {}));
|
|
53
|
+
/**
|
|
54
|
+
* @dev Follow the naming convention:
|
|
55
|
+
* - Enum name consists of two parts, name and version
|
|
56
|
+
* - Name should be human-readable name of the protocol, it can include spaces or any characters needed
|
|
57
|
+
* - Version should be separated from the name with double underscores `__` (If there is no version leave it out)
|
|
58
|
+
* - Example `Name of ThePROTOCOL__v1` (Without version `Name of ThePROTOCOL`)
|
|
59
|
+
*/
|
|
60
|
+
var ProtocolIdentifiers;
|
|
61
|
+
(function (ProtocolIdentifiers) {
|
|
62
|
+
let StrategiesAutomation;
|
|
63
|
+
(function (StrategiesAutomation) {
|
|
64
|
+
StrategiesAutomation["MakerDAO"] = "MakerDAO";
|
|
65
|
+
StrategiesAutomation["Liquity"] = "Liquity";
|
|
66
|
+
StrategiesAutomation["LiquityV2"] = "Liquity__V2";
|
|
67
|
+
StrategiesAutomation["ChickenBonds"] = "Chicken Bonds";
|
|
68
|
+
StrategiesAutomation["CompoundV2"] = "Compound__V2";
|
|
69
|
+
StrategiesAutomation["CompoundV3"] = "Compound__V3";
|
|
70
|
+
StrategiesAutomation["AaveV2"] = "Aave__V2";
|
|
71
|
+
StrategiesAutomation["AaveV3"] = "Aave__V3";
|
|
72
|
+
StrategiesAutomation["MorphoAaveV2"] = "Morpho-Aave__V2";
|
|
73
|
+
StrategiesAutomation["Exchange"] = "Exchange";
|
|
74
|
+
StrategiesAutomation["Spark"] = "Spark";
|
|
75
|
+
StrategiesAutomation["CrvUSD"] = "CurveUSD";
|
|
76
|
+
StrategiesAutomation["MorphoBlue"] = "MorphoBlue";
|
|
77
|
+
StrategiesAutomation["FluidT1"] = "FluidT1";
|
|
78
|
+
})(StrategiesAutomation = ProtocolIdentifiers.StrategiesAutomation || (ProtocolIdentifiers.StrategiesAutomation = {}));
|
|
79
|
+
let LegacyAutomation;
|
|
80
|
+
(function (LegacyAutomation) {
|
|
81
|
+
LegacyAutomation["MakerDAO"] = "MakerDAO";
|
|
82
|
+
LegacyAutomation["CompoundV2"] = "Compound__V2";
|
|
83
|
+
LegacyAutomation["AaveV2"] = "Aave__V2";
|
|
84
|
+
})(LegacyAutomation = ProtocolIdentifiers.LegacyAutomation || (ProtocolIdentifiers.LegacyAutomation = {}));
|
|
85
|
+
})(ProtocolIdentifiers = exports.ProtocolIdentifiers || (exports.ProtocolIdentifiers = {}));
|
|
86
|
+
var Strategies;
|
|
87
|
+
(function (Strategies) {
|
|
88
|
+
let MainnetIds;
|
|
89
|
+
(function (MainnetIds) {
|
|
90
|
+
MainnetIds[MainnetIds["MAKER_CLOSE_ON_PRICE_TO_DAI"] = 7] = "MAKER_CLOSE_ON_PRICE_TO_DAI";
|
|
91
|
+
MainnetIds[MainnetIds["MAKER_CLOSE_ON_PRICE_TO_COLL"] = 9] = "MAKER_CLOSE_ON_PRICE_TO_COLL";
|
|
92
|
+
MainnetIds[MainnetIds["LIQUITY_CLOSE_ON_PRICE_TO_COLL_DEPRECATED"] = 10] = "LIQUITY_CLOSE_ON_PRICE_TO_COLL_DEPRECATED";
|
|
93
|
+
MainnetIds[MainnetIds["MAKER_TRAILING_STOP_LOSS_TO_COLL"] = 11] = "MAKER_TRAILING_STOP_LOSS_TO_COLL";
|
|
94
|
+
MainnetIds[MainnetIds["MAKER_TRAILING_STOP_LOSS_TO_DAI"] = 12] = "MAKER_TRAILING_STOP_LOSS_TO_DAI";
|
|
95
|
+
MainnetIds[MainnetIds["LIQUITY_TRAILING_STOP_LOSS_TO_COLL"] = 13] = "LIQUITY_TRAILING_STOP_LOSS_TO_COLL";
|
|
96
|
+
MainnetIds[MainnetIds["LIQUITY_CLOSE_ON_PRICE_TO_COLL"] = 14] = "LIQUITY_CLOSE_ON_PRICE_TO_COLL";
|
|
97
|
+
MainnetIds[MainnetIds["CHICKEN_BONDS_REBOND"] = 31] = "CHICKEN_BONDS_REBOND";
|
|
98
|
+
MainnetIds[MainnetIds["EXCHANGE_DCA"] = 46] = "EXCHANGE_DCA";
|
|
99
|
+
MainnetIds[MainnetIds["EXCHANGE_LIMIT_ORDER"] = 51] = "EXCHANGE_LIMIT_ORDER";
|
|
100
|
+
MainnetIds[MainnetIds["LIQUITY_DSR_PAYBACK"] = 69] = "LIQUITY_DSR_PAYBACK";
|
|
101
|
+
MainnetIds[MainnetIds["LIQUITY_DSR_SUPPLY"] = 70] = "LIQUITY_DSR_SUPPLY";
|
|
102
|
+
MainnetIds[MainnetIds["LIQUITY_DEBT_IN_FRONT_REPAY"] = 75] = "LIQUITY_DEBT_IN_FRONT_REPAY";
|
|
103
|
+
MainnetIds[MainnetIds["CURVEUSD_PAYBACK"] = 92] = "CURVEUSD_PAYBACK";
|
|
104
|
+
MainnetIds[MainnetIds["LIQUITY_V2_PAYBACK"] = 113] = "LIQUITY_V2_PAYBACK";
|
|
105
|
+
})(MainnetIds = Strategies.MainnetIds || (Strategies.MainnetIds = {}));
|
|
106
|
+
let OptimismIds;
|
|
107
|
+
(function (OptimismIds) {
|
|
108
|
+
OptimismIds[OptimismIds["EXCHANGE_DCA"] = 8] = "EXCHANGE_DCA";
|
|
109
|
+
OptimismIds[OptimismIds["EXCHANGE_LIMIT_ORDER"] = 9] = "EXCHANGE_LIMIT_ORDER";
|
|
110
|
+
})(OptimismIds = Strategies.OptimismIds || (Strategies.OptimismIds = {}));
|
|
111
|
+
let BaseIds;
|
|
112
|
+
(function (BaseIds) {
|
|
113
|
+
BaseIds[BaseIds["EXCHANGE_DCA"] = 8] = "EXCHANGE_DCA";
|
|
114
|
+
BaseIds[BaseIds["EXCHANGE_LIMIT_ORDER"] = 9] = "EXCHANGE_LIMIT_ORDER";
|
|
115
|
+
})(BaseIds = Strategies.BaseIds || (Strategies.BaseIds = {}));
|
|
116
|
+
let ArbitrumIds;
|
|
117
|
+
(function (ArbitrumIds) {
|
|
118
|
+
ArbitrumIds[ArbitrumIds["EXCHANGE_DCA"] = 8] = "EXCHANGE_DCA";
|
|
119
|
+
ArbitrumIds[ArbitrumIds["EXCHANGE_LIMIT_ORDER"] = 9] = "EXCHANGE_LIMIT_ORDER";
|
|
120
|
+
})(ArbitrumIds = Strategies.ArbitrumIds || (Strategies.ArbitrumIds = {}));
|
|
121
|
+
let Identifiers;
|
|
122
|
+
(function (Identifiers) {
|
|
123
|
+
Identifiers["SavingsLiqProtection"] = "smart-savings-liquidation-protection";
|
|
124
|
+
Identifiers["SavingsDsrPayback"] = "smart-savings-dsr-payback";
|
|
125
|
+
Identifiers["SavingsDsrSupply"] = "smart-savings-dsr-supply";
|
|
126
|
+
Identifiers["Repay"] = "repay";
|
|
127
|
+
Identifiers["EoaRepay"] = "eoa-repay";
|
|
128
|
+
Identifiers["Boost"] = "boost";
|
|
129
|
+
Identifiers["EoaBoost"] = "eoa-boost";
|
|
130
|
+
Identifiers["CloseToDebt"] = "close-to-debt";
|
|
131
|
+
Identifiers["CloseToDebtWithGasPrice"] = "close-to-debt-with-gas-price";
|
|
132
|
+
Identifiers["CloseToCollateral"] = "close-to-collateral";
|
|
133
|
+
Identifiers["CloseToCollateralWithGasPrice"] = "close-to-collateral-with-gas-price";
|
|
134
|
+
Identifiers["CloseOnPriceToDebt"] = "close-on-price-to-debt";
|
|
135
|
+
Identifiers["CloseOnPriceToColl"] = "close-on-price-to-collateral";
|
|
136
|
+
Identifiers["CloseOnPrice"] = "close-on-price";
|
|
137
|
+
Identifiers["EoaCloseOnPrice"] = "eoa-close-on-price";
|
|
138
|
+
Identifiers["TrailingStopToColl"] = "trailing-stop-to-collateral";
|
|
139
|
+
Identifiers["TrailingStopToDebt"] = "trailing-stop-to-debt";
|
|
140
|
+
Identifiers["Rebond"] = "rebond";
|
|
141
|
+
Identifiers["Payback"] = "payback";
|
|
142
|
+
Identifiers["BondProtection"] = "bond-protection";
|
|
143
|
+
Identifiers["Dca"] = "dca";
|
|
144
|
+
Identifiers["LimitOrder"] = "limit-order";
|
|
145
|
+
Identifiers["DebtInFrontRepay"] = "debt-in-front-repay";
|
|
146
|
+
Identifiers["OpenOrderFromCollateral"] = "open-order-from-collateral";
|
|
147
|
+
Identifiers["OpenOrderFromDebt"] = "open-order-from-debt";
|
|
148
|
+
Identifiers["BoostOnPrice"] = "boost-on-price";
|
|
149
|
+
Identifiers["RepayOnPrice"] = "repay-on-price";
|
|
150
|
+
Identifiers["EoaBoostOnPrice"] = "eoa-boost-on-price";
|
|
151
|
+
Identifiers["EoaRepayOnPrice"] = "eoa-repay-on-price";
|
|
152
|
+
})(Identifiers = Strategies.Identifiers || (Strategies.Identifiers = {}));
|
|
153
|
+
let IdOverrides;
|
|
154
|
+
(function (IdOverrides) {
|
|
155
|
+
IdOverrides["TakeProfit"] = "take-profit";
|
|
156
|
+
IdOverrides["StopLoss"] = "stop-loss";
|
|
157
|
+
IdOverrides["TakeProfitWithGasPrice"] = "take-profit-with-gas-price";
|
|
158
|
+
IdOverrides["StopLossWithGasPrice"] = "stop-loss-with-gas-price";
|
|
159
|
+
IdOverrides["TrailingStop"] = "trailing-stop";
|
|
160
|
+
IdOverrides["LeverageManagement"] = "leverage-management";
|
|
161
|
+
IdOverrides["EoaLeverageManagement"] = "leverage-management-eoa";
|
|
162
|
+
IdOverrides["LeverageManagementOnPrice"] = "leverage-management-on-price";
|
|
163
|
+
IdOverrides["EoaLeverageManagementOnPrice"] = "leverage-management-on-price-eoa";
|
|
164
|
+
})(IdOverrides = Strategies.IdOverrides || (Strategies.IdOverrides = {}));
|
|
165
|
+
})(Strategies = exports.Strategies || (exports.Strategies = {}));
|
|
166
|
+
var Bundles;
|
|
167
|
+
(function (Bundles) {
|
|
168
|
+
let MainnetIds;
|
|
169
|
+
(function (MainnetIds) {
|
|
170
|
+
MainnetIds[MainnetIds["MAKER_REPAY_FROM_SMART_SAVINGS_YEARN"] = 0] = "MAKER_REPAY_FROM_SMART_SAVINGS_YEARN";
|
|
171
|
+
MainnetIds[MainnetIds["MAKER_REPAY_FROM_SMART_SAVINGS_MSTABLE"] = 1] = "MAKER_REPAY_FROM_SMART_SAVINGS_MSTABLE";
|
|
172
|
+
MainnetIds[MainnetIds["MAKER_REPAY_FROM_SMART_SAVINGS_RARI"] = 2] = "MAKER_REPAY_FROM_SMART_SAVINGS_RARI";
|
|
173
|
+
MainnetIds[MainnetIds["COMP_V3_SW_REPAY_BUNDLE"] = 3] = "COMP_V3_SW_REPAY_BUNDLE";
|
|
174
|
+
MainnetIds[MainnetIds["COMP_V3_SW_BOOST_BUNDLE"] = 4] = "COMP_V3_SW_BOOST_BUNDLE";
|
|
175
|
+
MainnetIds[MainnetIds["COMP_V3_EOA_REPAY_BUNDLE"] = 5] = "COMP_V3_EOA_REPAY_BUNDLE";
|
|
176
|
+
MainnetIds[MainnetIds["COMP_V3_EOA_BOOST_BUNDLE"] = 6] = "COMP_V3_EOA_BOOST_BUNDLE";
|
|
177
|
+
MainnetIds[MainnetIds["LIQUITY_PAYBACK_USING_CHICKEN_BOND"] = 7] = "LIQUITY_PAYBACK_USING_CHICKEN_BOND";
|
|
178
|
+
MainnetIds[MainnetIds["AAVE_V3_REPAY"] = 8] = "AAVE_V3_REPAY";
|
|
179
|
+
MainnetIds[MainnetIds["AAVE_V3_BOOST"] = 9] = "AAVE_V3_BOOST";
|
|
180
|
+
MainnetIds[MainnetIds["MAKER_REPAY"] = 10] = "MAKER_REPAY";
|
|
181
|
+
MainnetIds[MainnetIds["MAKER_BOOST"] = 11] = "MAKER_BOOST";
|
|
182
|
+
MainnetIds[MainnetIds["AAVE_V3_CLOSE_TO_DEBT"] = 12] = "AAVE_V3_CLOSE_TO_DEBT";
|
|
183
|
+
MainnetIds[MainnetIds["AAVE_V3_CLOSE_TO_DEBT_WITH_GAS_PRICE"] = 24] = "AAVE_V3_CLOSE_TO_DEBT_WITH_GAS_PRICE";
|
|
184
|
+
MainnetIds[MainnetIds["AAVE_V3_CLOSE_TO_COLLATERAL"] = 13] = "AAVE_V3_CLOSE_TO_COLLATERAL";
|
|
185
|
+
MainnetIds[MainnetIds["AAVE_V3_CLOSE_TO_COLLATERAL_WITH_GAS_PRICE"] = 25] = "AAVE_V3_CLOSE_TO_COLLATERAL_WITH_GAS_PRICE";
|
|
186
|
+
MainnetIds[MainnetIds["MORPHO_AAVE_V2_REPAY"] = 14] = "MORPHO_AAVE_V2_REPAY";
|
|
187
|
+
MainnetIds[MainnetIds["MORPHO_AAVE_V2_BOOST"] = 15] = "MORPHO_AAVE_V2_BOOST";
|
|
188
|
+
MainnetIds[MainnetIds["LIQUITY_REPAY"] = 16] = "LIQUITY_REPAY";
|
|
189
|
+
MainnetIds[MainnetIds["LIQUITY_BOOST"] = 17] = "LIQUITY_BOOST";
|
|
190
|
+
MainnetIds[MainnetIds["SPARK_REPAY"] = 18] = "SPARK_REPAY";
|
|
191
|
+
MainnetIds[MainnetIds["SPARK_BOOST"] = 19] = "SPARK_BOOST";
|
|
192
|
+
MainnetIds[MainnetIds["SPARK_CLOSE_TO_DEBT"] = -21231230] = "SPARK_CLOSE_TO_DEBT";
|
|
193
|
+
MainnetIds[MainnetIds["SPARK_CLOSE_TO_COLLATERAL"] = -21231231] = "SPARK_CLOSE_TO_COLLATERAL";
|
|
194
|
+
MainnetIds[MainnetIds["AAVE_V2_REPAY"] = 22] = "AAVE_V2_REPAY";
|
|
195
|
+
MainnetIds[MainnetIds["AAVE_V2_BOOST"] = 23] = "AAVE_V2_BOOST";
|
|
196
|
+
MainnetIds[MainnetIds["COMP_V2_REPAY"] = 20] = "COMP_V2_REPAY";
|
|
197
|
+
MainnetIds[MainnetIds["COMP_V2_BOOST"] = 21] = "COMP_V2_BOOST";
|
|
198
|
+
MainnetIds[MainnetIds["CRVUSD_REPAY"] = 26] = "CRVUSD_REPAY";
|
|
199
|
+
MainnetIds[MainnetIds["CRVUSD_BOOST"] = 27] = "CRVUSD_BOOST";
|
|
200
|
+
MainnetIds[MainnetIds["COMP_V3_SW_REPAY_V2_BUNDLE"] = 28] = "COMP_V3_SW_REPAY_V2_BUNDLE";
|
|
201
|
+
MainnetIds[MainnetIds["COMP_V3_SW_BOOST_V2_BUNDLE"] = 29] = "COMP_V3_SW_BOOST_V2_BUNDLE";
|
|
202
|
+
MainnetIds[MainnetIds["COMP_V3_EOA_REPAY_V2_BUNDLE"] = 30] = "COMP_V3_EOA_REPAY_V2_BUNDLE";
|
|
203
|
+
MainnetIds[MainnetIds["COMP_V3_EOA_BOOST_V2_BUNDLE"] = 31] = "COMP_V3_EOA_BOOST_V2_BUNDLE";
|
|
204
|
+
MainnetIds[MainnetIds["MORPHO_BLUE_REPAY"] = 32] = "MORPHO_BLUE_REPAY";
|
|
205
|
+
MainnetIds[MainnetIds["MORPHO_BLUE_BOOST"] = 33] = "MORPHO_BLUE_BOOST";
|
|
206
|
+
MainnetIds[MainnetIds["MORPHO_BLUE_EOA_REPAY"] = 34] = "MORPHO_BLUE_EOA_REPAY";
|
|
207
|
+
MainnetIds[MainnetIds["MORPHO_BLUE_EOA_BOOST"] = 35] = "MORPHO_BLUE_EOA_BOOST";
|
|
208
|
+
MainnetIds[MainnetIds["AAVE_V3_OPEN_ORDER_FROM_COLLATERAL"] = 36] = "AAVE_V3_OPEN_ORDER_FROM_COLLATERAL";
|
|
209
|
+
MainnetIds[MainnetIds["AAVE_V3_REPAY_ON_PRICE"] = 37] = "AAVE_V3_REPAY_ON_PRICE";
|
|
210
|
+
MainnetIds[MainnetIds["MORPHO_BLUE_BOOST_ON_PRICE"] = 38] = "MORPHO_BLUE_BOOST_ON_PRICE";
|
|
211
|
+
MainnetIds[MainnetIds["LIQUITY_V2_REPAY"] = 39] = "LIQUITY_V2_REPAY";
|
|
212
|
+
MainnetIds[MainnetIds["LIQUITY_V2_BOOST"] = 40] = "LIQUITY_V2_BOOST";
|
|
213
|
+
MainnetIds[MainnetIds["LIQUITY_V2_CLOSE"] = 41] = "LIQUITY_V2_CLOSE";
|
|
214
|
+
MainnetIds[MainnetIds["LIQUITY_V2_REPAY_ON_PRICE"] = 42] = "LIQUITY_V2_REPAY_ON_PRICE";
|
|
215
|
+
MainnetIds[MainnetIds["LIQUITY_V2_BOOST_ON_PRICE"] = 43] = "LIQUITY_V2_BOOST_ON_PRICE";
|
|
216
|
+
MainnetIds[MainnetIds["FLUID_T1_REPAY"] = 44] = "FLUID_T1_REPAY";
|
|
217
|
+
MainnetIds[MainnetIds["FLUID_T1_BOOST"] = 45] = "FLUID_T1_BOOST";
|
|
218
|
+
MainnetIds[MainnetIds["COMP_V3_SW_REPAY_ON_PRICE"] = 46] = "COMP_V3_SW_REPAY_ON_PRICE";
|
|
219
|
+
MainnetIds[MainnetIds["COMP_V3_SW_BOOST_ON_PRICE"] = 47] = "COMP_V3_SW_BOOST_ON_PRICE";
|
|
220
|
+
MainnetIds[MainnetIds["COMP_V3_SW_CLOSE"] = 48] = "COMP_V3_SW_CLOSE";
|
|
221
|
+
MainnetIds[MainnetIds["COMP_V3_EOA_REPAY_ON_PRICE"] = 49] = "COMP_V3_EOA_REPAY_ON_PRICE";
|
|
222
|
+
MainnetIds[MainnetIds["COMP_V3_EOA_BOOST_ON_PRICE"] = 50] = "COMP_V3_EOA_BOOST_ON_PRICE";
|
|
223
|
+
MainnetIds[MainnetIds["COMP_V3_EOA_CLOSE"] = 51] = "COMP_V3_EOA_CLOSE";
|
|
224
|
+
})(MainnetIds = Bundles.MainnetIds || (Bundles.MainnetIds = {}));
|
|
225
|
+
let OptimismIds;
|
|
226
|
+
(function (OptimismIds) {
|
|
227
|
+
OptimismIds[OptimismIds["AAVE_V3_REPAY"] = 0] = "AAVE_V3_REPAY";
|
|
228
|
+
OptimismIds[OptimismIds["AAVE_V3_BOOST"] = 1] = "AAVE_V3_BOOST";
|
|
229
|
+
OptimismIds[OptimismIds["AAVE_V3_CLOSE_TO_DEBT"] = 2] = "AAVE_V3_CLOSE_TO_DEBT";
|
|
230
|
+
OptimismIds[OptimismIds["AAVE_V3_CLOSE_TO_COLLATERAL"] = 3] = "AAVE_V3_CLOSE_TO_COLLATERAL";
|
|
231
|
+
OptimismIds[OptimismIds["AAVE_V3_OPEN_ORDER_FROM_COLLATERAL"] = 4] = "AAVE_V3_OPEN_ORDER_FROM_COLLATERAL";
|
|
232
|
+
OptimismIds[OptimismIds["AAVE_V3_REPAY_ON_PRICE"] = 5] = "AAVE_V3_REPAY_ON_PRICE";
|
|
233
|
+
})(OptimismIds = Bundles.OptimismIds || (Bundles.OptimismIds = {}));
|
|
234
|
+
let BaseIds;
|
|
235
|
+
(function (BaseIds) {
|
|
236
|
+
BaseIds[BaseIds["AAVE_V3_REPAY"] = 0] = "AAVE_V3_REPAY";
|
|
237
|
+
BaseIds[BaseIds["AAVE_V3_BOOST"] = 1] = "AAVE_V3_BOOST";
|
|
238
|
+
BaseIds[BaseIds["AAVE_V3_CLOSE_TO_DEBT"] = 2] = "AAVE_V3_CLOSE_TO_DEBT";
|
|
239
|
+
BaseIds[BaseIds["AAVE_V3_CLOSE_TO_COLLATERAL"] = 3] = "AAVE_V3_CLOSE_TO_COLLATERAL";
|
|
240
|
+
BaseIds[BaseIds["COMP_V3_SW_REPAY_BUNDLE"] = 4] = "COMP_V3_SW_REPAY_BUNDLE";
|
|
241
|
+
BaseIds[BaseIds["COMP_V3_SW_BOOST_BUNDLE"] = 5] = "COMP_V3_SW_BOOST_BUNDLE";
|
|
242
|
+
BaseIds[BaseIds["MORPHO_BLUE_REPAY"] = 8] = "MORPHO_BLUE_REPAY";
|
|
243
|
+
BaseIds[BaseIds["MORPHO_BLUE_BOOST"] = 9] = "MORPHO_BLUE_BOOST";
|
|
244
|
+
BaseIds[BaseIds["AAVE_V3_OPEN_ORDER_FROM_COLLATERAL"] = 10] = "AAVE_V3_OPEN_ORDER_FROM_COLLATERAL";
|
|
245
|
+
BaseIds[BaseIds["AAVE_V3_REPAY_ON_PRICE"] = 11] = "AAVE_V3_REPAY_ON_PRICE";
|
|
246
|
+
BaseIds[BaseIds["MORPHO_BLUE_BOOST_ON_PRICE"] = 12] = "MORPHO_BLUE_BOOST_ON_PRICE";
|
|
247
|
+
BaseIds[BaseIds["FLUID_T1_REPAY"] = 13] = "FLUID_T1_REPAY";
|
|
248
|
+
BaseIds[BaseIds["FLUID_T1_BOOST"] = 14] = "FLUID_T1_BOOST";
|
|
249
|
+
BaseIds[BaseIds["COMP_V3_SW_REPAY_ON_PRICE"] = 15] = "COMP_V3_SW_REPAY_ON_PRICE";
|
|
250
|
+
BaseIds[BaseIds["COMP_V3_SW_BOOST_ON_PRICE"] = 16] = "COMP_V3_SW_BOOST_ON_PRICE";
|
|
251
|
+
BaseIds[BaseIds["COMP_V3_SW_CLOSE"] = 17] = "COMP_V3_SW_CLOSE";
|
|
252
|
+
BaseIds[BaseIds["COMP_V3_EOA_REPAY_ON_PRICE"] = 18] = "COMP_V3_EOA_REPAY_ON_PRICE";
|
|
253
|
+
BaseIds[BaseIds["COMP_V3_EOA_BOOST_ON_PRICE"] = 19] = "COMP_V3_EOA_BOOST_ON_PRICE";
|
|
254
|
+
BaseIds[BaseIds["COMP_V3_EOA_CLOSE"] = 20] = "COMP_V3_EOA_CLOSE";
|
|
255
|
+
BaseIds[BaseIds["COMP_V3_EOA_REPAY"] = 21] = "COMP_V3_EOA_REPAY";
|
|
256
|
+
BaseIds[BaseIds["COMP_V3_EOA_BOOST"] = 22] = "COMP_V3_EOA_BOOST";
|
|
257
|
+
})(BaseIds = Bundles.BaseIds || (Bundles.BaseIds = {}));
|
|
258
|
+
let ArbitrumIds;
|
|
259
|
+
(function (ArbitrumIds) {
|
|
260
|
+
ArbitrumIds[ArbitrumIds["AAVE_V3_REPAY"] = 0] = "AAVE_V3_REPAY";
|
|
261
|
+
ArbitrumIds[ArbitrumIds["AAVE_V3_BOOST"] = 1] = "AAVE_V3_BOOST";
|
|
262
|
+
ArbitrumIds[ArbitrumIds["AAVE_V3_CLOSE_TO_DEBT"] = 2] = "AAVE_V3_CLOSE_TO_DEBT";
|
|
263
|
+
ArbitrumIds[ArbitrumIds["AAVE_V3_CLOSE_TO_COLLATERAL"] = 3] = "AAVE_V3_CLOSE_TO_COLLATERAL";
|
|
264
|
+
ArbitrumIds[ArbitrumIds["COMP_V3_SW_REPAY_BUNDLE"] = 4] = "COMP_V3_SW_REPAY_BUNDLE";
|
|
265
|
+
ArbitrumIds[ArbitrumIds["COMP_V3_SW_BOOST_BUNDLE"] = 5] = "COMP_V3_SW_BOOST_BUNDLE";
|
|
266
|
+
ArbitrumIds[ArbitrumIds["AAVE_V3_OPEN_ORDER_FROM_COLLATERAL"] = 6] = "AAVE_V3_OPEN_ORDER_FROM_COLLATERAL";
|
|
267
|
+
ArbitrumIds[ArbitrumIds["AAVE_V3_REPAY_ON_PRICE"] = 7] = "AAVE_V3_REPAY_ON_PRICE";
|
|
268
|
+
ArbitrumIds[ArbitrumIds["FLUID_T1_REPAY"] = 8] = "FLUID_T1_REPAY";
|
|
269
|
+
ArbitrumIds[ArbitrumIds["FLUID_T1_BOOST"] = 9] = "FLUID_T1_BOOST";
|
|
270
|
+
ArbitrumIds[ArbitrumIds["COMP_V3_SW_REPAY_ON_PRICE"] = 10] = "COMP_V3_SW_REPAY_ON_PRICE";
|
|
271
|
+
ArbitrumIds[ArbitrumIds["COMP_V3_SW_BOOST_ON_PRICE"] = 11] = "COMP_V3_SW_BOOST_ON_PRICE";
|
|
272
|
+
ArbitrumIds[ArbitrumIds["COMP_V3_SW_CLOSE"] = 12] = "COMP_V3_SW_CLOSE";
|
|
273
|
+
ArbitrumIds[ArbitrumIds["COMP_V3_EOA_REPAY_ON_PRICE"] = 13] = "COMP_V3_EOA_REPAY_ON_PRICE";
|
|
274
|
+
ArbitrumIds[ArbitrumIds["COMP_V3_EOA_BOOST_ON_PRICE"] = 14] = "COMP_V3_EOA_BOOST_ON_PRICE";
|
|
275
|
+
ArbitrumIds[ArbitrumIds["COMP_V3_EOA_CLOSE"] = 15] = "COMP_V3_EOA_CLOSE";
|
|
276
|
+
ArbitrumIds[ArbitrumIds["COMP_V3_EOA_REPAY"] = 16] = "COMP_V3_EOA_REPAY";
|
|
277
|
+
ArbitrumIds[ArbitrumIds["COMP_V3_EOA_BOOST"] = 17] = "COMP_V3_EOA_BOOST";
|
|
278
|
+
})(ArbitrumIds = Bundles.ArbitrumIds || (Bundles.ArbitrumIds = {}));
|
|
279
|
+
})(Bundles = exports.Bundles || (exports.Bundles = {}));
|