@defisaver/automation-sdk 3.3.8 → 3.3.10-aave-v4-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 +55 -0
- package/cjs/services/ethereumService.js +21 -14
- package/cjs/services/strategiesService.js +101 -0
- package/cjs/services/strategySubService.d.ts +8 -0
- package/cjs/services/strategySubService.js +47 -1
- package/cjs/services/strategySubService.test.js +143 -0
- package/cjs/services/subDataService.d.ts +302 -129
- package/cjs/services/subDataService.js +629 -372
- package/cjs/services/subDataService.test.js +213 -0
- package/cjs/services/triggerService.d.ts +29 -0
- package/cjs/services/triggerService.js +55 -1
- package/cjs/services/triggerService.test.js +84 -0
- package/cjs/types/enums.d.ts +14 -2
- package/cjs/types/enums.js +12 -0
- package/cjs/types/index.d.ts +22 -1
- package/esm/constants/index.js +55 -0
- package/esm/services/ethereumService.js +21 -14
- package/esm/services/strategiesService.js +102 -1
- package/esm/services/strategySubService.d.ts +8 -0
- package/esm/services/strategySubService.js +46 -0
- package/esm/services/strategySubService.test.js +144 -1
- package/esm/services/subDataService.d.ts +302 -129
- package/esm/services/subDataService.js +628 -371
- package/esm/services/subDataService.test.js +213 -0
- package/esm/services/triggerService.d.ts +29 -0
- package/esm/services/triggerService.js +54 -0
- package/esm/services/triggerService.test.js +85 -1
- package/esm/types/enums.d.ts +14 -2
- package/esm/types/enums.js +12 -0
- package/esm/types/index.d.ts +22 -1
- package/package.json +1 -1
- package/src/constants/index.ts +55 -0
- package/src/services/ethereumService.ts +23 -16
- package/src/services/strategiesService.ts +116 -1
- package/src/services/strategySubService.test.ts +180 -0
- package/src/services/strategySubService.ts +162 -2
- package/src/services/subDataService.test.ts +233 -0
- package/src/services/subDataService.ts +977 -703
- package/src/services/triggerService.test.ts +99 -0
- package/src/services/triggerService.ts +76 -1
- package/src/types/enums.ts +12 -0
- package/src/types/index.ts +27 -1
|
@@ -1,6 +1,46 @@
|
|
|
1
1
|
import type { EthereumAddress } from '../types';
|
|
2
2
|
import type { CloseStrategyType, OrderType } from '../types/enums';
|
|
3
3
|
import { ChainId, RatioState } from '../types/enums';
|
|
4
|
+
/**
|
|
5
|
+
_______ _______ .______ .______ _______ ______ ___ .___________. _______ _______
|
|
6
|
+
| \ | ____|| _ \ | _ \ | ____| / | / \ | || ____|| \
|
|
7
|
+
| .--. || |__ | |_) | | |_) | | |__ | ,----' / ^ \ `---| |----`| |__ | .--. |
|
|
8
|
+
| | | || __| | ___/ | / | __| | | / /_\ \ | | | __| | | | |
|
|
9
|
+
| '--' || |____ | | | |\ \----.| |____ | `----./ _____ \ | | | |____ | '--' |
|
|
10
|
+
|_______/ |_______|| _| | _| `._____||_______| \______/__/ \__\ |__| |_______||_______/
|
|
11
|
+
*/
|
|
12
|
+
export declare const morphoAaveV2LeverageManagementSubData: {
|
|
13
|
+
encode(triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean): string[];
|
|
14
|
+
decode(subData: string[]): {
|
|
15
|
+
targetRatio: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare const cBondsRebondSubData: {
|
|
19
|
+
encode(bondId: number | string): string[];
|
|
20
|
+
decode(subData: string[]): {
|
|
21
|
+
bondId: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare const liquityPaybackUsingChickenBondSubData: {
|
|
25
|
+
/**
|
|
26
|
+
* @param sourceId bondId or subId
|
|
27
|
+
* @param sourceType 0 for bond, 1 for subId
|
|
28
|
+
* @param chainId
|
|
29
|
+
*/
|
|
30
|
+
encode: (sourceId: string, sourceType: number, chainId?: ChainId) => string[];
|
|
31
|
+
decode: (subData: string[]) => {
|
|
32
|
+
sourceId: string;
|
|
33
|
+
sourceType: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
.___ ___. ___ __ ___ _______ .______
|
|
38
|
+
| \/ | / \ | |/ / | ____|| _ \
|
|
39
|
+
| \ / | / ^ \ | ' / | |__ | |_) |
|
|
40
|
+
| |\/| | / /_\ \ | < | __| | /
|
|
41
|
+
| | | | / _____ \ | . \ | |____ | |\ \----.
|
|
42
|
+
|__| |__| /__/ \__\ |__|\__\ |_______|| _| `._____|
|
|
43
|
+
*/
|
|
4
44
|
export declare const makerRepayFromSavingsSubData: {
|
|
5
45
|
encode(vaultId: number, targetRatioPercentage: number, chainId: ChainId, daiAddr?: EthereumAddress, mcdCdpManagerAddr?: EthereumAddress): string[];
|
|
6
46
|
decode(subData: string[]): {
|
|
@@ -10,11 +50,6 @@ export declare const makerRepayFromSavingsSubData: {
|
|
|
10
50
|
targetRatio: number;
|
|
11
51
|
};
|
|
12
52
|
};
|
|
13
|
-
export declare const liquityRepayFromSavingsSubData: {
|
|
14
|
-
decode(subData: string[]): {
|
|
15
|
-
targetRatio: number;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
53
|
export declare const makerCloseSubData: {
|
|
19
54
|
encode(vaultId: number, closeToAssetAddr: EthereumAddress, chainId: ChainId, daiAddr?: EthereumAddress, mcdCdpManagerAddr?: EthereumAddress): string[];
|
|
20
55
|
decode(subData: string[]): {
|
|
@@ -28,6 +63,27 @@ export declare const makerLeverageManagementSubData: {
|
|
|
28
63
|
targetRatio: number;
|
|
29
64
|
};
|
|
30
65
|
};
|
|
66
|
+
export declare const makerLeverageManagementWithoutSubProxy: {
|
|
67
|
+
encode(vaultId: number, targetRatio: number, daiAddr?: EthereumAddress): string[];
|
|
68
|
+
decode(subData: string[]): {
|
|
69
|
+
vaultId: number;
|
|
70
|
+
targetRatio: number;
|
|
71
|
+
daiAddr: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
__ __ ______ __ __ __ .___________.____ ____ ____ ____ __
|
|
76
|
+
| | | | / __ \ | | | | | | | |\ \ / / \ \ / / /_ |
|
|
77
|
+
| | | | | | | | | | | | | | `---| |----` \ \/ / \ \/ / | |
|
|
78
|
+
| | | | | | | | | | | | | | | | \_ _/ \ / | |
|
|
79
|
+
| `----.| | | `--' '--.| `--' | | | | | | | \ / | |
|
|
80
|
+
|_______||__| \_____\_____\\______/ |__| |__| |__| \__/ |_|
|
|
81
|
+
*/
|
|
82
|
+
export declare const liquityRepayFromSavingsSubData: {
|
|
83
|
+
decode(subData: string[]): {
|
|
84
|
+
targetRatio: number;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
31
87
|
export declare const liquityLeverageManagementSubData: {
|
|
32
88
|
decode: (subData: string[]) => {
|
|
33
89
|
targetRatio: number;
|
|
@@ -40,12 +96,95 @@ export declare const liquityCloseSubData: {
|
|
|
40
96
|
debtAddr: string;
|
|
41
97
|
};
|
|
42
98
|
};
|
|
99
|
+
export declare const liquityDsrPaybackSubData: {
|
|
100
|
+
encode: (targetRatio: number) => string[];
|
|
101
|
+
decode: (subData: string[]) => {
|
|
102
|
+
targetRatio: number;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
export declare const liquityDsrSupplySubData: {
|
|
106
|
+
encode: (targetRatio: number) => string[];
|
|
107
|
+
decode: (subData: string[]) => {
|
|
108
|
+
targetRatio: number;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
export declare const liquityDebtInFrontRepaySubData: {
|
|
112
|
+
encode: (targetRatioIncrease: number) => string[];
|
|
113
|
+
decode: (subData: string[]) => {
|
|
114
|
+
targetRatioIncrease: number;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* __ __ ______ __ __ __ .___________.____ ____ ____ ____ ___
|
|
119
|
+
| | | | / __ \ | | | | | | | |\ \ / / \ \ / / |__ \
|
|
120
|
+
| | | | | | | | | | | | | | `---| |----` \ \/ / \ \/ / ) |
|
|
121
|
+
| | | | | | | | | | | | | | | | \_ _/ \ / / /
|
|
122
|
+
| `----.| | | `--' '--.| `--' | | | | | | | \ / / /_
|
|
123
|
+
|_______||__| \_____\_____\\______/ |__| |__| |__| \__/ |____|
|
|
124
|
+
*/
|
|
125
|
+
export declare const liquityV2LeverageManagementSubData: {
|
|
126
|
+
encode: (market: EthereumAddress, troveId: string, collToken: EthereumAddress, boldToken: EthereumAddress, ratioState: RatioState, targetRatio: number) => string[];
|
|
127
|
+
decode: (subData: string[]) => {
|
|
128
|
+
market: string;
|
|
129
|
+
troveId: string;
|
|
130
|
+
collToken: string;
|
|
131
|
+
boldToken: string;
|
|
132
|
+
ratioState: RatioState;
|
|
133
|
+
targetRatio: number;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
export declare const liquityV2CloseSubData: {
|
|
137
|
+
encode(market: EthereumAddress, troveId: string, collToken: EthereumAddress, boldToken: EthereumAddress, closeType: CloseStrategyType): string[];
|
|
138
|
+
decode(subData: string[]): {
|
|
139
|
+
market: EthereumAddress;
|
|
140
|
+
troveId: string;
|
|
141
|
+
collToken: EthereumAddress;
|
|
142
|
+
boldToken: EthereumAddress;
|
|
143
|
+
closeType: CloseStrategyType;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
export declare const liquityV2LeverageManagementOnPriceSubData: {
|
|
147
|
+
encode(market: EthereumAddress, troveId: string, collToken: EthereumAddress, boldToken: EthereumAddress, targetRatio: number, isRepayOnPrice: boolean): string[];
|
|
148
|
+
decode(subData: string[]): {
|
|
149
|
+
market: EthereumAddress;
|
|
150
|
+
troveId: string;
|
|
151
|
+
collToken: EthereumAddress;
|
|
152
|
+
boldToken: EthereumAddress;
|
|
153
|
+
targetRatio: number;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
export declare const liquityV2PaybackSubData: {
|
|
157
|
+
encode: (market: EthereumAddress, troveId: string, boldToken: EthereumAddress, targetRatio: number, ratioState: RatioState) => string[];
|
|
158
|
+
decode: (subData: string[]) => {
|
|
159
|
+
market: string;
|
|
160
|
+
troveId: string;
|
|
161
|
+
boldToken: string;
|
|
162
|
+
ratioState: RatioState;
|
|
163
|
+
targetRatio: number;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
___ ___ ____ ____ _______ ____ ____ ___
|
|
168
|
+
/ \ / \ \ \ / / | ____| \ \ / / |__ \
|
|
169
|
+
/ ^ \ / ^ \ \ \/ / | |__ \ \/ / ) |
|
|
170
|
+
/ /_\ \ / /_\ \ \ / | __| \ / / /
|
|
171
|
+
/ _____ \ / _____ \ \ / | |____ \ / / /_
|
|
172
|
+
/__/ \__\ /__/ \__\ \__/ |_______| \__/ |____|
|
|
173
|
+
*/
|
|
43
174
|
export declare const aaveV2LeverageManagementSubData: {
|
|
44
175
|
encode(triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean): string[];
|
|
45
176
|
decode(subData: string[]): {
|
|
46
177
|
targetRatio: number;
|
|
47
178
|
};
|
|
48
179
|
};
|
|
180
|
+
/**
|
|
181
|
+
___ ___ ____ ____ _______ ____ ____ ____
|
|
182
|
+
/ \ / \ \ \ / / | ____| \ \ / / |___ \
|
|
183
|
+
/ ^ \ / ^ \ \ \/ / | |__ \ \/ / __) |
|
|
184
|
+
/ /_\ \ / /_\ \ \ / | __| \ / |__ <
|
|
185
|
+
/ _____ \ / _____ \ \ / | |____ \ / ___) |
|
|
186
|
+
/__/ \__\ /__/ \__\ \__/ |_______| \__/ |____/
|
|
187
|
+
*/
|
|
49
188
|
export declare const aaveV3LeverageManagementSubData: {
|
|
50
189
|
decode(subData: string[]): {
|
|
51
190
|
targetRatio: number;
|
|
@@ -102,12 +241,93 @@ export declare const aaveV3QuotePriceSubData: {
|
|
|
102
241
|
debtAssetId: number;
|
|
103
242
|
};
|
|
104
243
|
};
|
|
244
|
+
export declare const aaveV3LeverageManagementOnPriceSubData: {
|
|
245
|
+
encode(collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, marketAddr: EthereumAddress, targetRatio: number): string[];
|
|
246
|
+
decode(subData: string[]): {
|
|
247
|
+
collAsset: EthereumAddress;
|
|
248
|
+
collAssetId: number;
|
|
249
|
+
debtAsset: EthereumAddress;
|
|
250
|
+
debtAssetId: number;
|
|
251
|
+
marketAddr: EthereumAddress;
|
|
252
|
+
targetRatio: number;
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
/**
|
|
256
|
+
* ___ ___ ____ ____ _______ ____ ____ _ _
|
|
257
|
+
/ \ / \ \ \ / / | ____| \ \ / / | || |
|
|
258
|
+
/ ^ \ / ^ \ \ \/ / | |__ \ \/ / | || |_
|
|
259
|
+
/ /_\ \ / /_\ \ \ / | __| \ / |__ _|
|
|
260
|
+
/ _____ \ / _____ \ \ / | |____ \ / | |
|
|
261
|
+
/__/ \__\ /__/ \__\ \__/ |_______| \__/ |_|
|
|
262
|
+
*/
|
|
263
|
+
export declare const aaveV4LeverageManagementSubData: {
|
|
264
|
+
encode: (spoke: EthereumAddress, owner: EthereumAddress, ratioState: RatioState, targetRatio: number) => string[];
|
|
265
|
+
decode: (subData: string[]) => {
|
|
266
|
+
spoke: string;
|
|
267
|
+
owner: string;
|
|
268
|
+
ratioState: RatioState;
|
|
269
|
+
targetRatio: number;
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
export declare const aaveV4LeverageManagementOnPriceSubData: {
|
|
273
|
+
encode: (spoke: EthereumAddress, owner: EthereumAddress, collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, ratioState: RatioState, targetRatio: number) => string[];
|
|
274
|
+
decode: (subData: string[]) => {
|
|
275
|
+
spoke: string;
|
|
276
|
+
owner: string;
|
|
277
|
+
collAsset: string;
|
|
278
|
+
collAssetId: number;
|
|
279
|
+
debtAsset: string;
|
|
280
|
+
debtAssetId: number;
|
|
281
|
+
ratioState: RatioState;
|
|
282
|
+
targetRatio: number;
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
export declare const aaveV4CloseSubData: {
|
|
286
|
+
encode: (spoke: EthereumAddress, owner: EthereumAddress, collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, closeType: CloseStrategyType) => string[];
|
|
287
|
+
decode: (subData: string[]) => {
|
|
288
|
+
spoke: string;
|
|
289
|
+
owner: string;
|
|
290
|
+
collAsset: string;
|
|
291
|
+
collAssetId: number;
|
|
292
|
+
debtAsset: string;
|
|
293
|
+
debtAssetId: number;
|
|
294
|
+
closeType: CloseStrategyType;
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
export declare const aaveV4CollateralSwitchSubData: {
|
|
298
|
+
encode: (spoke: EthereumAddress, owner: EthereumAddress, fromAsset: EthereumAddress, fromAssetId: number, toAsset: EthereumAddress, toAssetId: number, amountToSwitch: string) => string[];
|
|
299
|
+
decode: (subData: string[]) => {
|
|
300
|
+
spoke: string;
|
|
301
|
+
owner: string;
|
|
302
|
+
fromAsset: string;
|
|
303
|
+
fromAssetId: number;
|
|
304
|
+
toAsset: string;
|
|
305
|
+
toAssetId: number;
|
|
306
|
+
amountToSwitch: string;
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
/**
|
|
310
|
+
______ ______ .___ ___. .______ ____ ____ ___
|
|
311
|
+
/ | / __ \ | \/ | | _ \ \ \ / / |__ \
|
|
312
|
+
| ,----'| | | | | \ / | | |_) | \ \/ / ) |
|
|
313
|
+
| | | | | | | |\/| | | ___/ \ / / /
|
|
314
|
+
| `----.| `--' | | | | | | | \ / / /_
|
|
315
|
+
\______| \______/ |__| |__| | _| \__/ |____|
|
|
316
|
+
*/
|
|
105
317
|
export declare const compoundV2LeverageManagementSubData: {
|
|
106
318
|
encode(triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean): string[];
|
|
107
319
|
decode(subData: string[]): {
|
|
108
320
|
targetRatio: number;
|
|
109
321
|
};
|
|
110
322
|
};
|
|
323
|
+
/**
|
|
324
|
+
______ ______ .___ ___. .______ ____ ____ ____
|
|
325
|
+
/ | / __ \ | \/ | | _ \ \ \ / / |___ \
|
|
326
|
+
| ,----'| | | | | \ / | | |_) | \ \/ / __) |
|
|
327
|
+
| | | | | | | |\/| | | ___/ \ / |__ <
|
|
328
|
+
| `----.| `--' | | | | | | | \ / ___) |
|
|
329
|
+
\______| \______/ |__| |__| | _| \__/ |____/
|
|
330
|
+
*/
|
|
111
331
|
export declare const compoundV3LeverageManagementSubData: {
|
|
112
332
|
encode(market: EthereumAddress, baseToken: EthereumAddress, triggerRepayRatio: number, triggerBoostRatio: number, targetBoostRatio: number, targetRepayRatio: number, boostEnabled: boolean, isEOA: boolean): string[];
|
|
113
333
|
decode(subData: string[]): {
|
|
@@ -120,30 +340,35 @@ export declare const compoundV3L2LeverageManagementSubData: {
|
|
|
120
340
|
targetRatio: number;
|
|
121
341
|
};
|
|
122
342
|
};
|
|
123
|
-
export declare const
|
|
124
|
-
encode(
|
|
343
|
+
export declare const compoundV3LeverageManagementOnPriceSubData: {
|
|
344
|
+
encode(market: EthereumAddress, collToken: EthereumAddress, baseToken: EthereumAddress, targetRatio: number, ratioState: RatioState, user: EthereumAddress): string[];
|
|
125
345
|
decode(subData: string[]): {
|
|
346
|
+
market: EthereumAddress;
|
|
347
|
+
collToken: EthereumAddress;
|
|
348
|
+
baseToken: EthereumAddress;
|
|
126
349
|
targetRatio: number;
|
|
350
|
+
ratioState: RatioState;
|
|
351
|
+
owner: EthereumAddress;
|
|
127
352
|
};
|
|
128
353
|
};
|
|
129
|
-
export declare const
|
|
130
|
-
encode(
|
|
354
|
+
export declare const compoundV3CloseSubData: {
|
|
355
|
+
encode(market: EthereumAddress, collToken: EthereumAddress, baseToken: EthereumAddress, closeType: CloseStrategyType, user: EthereumAddress): string[];
|
|
131
356
|
decode(subData: string[]): {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
* @param sourceId bondId or subId
|
|
138
|
-
* @param sourceType 0 for bond, 1 for subId
|
|
139
|
-
* @param chainId
|
|
140
|
-
*/
|
|
141
|
-
encode: (sourceId: string, sourceType: number, chainId?: ChainId) => string[];
|
|
142
|
-
decode: (subData: string[]) => {
|
|
143
|
-
sourceId: string;
|
|
144
|
-
sourceType: string;
|
|
357
|
+
market: EthereumAddress;
|
|
358
|
+
collToken: EthereumAddress;
|
|
359
|
+
baseToken: EthereumAddress;
|
|
360
|
+
closeType: CloseStrategyType;
|
|
361
|
+
owner: EthereumAddress;
|
|
145
362
|
};
|
|
146
363
|
};
|
|
364
|
+
/**
|
|
365
|
+
__________ ___ ______ __ __ ___ .__ __. _______ _______
|
|
366
|
+
| ____\ \ / / / || | | | / \ | \ | | / _____|| ____|
|
|
367
|
+
| |__ \ V / | ,----'| |__| | / ^ \ | \| | | | __ | |__
|
|
368
|
+
| __| > < | | | __ | / /_\ \ | . ` | | | |_ | | __|
|
|
369
|
+
| |____ / . \ | `----.| | | | / _____ \ | |\ | | |__| | | |____
|
|
370
|
+
|_______/__/ \__\ \______||__| |__| /__/ \__\ |__| \__| \______| |_______|
|
|
371
|
+
*/
|
|
147
372
|
export declare const exchangeDcaSubData: {
|
|
148
373
|
encode: (fromToken: EthereumAddress, toToken: EthereumAddress, amount: string, interval: number) => string[];
|
|
149
374
|
decode: (subData: string[], chainId: ChainId) => {
|
|
@@ -161,29 +386,46 @@ export declare const exchangeLimitOrderSubData: {
|
|
|
161
386
|
amount: string;
|
|
162
387
|
};
|
|
163
388
|
};
|
|
389
|
+
/**
|
|
390
|
+
_______..______ ___ .______ __ ___
|
|
391
|
+
/ || _ \ / \ | _ \ | |/ /
|
|
392
|
+
| (----`| |_) | / ^ \ | |_) | | ' /
|
|
393
|
+
\ \ | ___/ / /_\ \ | / | <
|
|
394
|
+
.----) | | | / _____ \ | |\ \----.| . \
|
|
395
|
+
|_______/ | _| /__/ \__\ | _| `._____||__|\__\
|
|
396
|
+
*/
|
|
164
397
|
export declare const sparkLeverageManagementSubData: {
|
|
165
398
|
decode(subData: string[]): {
|
|
166
399
|
targetRatio: number;
|
|
167
400
|
};
|
|
168
401
|
};
|
|
169
|
-
export declare const
|
|
170
|
-
encode
|
|
171
|
-
decode
|
|
172
|
-
targetRatio: number;
|
|
173
|
-
};
|
|
174
|
-
};
|
|
175
|
-
export declare const liquityDsrSupplySubData: {
|
|
176
|
-
encode: (targetRatio: number) => string[];
|
|
177
|
-
decode: (subData: string[]) => {
|
|
402
|
+
export declare const sparkLeverageManagementSubDataWithoutSubProxy: {
|
|
403
|
+
encode(targetRatio: number, ratioState: RatioState): string[];
|
|
404
|
+
decode(subData: string[]): {
|
|
178
405
|
targetRatio: number;
|
|
406
|
+
ratioState: RatioState;
|
|
179
407
|
};
|
|
180
408
|
};
|
|
181
|
-
export declare const
|
|
182
|
-
encode:
|
|
183
|
-
decode
|
|
184
|
-
|
|
409
|
+
export declare const sparkCloseGenericSubData: {
|
|
410
|
+
encode(collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, closeType: CloseStrategyType, marketAddr: EthereumAddress, user: EthereumAddress): string[];
|
|
411
|
+
decode(subData: string[]): {
|
|
412
|
+
collAsset: EthereumAddress;
|
|
413
|
+
collAssetId: number;
|
|
414
|
+
debtAsset: EthereumAddress;
|
|
415
|
+
debtAssetId: number;
|
|
416
|
+
closeType: CloseStrategyType;
|
|
417
|
+
marketAddr: EthereumAddress;
|
|
418
|
+
owner: EthereumAddress;
|
|
185
419
|
};
|
|
186
420
|
};
|
|
421
|
+
/**
|
|
422
|
+
______ .______ ____ ____ __ __ _______. _______
|
|
423
|
+
/ || _ \ \ \ / / | | | | / || \
|
|
424
|
+
| ,----'| |_) | \ \/ / | | | | | (----`| .--. |
|
|
425
|
+
| | | / \ / | | | | \ \ | | | |
|
|
426
|
+
| `----.| |\ \----. \ / | `--' | .----) | | '--' |
|
|
427
|
+
\______|| _| `._____| \__/ \______/ |_______/ |_______/
|
|
428
|
+
*/
|
|
187
429
|
export declare const crvUSDLeverageManagementSubData: {
|
|
188
430
|
encode: (controllerAddr: EthereumAddress, ratioState: RatioState, targetRatio: number, collTokenAddr: EthereumAddress, crvUSDAddr: EthereumAddress) => string[];
|
|
189
431
|
decode: (subData: string[]) => {
|
|
@@ -200,6 +442,14 @@ export declare const crvUSDPaybackSubData: {
|
|
|
200
442
|
paybackAmount: string;
|
|
201
443
|
};
|
|
202
444
|
};
|
|
445
|
+
/**
|
|
446
|
+
.___ ___. ______ .______ .______ __ __ ______
|
|
447
|
+
| \/ | / __ \ | _ \ | _ \ | | | | / __ \
|
|
448
|
+
| \ / | | | | | | |_) | | |_) | | |__| | | | | |
|
|
449
|
+
| |\/| | | | | | | / | ___/ | __ | | | | |
|
|
450
|
+
| | | | | `--' | | |\ \----.| | | | | | | `--' |
|
|
451
|
+
|__| |__| \______/ | _| `._____|| _| |__| |__| \______/
|
|
452
|
+
*/
|
|
203
453
|
export declare const morphoBlueLeverageManagementSubData: {
|
|
204
454
|
encode: (loanToken: EthereumAddress, collToken: EthereumAddress, oracle: EthereumAddress, irm: EthereumAddress, lltv: string, ratioState: RatioState, targetRatio: number, user: EthereumAddress, isEOA: boolean) => string[];
|
|
205
455
|
decode: (subData: string[]) => {
|
|
@@ -212,48 +462,6 @@ export declare const morphoBlueLeverageManagementSubData: {
|
|
|
212
462
|
targetRatio: number;
|
|
213
463
|
};
|
|
214
464
|
};
|
|
215
|
-
export declare const aaveV3LeverageManagementOnPriceSubData: {
|
|
216
|
-
encode(collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, marketAddr: EthereumAddress, targetRatio: number): string[];
|
|
217
|
-
decode(subData: string[]): {
|
|
218
|
-
collAsset: EthereumAddress;
|
|
219
|
-
collAssetId: number;
|
|
220
|
-
debtAsset: EthereumAddress;
|
|
221
|
-
debtAssetId: number;
|
|
222
|
-
marketAddr: EthereumAddress;
|
|
223
|
-
targetRatio: number;
|
|
224
|
-
};
|
|
225
|
-
};
|
|
226
|
-
export declare const liquityV2LeverageManagementSubData: {
|
|
227
|
-
encode: (market: EthereumAddress, troveId: string, collToken: EthereumAddress, boldToken: EthereumAddress, ratioState: RatioState, targetRatio: number) => string[];
|
|
228
|
-
decode: (subData: string[]) => {
|
|
229
|
-
market: string;
|
|
230
|
-
troveId: string;
|
|
231
|
-
collToken: string;
|
|
232
|
-
boldToken: string;
|
|
233
|
-
ratioState: RatioState;
|
|
234
|
-
targetRatio: number;
|
|
235
|
-
};
|
|
236
|
-
};
|
|
237
|
-
export declare const liquityV2CloseSubData: {
|
|
238
|
-
encode(market: EthereumAddress, troveId: string, collToken: EthereumAddress, boldToken: EthereumAddress, closeType: CloseStrategyType): string[];
|
|
239
|
-
decode(subData: string[]): {
|
|
240
|
-
market: EthereumAddress;
|
|
241
|
-
troveId: string;
|
|
242
|
-
collToken: EthereumAddress;
|
|
243
|
-
boldToken: EthereumAddress;
|
|
244
|
-
closeType: CloseStrategyType;
|
|
245
|
-
};
|
|
246
|
-
};
|
|
247
|
-
export declare const liquityV2LeverageManagementOnPriceSubData: {
|
|
248
|
-
encode(market: EthereumAddress, troveId: string, collToken: EthereumAddress, boldToken: EthereumAddress, targetRatio: number, isRepayOnPrice: boolean): string[];
|
|
249
|
-
decode(subData: string[]): {
|
|
250
|
-
market: EthereumAddress;
|
|
251
|
-
troveId: string;
|
|
252
|
-
collToken: EthereumAddress;
|
|
253
|
-
boldToken: EthereumAddress;
|
|
254
|
-
targetRatio: number;
|
|
255
|
-
};
|
|
256
|
-
};
|
|
257
465
|
export declare const morphoBlueLeverageManagementOnPriceSubData: {
|
|
258
466
|
encode(loanToken: EthereumAddress, collToken: EthereumAddress, oracle: EthereumAddress, irm: EthereumAddress, lltv: string, targetRatio: number, user: EthereumAddress): string[];
|
|
259
467
|
decode(subData: string[]): {
|
|
@@ -266,58 +474,6 @@ export declare const morphoBlueLeverageManagementOnPriceSubData: {
|
|
|
266
474
|
user: string;
|
|
267
475
|
};
|
|
268
476
|
};
|
|
269
|
-
export declare const liquityV2PaybackSubData: {
|
|
270
|
-
encode: (market: EthereumAddress, troveId: string, boldToken: EthereumAddress, targetRatio: number, ratioState: RatioState) => string[];
|
|
271
|
-
decode: (subData: string[]) => {
|
|
272
|
-
market: string;
|
|
273
|
-
troveId: string;
|
|
274
|
-
boldToken: string;
|
|
275
|
-
ratioState: RatioState;
|
|
276
|
-
targetRatio: number;
|
|
277
|
-
};
|
|
278
|
-
};
|
|
279
|
-
export declare const fluidLeverageManagementSubData: {
|
|
280
|
-
encode: (nftId: string, vault: EthereumAddress, ratioState: RatioState, targetRatio: number) => string[];
|
|
281
|
-
decode: (subData: string[]) => {
|
|
282
|
-
nftId: string;
|
|
283
|
-
vault: string;
|
|
284
|
-
ratioState: RatioState;
|
|
285
|
-
targetRatio: number;
|
|
286
|
-
};
|
|
287
|
-
};
|
|
288
|
-
export declare const compoundV3LeverageManagementOnPriceSubData: {
|
|
289
|
-
encode(market: EthereumAddress, collToken: EthereumAddress, baseToken: EthereumAddress, targetRatio: number, ratioState: RatioState, user: EthereumAddress): string[];
|
|
290
|
-
decode(subData: string[]): {
|
|
291
|
-
market: EthereumAddress;
|
|
292
|
-
collToken: EthereumAddress;
|
|
293
|
-
baseToken: EthereumAddress;
|
|
294
|
-
targetRatio: number;
|
|
295
|
-
ratioState: RatioState;
|
|
296
|
-
owner: EthereumAddress;
|
|
297
|
-
};
|
|
298
|
-
};
|
|
299
|
-
export declare const compoundV3CloseSubData: {
|
|
300
|
-
encode(market: EthereumAddress, collToken: EthereumAddress, baseToken: EthereumAddress, closeType: CloseStrategyType, user: EthereumAddress): string[];
|
|
301
|
-
decode(subData: string[]): {
|
|
302
|
-
market: EthereumAddress;
|
|
303
|
-
collToken: EthereumAddress;
|
|
304
|
-
baseToken: EthereumAddress;
|
|
305
|
-
closeType: CloseStrategyType;
|
|
306
|
-
owner: EthereumAddress;
|
|
307
|
-
};
|
|
308
|
-
};
|
|
309
|
-
export declare const sparkCloseGenericSubData: {
|
|
310
|
-
encode(collAsset: EthereumAddress, collAssetId: number, debtAsset: EthereumAddress, debtAssetId: number, closeType: CloseStrategyType, marketAddr: EthereumAddress, user: EthereumAddress): string[];
|
|
311
|
-
decode(subData: string[]): {
|
|
312
|
-
collAsset: EthereumAddress;
|
|
313
|
-
collAssetId: number;
|
|
314
|
-
debtAsset: EthereumAddress;
|
|
315
|
-
debtAssetId: number;
|
|
316
|
-
closeType: CloseStrategyType;
|
|
317
|
-
marketAddr: EthereumAddress;
|
|
318
|
-
owner: EthereumAddress;
|
|
319
|
-
};
|
|
320
|
-
};
|
|
321
477
|
export declare const morphoBlueCloseOnPriceSubData: {
|
|
322
478
|
encode(loanToken: EthereumAddress, collToken: EthereumAddress, oracle: EthereumAddress, irm: EthereumAddress, lltv: string, user: EthereumAddress, closeType: CloseStrategyType): string[];
|
|
323
479
|
decode(subData: string[]): {
|
|
@@ -330,3 +486,20 @@ export declare const morphoBlueCloseOnPriceSubData: {
|
|
|
330
486
|
closeType: CloseStrategyType;
|
|
331
487
|
};
|
|
332
488
|
};
|
|
489
|
+
/**
|
|
490
|
+
_______ __ __ __ __ _______
|
|
491
|
+
| ____|| | | | | | | | | \
|
|
492
|
+
| |__ | | | | | | | | | .--. |
|
|
493
|
+
| __| | | | | | | | | | | | |
|
|
494
|
+
| | | `----.| `--' | | | | '--' |
|
|
495
|
+
|__| |_______| \______/ |__| |_______/
|
|
496
|
+
*/
|
|
497
|
+
export declare const fluidLeverageManagementSubData: {
|
|
498
|
+
encode: (nftId: string, vault: EthereumAddress, ratioState: RatioState, targetRatio: number) => string[];
|
|
499
|
+
decode: (subData: string[]) => {
|
|
500
|
+
nftId: string;
|
|
501
|
+
vault: string;
|
|
502
|
+
ratioState: RatioState;
|
|
503
|
+
targetRatio: number;
|
|
504
|
+
};
|
|
505
|
+
};
|