@defisaver/sdk 1.2.7-dev-4-liquity-v2 → 1.2.7-dev-5-liquity-v2
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/esm/src/actions/liquityV2/LiquityV2AdjustZombieTroveAction.d.ts +23 -0
- package/esm/src/actions/liquityV2/LiquityV2AdjustZombieTroveAction.js +62 -0
- package/esm/src/actions/liquityV2/index.d.ts +1 -0
- package/esm/src/actions/liquityV2/index.js +1 -0
- package/esm/src/addresses.d.ts +4 -0
- package/esm/src/addresses.js +1 -0
- package/esm/src/index.d.ts +16 -0
- package/esm/src/triggers/{ShouldClosePriceTrigger.d.ts → ClosePriceTrigger.d.ts} +1 -1
- package/esm/src/triggers/ClosePriceTrigger.js +12 -0
- package/esm/src/triggers/index.d.ts +1 -1
- package/esm/src/triggers/index.js +1 -1
- package/package.json +1 -1
- package/src/actions/liquityV2/LiquityV2AdjustZombieTroveAction.ts +82 -0
- package/src/actions/liquityV2/index.ts +2 -1
- package/src/addresses.ts +1 -0
- package/src/triggers/{ShouldClosePriceTrigger.ts → ClosePriceTrigger.ts} +2 -2
- package/src/triggers/index.ts +1 -1
- package/umd/index.js +106 -65
- package/esm/src/triggers/ShouldClosePriceTrigger.js +0 -12
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256, uint8 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* LiquityV2AdjustZombieTroveAction - Adjusts a trove's collateral and/or debt for a zombie trove
|
|
5
|
+
*
|
|
6
|
+
* @category LiquityV2
|
|
7
|
+
*/
|
|
8
|
+
export declare class LiquityV2AdjustZombieTroveAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param market liquity address registry for the market
|
|
11
|
+
* @param from address from which to take the collateral or pay debt
|
|
12
|
+
* @param to address to which to send the collateral or borrowed debt
|
|
13
|
+
* @param troveId id of the trove being adjusted
|
|
14
|
+
* @param collAmount collateral amount to supply/withdraw
|
|
15
|
+
* @param debtAmount debt amount to borrow/payback
|
|
16
|
+
* @param upperHint upper hint for the trove insertion
|
|
17
|
+
* @param lowerHint lower hint for the trove insertion
|
|
18
|
+
* @param maxUpfrontFee maximum upfront fee user is willing to pay
|
|
19
|
+
* @param collAction specify if collateral is supplied or withdrawn
|
|
20
|
+
* @param debtAction specify if debt is borrowed or paid back
|
|
21
|
+
*/
|
|
22
|
+
constructor(market: EthAddress, from: EthAddress, to: EthAddress, troveId: uint256, collAmount: uint256, debtAmount: uint256, upperHint: uint256, lowerHint: uint256, maxUpfrontFee: uint256, collAction: uint8, debtAction: uint8);
|
|
23
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
/**
|
|
4
|
+
* LiquityV2AdjustZombieTroveAction - Adjusts a trove's collateral and/or debt for a zombie trove
|
|
5
|
+
*
|
|
6
|
+
* @category LiquityV2
|
|
7
|
+
*/
|
|
8
|
+
export class LiquityV2AdjustZombieTroveAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param market liquity address registry for the market
|
|
11
|
+
* @param from address from which to take the collateral or pay debt
|
|
12
|
+
* @param to address to which to send the collateral or borrowed debt
|
|
13
|
+
* @param troveId id of the trove being adjusted
|
|
14
|
+
* @param collAmount collateral amount to supply/withdraw
|
|
15
|
+
* @param debtAmount debt amount to borrow/payback
|
|
16
|
+
* @param upperHint upper hint for the trove insertion
|
|
17
|
+
* @param lowerHint lower hint for the trove insertion
|
|
18
|
+
* @param maxUpfrontFee maximum upfront fee user is willing to pay
|
|
19
|
+
* @param collAction specify if collateral is supplied or withdrawn
|
|
20
|
+
* @param debtAction specify if debt is borrowed or paid back
|
|
21
|
+
*/
|
|
22
|
+
constructor(market, from, to, troveId, collAmount, debtAmount, upperHint, lowerHint, maxUpfrontFee, collAction, debtAction) {
|
|
23
|
+
super('LiquityV2AdjustZombieTrove', getAddr('LiquityV2AdjustZombieTrove'), [
|
|
24
|
+
'address',
|
|
25
|
+
'address',
|
|
26
|
+
'address',
|
|
27
|
+
'uint256',
|
|
28
|
+
'uint256',
|
|
29
|
+
'uint256',
|
|
30
|
+
'uint256',
|
|
31
|
+
'uint256',
|
|
32
|
+
'uint256',
|
|
33
|
+
'uint8',
|
|
34
|
+
'uint8',
|
|
35
|
+
], [
|
|
36
|
+
market,
|
|
37
|
+
from,
|
|
38
|
+
to,
|
|
39
|
+
troveId,
|
|
40
|
+
collAmount,
|
|
41
|
+
debtAmount,
|
|
42
|
+
upperHint,
|
|
43
|
+
lowerHint,
|
|
44
|
+
maxUpfrontFee,
|
|
45
|
+
collAction,
|
|
46
|
+
debtAction,
|
|
47
|
+
]);
|
|
48
|
+
this.mappableArgs = [
|
|
49
|
+
this.args[0],
|
|
50
|
+
this.args[1],
|
|
51
|
+
this.args[2],
|
|
52
|
+
this.args[3],
|
|
53
|
+
this.args[4],
|
|
54
|
+
this.args[5],
|
|
55
|
+
this.args[6],
|
|
56
|
+
this.args[7],
|
|
57
|
+
this.args[8],
|
|
58
|
+
this.args[9],
|
|
59
|
+
this.args[10],
|
|
60
|
+
];
|
|
61
|
+
}
|
|
62
|
+
}
|
package/esm/src/addresses.d.ts
CHANGED
|
@@ -146,6 +146,7 @@ export declare const actionAddresses: {
|
|
|
146
146
|
LiquityV2SPDeposit: string;
|
|
147
147
|
LiquityV2SPWithdraw: string;
|
|
148
148
|
LiquityV2SPClaimColl: string;
|
|
149
|
+
LiquityV2AdjustZombieTrove: string;
|
|
149
150
|
BprotocolLiquitySPDeposit: string;
|
|
150
151
|
BprotocolLiquitySPWithdraw: string;
|
|
151
152
|
LidoStake: string;
|
|
@@ -393,6 +394,7 @@ export declare const actionAddresses: {
|
|
|
393
394
|
LiquityV2SPDeposit?: undefined;
|
|
394
395
|
LiquityV2SPWithdraw?: undefined;
|
|
395
396
|
LiquityV2SPClaimColl?: undefined;
|
|
397
|
+
LiquityV2AdjustZombieTrove?: undefined;
|
|
396
398
|
BprotocolLiquitySPDeposit?: undefined;
|
|
397
399
|
BprotocolLiquitySPWithdraw?: undefined;
|
|
398
400
|
LidoStake?: undefined;
|
|
@@ -638,6 +640,7 @@ export declare const actionAddresses: {
|
|
|
638
640
|
LiquityV2SPDeposit?: undefined;
|
|
639
641
|
LiquityV2SPWithdraw?: undefined;
|
|
640
642
|
LiquityV2SPClaimColl?: undefined;
|
|
643
|
+
LiquityV2AdjustZombieTrove?: undefined;
|
|
641
644
|
BprotocolLiquitySPDeposit?: undefined;
|
|
642
645
|
BprotocolLiquitySPWithdraw?: undefined;
|
|
643
646
|
LidoStake?: undefined;
|
|
@@ -870,6 +873,7 @@ export declare const actionAddresses: {
|
|
|
870
873
|
LiquityV2SPDeposit?: undefined;
|
|
871
874
|
LiquityV2SPWithdraw?: undefined;
|
|
872
875
|
LiquityV2SPClaimColl?: undefined;
|
|
876
|
+
LiquityV2AdjustZombieTrove?: undefined;
|
|
873
877
|
BprotocolLiquitySPDeposit?: undefined;
|
|
874
878
|
BprotocolLiquitySPWithdraw?: undefined;
|
|
875
879
|
LidoStake?: undefined;
|
package/esm/src/addresses.js
CHANGED
|
@@ -166,6 +166,7 @@ export const actionAddresses = {
|
|
|
166
166
|
LiquityV2SPDeposit: '0x1e533364fE613AaD64B8D46F7A096Ae0c722239D',
|
|
167
167
|
LiquityV2SPWithdraw: '0xb080DC160415Ffe1a4b80d75b0Be92EE38a0b426',
|
|
168
168
|
LiquityV2SPClaimColl: '0xD50B0295C69e3F77BE7d99e7BdeAc442F37b373b',
|
|
169
|
+
LiquityV2AdjustZombieTrove: '0xCbcbD3b3e0D704Ad26b7dCfe1BdA6e85CDd8DBf0',
|
|
169
170
|
// b.protocol
|
|
170
171
|
BprotocolLiquitySPDeposit: '0x5A0436c7559e37da8cD24B0f66C155a0a2fd6309',
|
|
171
172
|
BprotocolLiquitySPWithdraw: '0x20Ece7CB4463bB1DbA4C4fA800E321A05dfB028B',
|
package/esm/src/index.d.ts
CHANGED
|
@@ -157,6 +157,7 @@ declare const actionAddressesAllChains: {
|
|
|
157
157
|
LiquityV2SPDeposit: string;
|
|
158
158
|
LiquityV2SPWithdraw: string;
|
|
159
159
|
LiquityV2SPClaimColl: string;
|
|
160
|
+
LiquityV2AdjustZombieTrove: string;
|
|
160
161
|
BprotocolLiquitySPDeposit: string;
|
|
161
162
|
BprotocolLiquitySPWithdraw: string;
|
|
162
163
|
LidoStake: string;
|
|
@@ -404,6 +405,7 @@ declare const actionAddressesAllChains: {
|
|
|
404
405
|
LiquityV2SPDeposit?: undefined;
|
|
405
406
|
LiquityV2SPWithdraw?: undefined;
|
|
406
407
|
LiquityV2SPClaimColl?: undefined;
|
|
408
|
+
LiquityV2AdjustZombieTrove?: undefined;
|
|
407
409
|
BprotocolLiquitySPDeposit?: undefined;
|
|
408
410
|
BprotocolLiquitySPWithdraw?: undefined;
|
|
409
411
|
LidoStake?: undefined;
|
|
@@ -649,6 +651,7 @@ declare const actionAddressesAllChains: {
|
|
|
649
651
|
LiquityV2SPDeposit?: undefined;
|
|
650
652
|
LiquityV2SPWithdraw?: undefined;
|
|
651
653
|
LiquityV2SPClaimColl?: undefined;
|
|
654
|
+
LiquityV2AdjustZombieTrove?: undefined;
|
|
652
655
|
BprotocolLiquitySPDeposit?: undefined;
|
|
653
656
|
BprotocolLiquitySPWithdraw?: undefined;
|
|
654
657
|
LidoStake?: undefined;
|
|
@@ -881,6 +884,7 @@ declare const actionAddressesAllChains: {
|
|
|
881
884
|
LiquityV2SPDeposit?: undefined;
|
|
882
885
|
LiquityV2SPWithdraw?: undefined;
|
|
883
886
|
LiquityV2SPClaimColl?: undefined;
|
|
887
|
+
LiquityV2AdjustZombieTrove?: undefined;
|
|
884
888
|
BprotocolLiquitySPDeposit?: undefined;
|
|
885
889
|
BprotocolLiquitySPWithdraw?: undefined;
|
|
886
890
|
LidoStake?: undefined;
|
|
@@ -1103,6 +1107,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
1103
1107
|
LiquityV2SPDeposit: string;
|
|
1104
1108
|
LiquityV2SPWithdraw: string;
|
|
1105
1109
|
LiquityV2SPClaimColl: string;
|
|
1110
|
+
LiquityV2AdjustZombieTrove: string;
|
|
1106
1111
|
BprotocolLiquitySPDeposit: string;
|
|
1107
1112
|
BprotocolLiquitySPWithdraw: string;
|
|
1108
1113
|
LidoStake: string;
|
|
@@ -1350,6 +1355,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
1350
1355
|
LiquityV2SPDeposit?: undefined;
|
|
1351
1356
|
LiquityV2SPWithdraw?: undefined;
|
|
1352
1357
|
LiquityV2SPClaimColl?: undefined;
|
|
1358
|
+
LiquityV2AdjustZombieTrove?: undefined;
|
|
1353
1359
|
BprotocolLiquitySPDeposit?: undefined;
|
|
1354
1360
|
BprotocolLiquitySPWithdraw?: undefined;
|
|
1355
1361
|
LidoStake?: undefined;
|
|
@@ -1595,6 +1601,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
1595
1601
|
LiquityV2SPDeposit?: undefined;
|
|
1596
1602
|
LiquityV2SPWithdraw?: undefined;
|
|
1597
1603
|
LiquityV2SPClaimColl?: undefined;
|
|
1604
|
+
LiquityV2AdjustZombieTrove?: undefined;
|
|
1598
1605
|
BprotocolLiquitySPDeposit?: undefined;
|
|
1599
1606
|
BprotocolLiquitySPWithdraw?: undefined;
|
|
1600
1607
|
LidoStake?: undefined;
|
|
@@ -1827,6 +1834,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
1827
1834
|
LiquityV2SPDeposit?: undefined;
|
|
1828
1835
|
LiquityV2SPWithdraw?: undefined;
|
|
1829
1836
|
LiquityV2SPClaimColl?: undefined;
|
|
1837
|
+
LiquityV2AdjustZombieTrove?: undefined;
|
|
1830
1838
|
BprotocolLiquitySPDeposit?: undefined;
|
|
1831
1839
|
BprotocolLiquitySPWithdraw?: undefined;
|
|
1832
1840
|
LidoStake?: undefined;
|
|
@@ -2192,6 +2200,7 @@ declare const _default: {
|
|
|
2192
2200
|
LiquityV2SPDeposit: string;
|
|
2193
2201
|
LiquityV2SPWithdraw: string;
|
|
2194
2202
|
LiquityV2SPClaimColl: string;
|
|
2203
|
+
LiquityV2AdjustZombieTrove: string;
|
|
2195
2204
|
BprotocolLiquitySPDeposit: string;
|
|
2196
2205
|
BprotocolLiquitySPWithdraw: string;
|
|
2197
2206
|
LidoStake: string;
|
|
@@ -2439,6 +2448,7 @@ declare const _default: {
|
|
|
2439
2448
|
LiquityV2SPDeposit?: undefined;
|
|
2440
2449
|
LiquityV2SPWithdraw?: undefined;
|
|
2441
2450
|
LiquityV2SPClaimColl?: undefined;
|
|
2451
|
+
LiquityV2AdjustZombieTrove?: undefined;
|
|
2442
2452
|
BprotocolLiquitySPDeposit?: undefined;
|
|
2443
2453
|
BprotocolLiquitySPWithdraw?: undefined;
|
|
2444
2454
|
LidoStake?: undefined;
|
|
@@ -2684,6 +2694,7 @@ declare const _default: {
|
|
|
2684
2694
|
LiquityV2SPDeposit?: undefined;
|
|
2685
2695
|
LiquityV2SPWithdraw?: undefined;
|
|
2686
2696
|
LiquityV2SPClaimColl?: undefined;
|
|
2697
|
+
LiquityV2AdjustZombieTrove?: undefined;
|
|
2687
2698
|
BprotocolLiquitySPDeposit?: undefined;
|
|
2688
2699
|
BprotocolLiquitySPWithdraw?: undefined;
|
|
2689
2700
|
LidoStake?: undefined;
|
|
@@ -2916,6 +2927,7 @@ declare const _default: {
|
|
|
2916
2927
|
LiquityV2SPDeposit?: undefined;
|
|
2917
2928
|
LiquityV2SPWithdraw?: undefined;
|
|
2918
2929
|
LiquityV2SPClaimColl?: undefined;
|
|
2930
|
+
LiquityV2AdjustZombieTrove?: undefined;
|
|
2919
2931
|
BprotocolLiquitySPDeposit?: undefined;
|
|
2920
2932
|
BprotocolLiquitySPWithdraw?: undefined;
|
|
2921
2933
|
LidoStake?: undefined;
|
|
@@ -3138,6 +3150,7 @@ declare const _default: {
|
|
|
3138
3150
|
LiquityV2SPDeposit: string;
|
|
3139
3151
|
LiquityV2SPWithdraw: string;
|
|
3140
3152
|
LiquityV2SPClaimColl: string;
|
|
3153
|
+
LiquityV2AdjustZombieTrove: string;
|
|
3141
3154
|
BprotocolLiquitySPDeposit: string;
|
|
3142
3155
|
BprotocolLiquitySPWithdraw: string;
|
|
3143
3156
|
LidoStake: string;
|
|
@@ -3385,6 +3398,7 @@ declare const _default: {
|
|
|
3385
3398
|
LiquityV2SPDeposit?: undefined;
|
|
3386
3399
|
LiquityV2SPWithdraw?: undefined;
|
|
3387
3400
|
LiquityV2SPClaimColl?: undefined;
|
|
3401
|
+
LiquityV2AdjustZombieTrove?: undefined;
|
|
3388
3402
|
BprotocolLiquitySPDeposit?: undefined;
|
|
3389
3403
|
BprotocolLiquitySPWithdraw?: undefined;
|
|
3390
3404
|
LidoStake?: undefined;
|
|
@@ -3630,6 +3644,7 @@ declare const _default: {
|
|
|
3630
3644
|
LiquityV2SPDeposit?: undefined;
|
|
3631
3645
|
LiquityV2SPWithdraw?: undefined;
|
|
3632
3646
|
LiquityV2SPClaimColl?: undefined;
|
|
3647
|
+
LiquityV2AdjustZombieTrove?: undefined;
|
|
3633
3648
|
BprotocolLiquitySPDeposit?: undefined;
|
|
3634
3649
|
BprotocolLiquitySPWithdraw?: undefined;
|
|
3635
3650
|
LidoStake?: undefined;
|
|
@@ -3862,6 +3877,7 @@ declare const _default: {
|
|
|
3862
3877
|
LiquityV2SPDeposit?: undefined;
|
|
3863
3878
|
LiquityV2SPWithdraw?: undefined;
|
|
3864
3879
|
LiquityV2SPClaimColl?: undefined;
|
|
3880
|
+
LiquityV2AdjustZombieTrove?: undefined;
|
|
3865
3881
|
BprotocolLiquitySPDeposit?: undefined;
|
|
3866
3882
|
BprotocolLiquitySPWithdraw?: undefined;
|
|
3867
3883
|
LidoStake?: undefined;
|
|
@@ -5,6 +5,6 @@ import { EthAddress, uint256 } from '../types';
|
|
|
5
5
|
*
|
|
6
6
|
* @category Triggers
|
|
7
7
|
*/
|
|
8
|
-
export declare class
|
|
8
|
+
export declare class ClosePriceTrigger extends Action {
|
|
9
9
|
constructor(token: EthAddress, lowerPrice: uint256, upperPrice: uint256);
|
|
10
10
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from '../Action';
|
|
2
|
+
import { getAddr } from '../addresses';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* @category Triggers
|
|
7
|
+
*/
|
|
8
|
+
export class ClosePriceTrigger extends Action {
|
|
9
|
+
constructor(token, lowerPrice, upperPrice) {
|
|
10
|
+
super('ClosePriceTrigger', getAddr('Empty'), ['address', 'uint256', 'uint256'], [token, lowerPrice, upperPrice]);
|
|
11
|
+
}
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
import { EthAddress, uint256, uint8 } from '../../types';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* LiquityV2AdjustZombieTroveAction - Adjusts a trove's collateral and/or debt for a zombie trove
|
|
7
|
+
*
|
|
8
|
+
* @category LiquityV2
|
|
9
|
+
*/
|
|
10
|
+
export class LiquityV2AdjustZombieTroveAction extends Action {
|
|
11
|
+
/**
|
|
12
|
+
* @param market liquity address registry for the market
|
|
13
|
+
* @param from address from which to take the collateral or pay debt
|
|
14
|
+
* @param to address to which to send the collateral or borrowed debt
|
|
15
|
+
* @param troveId id of the trove being adjusted
|
|
16
|
+
* @param collAmount collateral amount to supply/withdraw
|
|
17
|
+
* @param debtAmount debt amount to borrow/payback
|
|
18
|
+
* @param upperHint upper hint for the trove insertion
|
|
19
|
+
* @param lowerHint lower hint for the trove insertion
|
|
20
|
+
* @param maxUpfrontFee maximum upfront fee user is willing to pay
|
|
21
|
+
* @param collAction specify if collateral is supplied or withdrawn
|
|
22
|
+
* @param debtAction specify if debt is borrowed or paid back
|
|
23
|
+
*/
|
|
24
|
+
constructor(
|
|
25
|
+
market: EthAddress,
|
|
26
|
+
from: EthAddress,
|
|
27
|
+
to: EthAddress,
|
|
28
|
+
troveId: uint256,
|
|
29
|
+
collAmount: uint256,
|
|
30
|
+
debtAmount: uint256,
|
|
31
|
+
upperHint: uint256,
|
|
32
|
+
lowerHint: uint256,
|
|
33
|
+
maxUpfrontFee: uint256,
|
|
34
|
+
collAction: uint8,
|
|
35
|
+
debtAction: uint8,
|
|
36
|
+
) {
|
|
37
|
+
super(
|
|
38
|
+
'LiquityV2AdjustZombieTrove',
|
|
39
|
+
getAddr('LiquityV2AdjustZombieTrove'),
|
|
40
|
+
[
|
|
41
|
+
'address',
|
|
42
|
+
'address',
|
|
43
|
+
'address',
|
|
44
|
+
'uint256',
|
|
45
|
+
'uint256',
|
|
46
|
+
'uint256',
|
|
47
|
+
'uint256',
|
|
48
|
+
'uint256',
|
|
49
|
+
'uint256',
|
|
50
|
+
'uint8',
|
|
51
|
+
'uint8',
|
|
52
|
+
],
|
|
53
|
+
[
|
|
54
|
+
market,
|
|
55
|
+
from,
|
|
56
|
+
to,
|
|
57
|
+
troveId,
|
|
58
|
+
collAmount,
|
|
59
|
+
debtAmount,
|
|
60
|
+
upperHint,
|
|
61
|
+
lowerHint,
|
|
62
|
+
maxUpfrontFee,
|
|
63
|
+
collAction,
|
|
64
|
+
debtAction,
|
|
65
|
+
],
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
this.mappableArgs = [
|
|
69
|
+
this.args[0],
|
|
70
|
+
this.args[1],
|
|
71
|
+
this.args[2],
|
|
72
|
+
this.args[3],
|
|
73
|
+
this.args[4],
|
|
74
|
+
this.args[5],
|
|
75
|
+
this.args[6],
|
|
76
|
+
this.args[7],
|
|
77
|
+
this.args[8],
|
|
78
|
+
this.args[9],
|
|
79
|
+
this.args[10],
|
|
80
|
+
];
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -9,4 +9,5 @@ export * from './LiquityV2SPWithdrawAction';
|
|
|
9
9
|
export * from './LiquityV2SPClaimCollAction';
|
|
10
10
|
export * from './LiquityV2AdjustAction';
|
|
11
11
|
export * from './LiquityV2ClaimAction';
|
|
12
|
-
export * from './LiquityV2AdjustInterestRateAction';
|
|
12
|
+
export * from './LiquityV2AdjustInterestRateAction';
|
|
13
|
+
export * from './LiquityV2AdjustZombieTroveAction';
|
package/src/addresses.ts
CHANGED
|
@@ -186,6 +186,7 @@ export const actionAddresses = {
|
|
|
186
186
|
LiquityV2SPDeposit: '0x1e533364fE613AaD64B8D46F7A096Ae0c722239D',
|
|
187
187
|
LiquityV2SPWithdraw: '0xb080DC160415Ffe1a4b80d75b0Be92EE38a0b426',
|
|
188
188
|
LiquityV2SPClaimColl: '0xD50B0295C69e3F77BE7d99e7BdeAc442F37b373b',
|
|
189
|
+
LiquityV2AdjustZombieTrove: '0xCbcbD3b3e0D704Ad26b7dCfe1BdA6e85CDd8DBf0',
|
|
189
190
|
|
|
190
191
|
// b.protocol
|
|
191
192
|
BprotocolLiquitySPDeposit: '0x5A0436c7559e37da8cD24B0f66C155a0a2fd6309',
|
|
@@ -7,10 +7,10 @@ import { EthAddress, uint256 } from '../types';
|
|
|
7
7
|
*
|
|
8
8
|
* @category Triggers
|
|
9
9
|
*/
|
|
10
|
-
export class
|
|
10
|
+
export class ClosePriceTrigger extends Action {
|
|
11
11
|
constructor(token:EthAddress, lowerPrice:uint256, upperPrice:uint256) {
|
|
12
12
|
super(
|
|
13
|
-
'
|
|
13
|
+
'ClosePriceTrigger',
|
|
14
14
|
getAddr('Empty'),
|
|
15
15
|
['address', 'uint256', 'uint256'],
|
|
16
16
|
[token, lowerPrice, upperPrice],
|
package/src/triggers/index.ts
CHANGED
package/umd/index.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
exports["defisaver-sdk"] = factory(require("web3-eth-abi"), require("web3-utils"), require("decimal.js"), require("@defisaver/tokens"), require("@ethersproject/solidity"), require("@ethersproject/address"), require("axios"));
|
|
8
8
|
else
|
|
9
9
|
root["defisaver-sdk"] = factory(root["web3-eth-abi"], root["web3-utils"], root["decimal.js"], root["@defisaver/tokens"], root["@ethersproject/solidity"], root["@ethersproject/address"], root["axios"]);
|
|
10
|
-
})(this, (__WEBPACK_EXTERNAL_MODULE__2__, __WEBPACK_EXTERNAL_MODULE__3__, __WEBPACK_EXTERNAL_MODULE__5__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__135__, __WEBPACK_EXTERNAL_MODULE__136__,
|
|
10
|
+
})(this, (__WEBPACK_EXTERNAL_MODULE__2__, __WEBPACK_EXTERNAL_MODULE__3__, __WEBPACK_EXTERNAL_MODULE__5__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__135__, __WEBPACK_EXTERNAL_MODULE__136__, __WEBPACK_EXTERNAL_MODULE__377__) => {
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
|
12
12
|
/******/ "use strict";
|
|
13
13
|
/******/ var __webpack_modules__ = ([
|
|
@@ -1455,6 +1455,7 @@ var actionAddresses = {
|
|
|
1455
1455
|
LiquityV2SPDeposit: '0x1e533364fE613AaD64B8D46F7A096Ae0c722239D',
|
|
1456
1456
|
LiquityV2SPWithdraw: '0xb080DC160415Ffe1a4b80d75b0Be92EE38a0b426',
|
|
1457
1457
|
LiquityV2SPClaimColl: '0xD50B0295C69e3F77BE7d99e7BdeAc442F37b373b',
|
|
1458
|
+
LiquityV2AdjustZombieTrove: '0xCbcbD3b3e0D704Ad26b7dCfe1BdA6e85CDd8DBf0',
|
|
1458
1459
|
// b.protocol
|
|
1459
1460
|
BprotocolLiquitySPDeposit: '0x5A0436c7559e37da8cD24B0f66C155a0a2fd6309',
|
|
1460
1461
|
BprotocolLiquitySPWithdraw: '0x20Ece7CB4463bB1DbA4C4fA800E321A05dfB028B',
|
|
@@ -13544,6 +13545,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13544
13545
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13545
13546
|
/* harmony export */ LiquityV2AdjustAction: () => (/* reexport safe */ _LiquityV2AdjustAction__WEBPACK_IMPORTED_MODULE_9__.LiquityV2AdjustAction),
|
|
13546
13547
|
/* harmony export */ LiquityV2AdjustInterestRateAction: () => (/* reexport safe */ _LiquityV2AdjustInterestRateAction__WEBPACK_IMPORTED_MODULE_11__.LiquityV2AdjustInterestRateAction),
|
|
13548
|
+
/* harmony export */ LiquityV2AdjustZombieTroveAction: () => (/* reexport safe */ _LiquityV2AdjustZombieTroveAction__WEBPACK_IMPORTED_MODULE_12__.LiquityV2AdjustZombieTroveAction),
|
|
13547
13549
|
/* harmony export */ LiquityV2BorrowAction: () => (/* reexport safe */ _LiquityV2BorrowAction__WEBPACK_IMPORTED_MODULE_2__.LiquityV2BorrowAction),
|
|
13548
13550
|
/* harmony export */ LiquityV2ClaimAction: () => (/* reexport safe */ _LiquityV2ClaimAction__WEBPACK_IMPORTED_MODULE_10__.LiquityV2ClaimAction),
|
|
13549
13551
|
/* harmony export */ LiquityV2CloseAction: () => (/* reexport safe */ _LiquityV2CloseAction__WEBPACK_IMPORTED_MODULE_1__.LiquityV2CloseAction),
|
|
@@ -13567,6 +13569,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13567
13569
|
/* harmony import */ var _LiquityV2AdjustAction__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(346);
|
|
13568
13570
|
/* harmony import */ var _LiquityV2ClaimAction__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(347);
|
|
13569
13571
|
/* harmony import */ var _LiquityV2AdjustInterestRateAction__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(348);
|
|
13572
|
+
/* harmony import */ var _LiquityV2AdjustZombieTroveAction__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(349);
|
|
13573
|
+
|
|
13570
13574
|
|
|
13571
13575
|
|
|
13572
13576
|
|
|
@@ -14047,6 +14051,43 @@ class LiquityV2AdjustInterestRateAction extends _Action__WEBPACK_IMPORTED_MODULE
|
|
|
14047
14051
|
/* 349 */
|
|
14048
14052
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14049
14053
|
|
|
14054
|
+
__webpack_require__.r(__webpack_exports__);
|
|
14055
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14056
|
+
/* harmony export */ LiquityV2AdjustZombieTroveAction: () => (/* binding */ LiquityV2AdjustZombieTroveAction)
|
|
14057
|
+
/* harmony export */ });
|
|
14058
|
+
/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
|
|
14059
|
+
/* harmony import */ var _addresses__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27);
|
|
14060
|
+
|
|
14061
|
+
|
|
14062
|
+
/**
|
|
14063
|
+
* LiquityV2AdjustZombieTroveAction - Adjusts a trove's collateral and/or debt for a zombie trove
|
|
14064
|
+
*
|
|
14065
|
+
* @category LiquityV2
|
|
14066
|
+
*/
|
|
14067
|
+
class LiquityV2AdjustZombieTroveAction extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
|
|
14068
|
+
/**
|
|
14069
|
+
* @param market liquity address registry for the market
|
|
14070
|
+
* @param from address from which to take the collateral or pay debt
|
|
14071
|
+
* @param to address to which to send the collateral or borrowed debt
|
|
14072
|
+
* @param troveId id of the trove being adjusted
|
|
14073
|
+
* @param collAmount collateral amount to supply/withdraw
|
|
14074
|
+
* @param debtAmount debt amount to borrow/payback
|
|
14075
|
+
* @param upperHint upper hint for the trove insertion
|
|
14076
|
+
* @param lowerHint lower hint for the trove insertion
|
|
14077
|
+
* @param maxUpfrontFee maximum upfront fee user is willing to pay
|
|
14078
|
+
* @param collAction specify if collateral is supplied or withdrawn
|
|
14079
|
+
* @param debtAction specify if debt is borrowed or paid back
|
|
14080
|
+
*/
|
|
14081
|
+
constructor(market, from, to, troveId, collAmount, debtAmount, upperHint, lowerHint, maxUpfrontFee, collAction, debtAction) {
|
|
14082
|
+
super('LiquityV2AdjustZombieTrove', (0,_addresses__WEBPACK_IMPORTED_MODULE_1__.getAddr)('LiquityV2AdjustZombieTrove'), ['address', 'address', 'address', 'uint256', 'uint256', 'uint256', 'uint256', 'uint256', 'uint256', 'uint8', 'uint8'], [market, from, to, troveId, collAmount, debtAmount, upperHint, lowerHint, maxUpfrontFee, collAction, debtAction]);
|
|
14083
|
+
this.mappableArgs = [this.args[0], this.args[1], this.args[2], this.args[3], this.args[4], this.args[5], this.args[6], this.args[7], this.args[8], this.args[9], this.args[10]];
|
|
14084
|
+
}
|
|
14085
|
+
}
|
|
14086
|
+
|
|
14087
|
+
/***/ }),
|
|
14088
|
+
/* 350 */
|
|
14089
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14090
|
+
|
|
14050
14091
|
__webpack_require__.r(__webpack_exports__);
|
|
14051
14092
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14052
14093
|
/* harmony export */ AaveV2RatioTrigger: () => (/* reexport safe */ _AaveV2RatioTrigger__WEBPACK_IMPORTED_MODULE_13__.AaveV2RatioTrigger),
|
|
@@ -14054,6 +14095,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14054
14095
|
/* harmony export */ AaveV3RatioTrigger: () => (/* reexport safe */ _AaveV3RatioTrigger__WEBPACK_IMPORTED_MODULE_8__.AaveV3RatioTrigger),
|
|
14055
14096
|
/* harmony export */ CBRebondTrigger: () => (/* reexport safe */ _CBRebondTrigger__WEBPACK_IMPORTED_MODULE_11__.CBRebondTrigger),
|
|
14056
14097
|
/* harmony export */ ChainLinkPriceTrigger: () => (/* reexport safe */ _ChainLinkPriceTrigger__WEBPACK_IMPORTED_MODULE_1__.ChainLinkPriceTrigger),
|
|
14098
|
+
/* harmony export */ ClosePriceTrigger: () => (/* reexport safe */ _ClosePriceTrigger__WEBPACK_IMPORTED_MODULE_23__.ClosePriceTrigger),
|
|
14057
14099
|
/* harmony export */ CompV3RatioTrigger: () => (/* reexport safe */ _CompV3RatioTrigger__WEBPACK_IMPORTED_MODULE_9__.CompV3RatioTrigger),
|
|
14058
14100
|
/* harmony export */ CompoundRatioTrigger: () => (/* reexport safe */ _CompoundRatioTrigger__WEBPACK_IMPORTED_MODULE_5__.CompoundRatioTrigger),
|
|
14059
14101
|
/* harmony export */ CurveUsdCollRatioTrigger: () => (/* reexport safe */ _CurveUsdCollRatioTrigger__WEBPACK_IMPORTED_MODULE_18__.CurveUsdCollRatioTrigger),
|
|
@@ -14067,37 +14109,36 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14067
14109
|
/* harmony export */ MorphoBlueRatioTrigger: () => (/* reexport safe */ _MorphoBlueRatioTrigger__WEBPACK_IMPORTED_MODULE_20__.MorphoBlueRatioTrigger),
|
|
14068
14110
|
/* harmony export */ OffchainPriceTrigger: () => (/* reexport safe */ _OffchainPriceTrigger__WEBPACK_IMPORTED_MODULE_21__.OffchainPriceTrigger),
|
|
14069
14111
|
/* harmony export */ ReflexerRatioTrigger: () => (/* reexport safe */ _ReflexerRatioTrigger__WEBPACK_IMPORTED_MODULE_6__.ReflexerRatioTrigger),
|
|
14070
|
-
/* harmony export */ ShouldClosePriceTrigger: () => (/* reexport safe */ _ShouldClosePriceTrigger__WEBPACK_IMPORTED_MODULE_23__.ShouldClosePriceTrigger),
|
|
14071
14112
|
/* harmony export */ SparkQuotePriceTrigger: () => (/* reexport safe */ _SparkQuotePriceTrigger__WEBPACK_IMPORTED_MODULE_16__.SparkQuotePriceTrigger),
|
|
14072
14113
|
/* harmony export */ SparkRatioTrigger: () => (/* reexport safe */ _SparkRatioTrigger__WEBPACK_IMPORTED_MODULE_15__.SparkRatioTrigger),
|
|
14073
14114
|
/* harmony export */ TimestampTrigger: () => (/* reexport safe */ _TimestampTrigger__WEBPACK_IMPORTED_MODULE_3__.TimestampTrigger),
|
|
14074
14115
|
/* harmony export */ TrailingStopTrigger: () => (/* reexport safe */ _TrailingStopTrigger__WEBPACK_IMPORTED_MODULE_10__.TrailingStopTrigger),
|
|
14075
14116
|
/* harmony export */ UniV3CurrentTickTrigger: () => (/* reexport safe */ _UniV3CurrentTickTrigger__WEBPACK_IMPORTED_MODULE_2__.UniV3CurrentTickTrigger)
|
|
14076
14117
|
/* harmony export */ });
|
|
14077
|
-
/* harmony import */ var _MakerRatioTrigger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
14078
|
-
/* harmony import */ var _ChainLinkPriceTrigger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
14079
|
-
/* harmony import */ var _UniV3CurrentTickTrigger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
14080
|
-
/* harmony import */ var _TimestampTrigger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
14081
|
-
/* harmony import */ var _GasPriceTrigger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
14082
|
-
/* harmony import */ var _CompoundRatioTrigger__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
14083
|
-
/* harmony import */ var _ReflexerRatioTrigger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
14084
|
-
/* harmony import */ var _LiquityRatioTrigger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
|
14085
|
-
/* harmony import */ var _AaveV3RatioTrigger__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
|
|
14086
|
-
/* harmony import */ var _CompV3RatioTrigger__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
|
|
14087
|
-
/* harmony import */ var _TrailingStopTrigger__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
|
|
14088
|
-
/* harmony import */ var _CBRebondTrigger__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
|
|
14089
|
-
/* harmony import */ var _AaveV3QuotePriceTrigger__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(
|
|
14090
|
-
/* harmony import */ var _AaveV2RatioTrigger__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(
|
|
14091
|
-
/* harmony import */ var _MorphoAaveV2RatioTrigger__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(
|
|
14092
|
-
/* harmony import */ var _SparkRatioTrigger__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(
|
|
14093
|
-
/* harmony import */ var _SparkQuotePriceTrigger__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(
|
|
14094
|
-
/* harmony import */ var _LiquityDebtInFrontWithLimitTrigger__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(
|
|
14095
|
-
/* harmony import */ var _CurveUsdCollRatioTrigger__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(
|
|
14096
|
-
/* harmony import */ var _CurveUsdHealthRatioTrigger__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(
|
|
14097
|
-
/* harmony import */ var _MorphoBlueRatioTrigger__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(
|
|
14098
|
-
/* harmony import */ var _OffchainPriceTrigger__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(
|
|
14099
|
-
/* harmony import */ var _LiquityV2RatioTrigger__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(
|
|
14100
|
-
/* harmony import */ var
|
|
14118
|
+
/* harmony import */ var _MakerRatioTrigger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(351);
|
|
14119
|
+
/* harmony import */ var _ChainLinkPriceTrigger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(352);
|
|
14120
|
+
/* harmony import */ var _UniV3CurrentTickTrigger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(353);
|
|
14121
|
+
/* harmony import */ var _TimestampTrigger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(354);
|
|
14122
|
+
/* harmony import */ var _GasPriceTrigger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(355);
|
|
14123
|
+
/* harmony import */ var _CompoundRatioTrigger__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(356);
|
|
14124
|
+
/* harmony import */ var _ReflexerRatioTrigger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(357);
|
|
14125
|
+
/* harmony import */ var _LiquityRatioTrigger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(358);
|
|
14126
|
+
/* harmony import */ var _AaveV3RatioTrigger__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(359);
|
|
14127
|
+
/* harmony import */ var _CompV3RatioTrigger__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(360);
|
|
14128
|
+
/* harmony import */ var _TrailingStopTrigger__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(361);
|
|
14129
|
+
/* harmony import */ var _CBRebondTrigger__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(362);
|
|
14130
|
+
/* harmony import */ var _AaveV3QuotePriceTrigger__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(363);
|
|
14131
|
+
/* harmony import */ var _AaveV2RatioTrigger__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(364);
|
|
14132
|
+
/* harmony import */ var _MorphoAaveV2RatioTrigger__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(365);
|
|
14133
|
+
/* harmony import */ var _SparkRatioTrigger__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(366);
|
|
14134
|
+
/* harmony import */ var _SparkQuotePriceTrigger__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(367);
|
|
14135
|
+
/* harmony import */ var _LiquityDebtInFrontWithLimitTrigger__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(368);
|
|
14136
|
+
/* harmony import */ var _CurveUsdCollRatioTrigger__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(369);
|
|
14137
|
+
/* harmony import */ var _CurveUsdHealthRatioTrigger__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(370);
|
|
14138
|
+
/* harmony import */ var _MorphoBlueRatioTrigger__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(371);
|
|
14139
|
+
/* harmony import */ var _OffchainPriceTrigger__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(372);
|
|
14140
|
+
/* harmony import */ var _LiquityV2RatioTrigger__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(373);
|
|
14141
|
+
/* harmony import */ var _ClosePriceTrigger__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(374);
|
|
14101
14142
|
|
|
14102
14143
|
|
|
14103
14144
|
|
|
@@ -14124,7 +14165,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14124
14165
|
|
|
14125
14166
|
|
|
14126
14167
|
/***/ }),
|
|
14127
|
-
/*
|
|
14168
|
+
/* 351 */
|
|
14128
14169
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14129
14170
|
|
|
14130
14171
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14147,7 +14188,7 @@ class MakerRatioTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
|
|
|
14147
14188
|
}
|
|
14148
14189
|
|
|
14149
14190
|
/***/ }),
|
|
14150
|
-
/*
|
|
14191
|
+
/* 352 */
|
|
14151
14192
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14152
14193
|
|
|
14153
14194
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14170,7 +14211,7 @@ class ChainLinkPriceTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action
|
|
|
14170
14211
|
}
|
|
14171
14212
|
|
|
14172
14213
|
/***/ }),
|
|
14173
|
-
/*
|
|
14214
|
+
/* 353 */
|
|
14174
14215
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14175
14216
|
|
|
14176
14217
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14193,7 +14234,7 @@ class UniV3CurrentTickTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Actio
|
|
|
14193
14234
|
}
|
|
14194
14235
|
|
|
14195
14236
|
/***/ }),
|
|
14196
|
-
/*
|
|
14237
|
+
/* 354 */
|
|
14197
14238
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14198
14239
|
|
|
14199
14240
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14216,7 +14257,7 @@ class TimestampTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
|
|
|
14216
14257
|
}
|
|
14217
14258
|
|
|
14218
14259
|
/***/ }),
|
|
14219
|
-
/*
|
|
14260
|
+
/* 355 */
|
|
14220
14261
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14221
14262
|
|
|
14222
14263
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14239,7 +14280,7 @@ class GasPriceTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
|
|
|
14239
14280
|
}
|
|
14240
14281
|
|
|
14241
14282
|
/***/ }),
|
|
14242
|
-
/*
|
|
14283
|
+
/* 356 */
|
|
14243
14284
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14244
14285
|
|
|
14245
14286
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14262,7 +14303,7 @@ class CompoundRatioTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
|
|
|
14262
14303
|
}
|
|
14263
14304
|
|
|
14264
14305
|
/***/ }),
|
|
14265
|
-
/*
|
|
14306
|
+
/* 357 */
|
|
14266
14307
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14267
14308
|
|
|
14268
14309
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14285,7 +14326,7 @@ class ReflexerRatioTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
|
|
|
14285
14326
|
}
|
|
14286
14327
|
|
|
14287
14328
|
/***/ }),
|
|
14288
|
-
/*
|
|
14329
|
+
/* 358 */
|
|
14289
14330
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14290
14331
|
|
|
14291
14332
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14308,7 +14349,7 @@ class LiquityRatioTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
|
|
|
14308
14349
|
}
|
|
14309
14350
|
|
|
14310
14351
|
/***/ }),
|
|
14311
|
-
/*
|
|
14352
|
+
/* 359 */
|
|
14312
14353
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14313
14354
|
|
|
14314
14355
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14331,7 +14372,7 @@ class AaveV3RatioTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
|
|
|
14331
14372
|
}
|
|
14332
14373
|
|
|
14333
14374
|
/***/ }),
|
|
14334
|
-
/*
|
|
14375
|
+
/* 360 */
|
|
14335
14376
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14336
14377
|
|
|
14337
14378
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14354,7 +14395,7 @@ class CompV3RatioTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
|
|
|
14354
14395
|
}
|
|
14355
14396
|
|
|
14356
14397
|
/***/ }),
|
|
14357
|
-
/*
|
|
14398
|
+
/* 361 */
|
|
14358
14399
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14359
14400
|
|
|
14360
14401
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14377,7 +14418,7 @@ class TrailingStopTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
|
|
|
14377
14418
|
}
|
|
14378
14419
|
|
|
14379
14420
|
/***/ }),
|
|
14380
|
-
/*
|
|
14421
|
+
/* 362 */
|
|
14381
14422
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14382
14423
|
|
|
14383
14424
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14400,7 +14441,7 @@ class CBRebondTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
|
|
|
14400
14441
|
}
|
|
14401
14442
|
|
|
14402
14443
|
/***/ }),
|
|
14403
|
-
/*
|
|
14444
|
+
/* 363 */
|
|
14404
14445
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14405
14446
|
|
|
14406
14447
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14423,7 +14464,7 @@ class AaveV3QuotePriceTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Actio
|
|
|
14423
14464
|
}
|
|
14424
14465
|
|
|
14425
14466
|
/***/ }),
|
|
14426
|
-
/*
|
|
14467
|
+
/* 364 */
|
|
14427
14468
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14428
14469
|
|
|
14429
14470
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14446,7 +14487,7 @@ class AaveV2RatioTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
|
|
|
14446
14487
|
}
|
|
14447
14488
|
|
|
14448
14489
|
/***/ }),
|
|
14449
|
-
/*
|
|
14490
|
+
/* 365 */
|
|
14450
14491
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14451
14492
|
|
|
14452
14493
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14469,7 +14510,7 @@ class MorphoAaveV2RatioTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Acti
|
|
|
14469
14510
|
}
|
|
14470
14511
|
|
|
14471
14512
|
/***/ }),
|
|
14472
|
-
/*
|
|
14513
|
+
/* 366 */
|
|
14473
14514
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14474
14515
|
|
|
14475
14516
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14492,7 +14533,7 @@ class SparkRatioTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
|
|
|
14492
14533
|
}
|
|
14493
14534
|
|
|
14494
14535
|
/***/ }),
|
|
14495
|
-
/*
|
|
14536
|
+
/* 367 */
|
|
14496
14537
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14497
14538
|
|
|
14498
14539
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14515,7 +14556,7 @@ class SparkQuotePriceTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action
|
|
|
14515
14556
|
}
|
|
14516
14557
|
|
|
14517
14558
|
/***/ }),
|
|
14518
|
-
/*
|
|
14559
|
+
/* 368 */
|
|
14519
14560
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14520
14561
|
|
|
14521
14562
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14538,7 +14579,7 @@ class LiquityDebtInFrontWithLimitTrigger extends _Action__WEBPACK_IMPORTED_MODUL
|
|
|
14538
14579
|
}
|
|
14539
14580
|
|
|
14540
14581
|
/***/ }),
|
|
14541
|
-
/*
|
|
14582
|
+
/* 369 */
|
|
14542
14583
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14543
14584
|
|
|
14544
14585
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14561,7 +14602,7 @@ class CurveUsdCollRatioTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Acti
|
|
|
14561
14602
|
}
|
|
14562
14603
|
|
|
14563
14604
|
/***/ }),
|
|
14564
|
-
/*
|
|
14605
|
+
/* 370 */
|
|
14565
14606
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14566
14607
|
|
|
14567
14608
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14584,7 +14625,7 @@ class CurveUsdHealthRatioTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Ac
|
|
|
14584
14625
|
}
|
|
14585
14626
|
|
|
14586
14627
|
/***/ }),
|
|
14587
|
-
/*
|
|
14628
|
+
/* 371 */
|
|
14588
14629
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14589
14630
|
|
|
14590
14631
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14607,7 +14648,7 @@ class MorphoBlueRatioTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action
|
|
|
14607
14648
|
}
|
|
14608
14649
|
|
|
14609
14650
|
/***/ }),
|
|
14610
|
-
/*
|
|
14651
|
+
/* 372 */
|
|
14611
14652
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14612
14653
|
|
|
14613
14654
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14630,7 +14671,7 @@ class OffchainPriceTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
|
|
|
14630
14671
|
}
|
|
14631
14672
|
|
|
14632
14673
|
/***/ }),
|
|
14633
|
-
/*
|
|
14674
|
+
/* 373 */
|
|
14634
14675
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14635
14676
|
|
|
14636
14677
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14651,12 +14692,12 @@ class LiquityV2RatioTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action
|
|
|
14651
14692
|
}
|
|
14652
14693
|
|
|
14653
14694
|
/***/ }),
|
|
14654
|
-
/*
|
|
14695
|
+
/* 374 */
|
|
14655
14696
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14656
14697
|
|
|
14657
14698
|
__webpack_require__.r(__webpack_exports__);
|
|
14658
14699
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14659
|
-
/* harmony export */
|
|
14700
|
+
/* harmony export */ ClosePriceTrigger: () => (/* binding */ ClosePriceTrigger)
|
|
14660
14701
|
/* harmony export */ });
|
|
14661
14702
|
/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
|
|
14662
14703
|
/* harmony import */ var _addresses__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27);
|
|
@@ -14667,14 +14708,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14667
14708
|
*
|
|
14668
14709
|
* @category Triggers
|
|
14669
14710
|
*/
|
|
14670
|
-
class
|
|
14711
|
+
class ClosePriceTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
|
|
14671
14712
|
constructor(token, lowerPrice, upperPrice) {
|
|
14672
|
-
super('
|
|
14713
|
+
super('ClosePriceTrigger', (0,_addresses__WEBPACK_IMPORTED_MODULE_1__.getAddr)('Empty'), ['address', 'uint256', 'uint256'], [token, lowerPrice, upperPrice]);
|
|
14673
14714
|
}
|
|
14674
14715
|
}
|
|
14675
14716
|
|
|
14676
14717
|
/***/ }),
|
|
14677
|
-
/*
|
|
14718
|
+
/* 375 */
|
|
14678
14719
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14679
14720
|
|
|
14680
14721
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14688,9 +14729,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14688
14729
|
/* harmony export */ uniswapV3LP: () => (/* reexport module object */ _uniswapV3LP__WEBPACK_IMPORTED_MODULE_2__),
|
|
14689
14730
|
/* harmony export */ zeroExExchange: () => (/* reexport module object */ _zeroExExchange__WEBPACK_IMPORTED_MODULE_0__)
|
|
14690
14731
|
/* harmony export */ });
|
|
14691
|
-
/* harmony import */ var _zeroExExchange__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
14732
|
+
/* harmony import */ var _zeroExExchange__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(376);
|
|
14692
14733
|
/* harmony import */ var _uniswapLP__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(134);
|
|
14693
|
-
/* harmony import */ var _uniswapV3LP__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
14734
|
+
/* harmony import */ var _uniswapV3LP__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(378);
|
|
14694
14735
|
/* harmony import */ var _convex_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(236);
|
|
14695
14736
|
/* harmony import */ var _mstableAssetPairs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(216);
|
|
14696
14737
|
/* harmony import */ var _curve_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(202);
|
|
@@ -14707,7 +14748,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14707
14748
|
|
|
14708
14749
|
|
|
14709
14750
|
/***/ }),
|
|
14710
|
-
/*
|
|
14751
|
+
/* 376 */
|
|
14711
14752
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14712
14753
|
|
|
14713
14754
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -14718,7 +14759,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14718
14759
|
/* harmony export */ });
|
|
14719
14760
|
/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
|
|
14720
14761
|
/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(decimal_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
14721
|
-
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
14762
|
+
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(377);
|
|
14722
14763
|
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_1__);
|
|
14723
14764
|
/* harmony import */ var _defisaver_tokens__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
|
|
14724
14765
|
/* harmony import */ var _defisaver_tokens__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_defisaver_tokens__WEBPACK_IMPORTED_MODULE_2__);
|
|
@@ -14920,20 +14961,20 @@ var createSellAction = /*#__PURE__*/function () {
|
|
|
14920
14961
|
}();
|
|
14921
14962
|
|
|
14922
14963
|
/***/ }),
|
|
14923
|
-
/*
|
|
14964
|
+
/* 377 */
|
|
14924
14965
|
/***/ ((module) => {
|
|
14925
14966
|
|
|
14926
|
-
module.exports =
|
|
14967
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__377__;
|
|
14927
14968
|
|
|
14928
14969
|
/***/ }),
|
|
14929
|
-
/*
|
|
14970
|
+
/* 378 */
|
|
14930
14971
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
14931
14972
|
|
|
14932
14973
|
__webpack_require__.r(__webpack_exports__);
|
|
14933
14974
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14934
14975
|
/* harmony export */ getAssetAddrByTokenId: () => (/* binding */ getAssetAddrByTokenId)
|
|
14935
14976
|
/* harmony export */ });
|
|
14936
|
-
/* harmony import */ var _abis_UniV3PositionManager_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
14977
|
+
/* harmony import */ var _abis_UniV3PositionManager_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(379);
|
|
14937
14978
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
14938
14979
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
14939
14980
|
/**
|
|
@@ -14958,7 +14999,7 @@ var getAssetAddrByTokenId = /*#__PURE__*/function () {
|
|
|
14958
14999
|
}();
|
|
14959
15000
|
|
|
14960
15001
|
/***/ }),
|
|
14961
|
-
/*
|
|
15002
|
+
/* 379 */
|
|
14962
15003
|
/***/ ((module) => {
|
|
14963
15004
|
|
|
14964
15005
|
module.exports = /*#__PURE__*/JSON.parse('[{"constant":false,"inputs":[{"name":"tokenId","type":"uint256"}],"name":"positions","outputs":[{"name":"nonce","type":"uint96"},{"name":"operator","type":"address"},{"name":"token0","type":"address"},{"name":"token1","type":"address"},{"name":"fee","type":"uint24"},{"name":"tickLower","type":"int24"},{"name":"tickUpper","type":"int24"},{"name":"liquidity","type":"uint128"},{"name":"feeGrowthInside0LastX128","type":"uint256"},{"name":"feeGrowthInside1LastX128","type":"uint256"},{"name":"tokensOwed0","type":"uint128"},{"name":"tokensOwed1","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"}]');
|
|
@@ -15062,8 +15103,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15062
15103
|
/* harmony import */ var _Strategy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29);
|
|
15063
15104
|
/* harmony import */ var _DfsWeb3__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(30);
|
|
15064
15105
|
/* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(35);
|
|
15065
|
-
/* harmony import */ var _triggers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
15066
|
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
|
15106
|
+
/* harmony import */ var _triggers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(350);
|
|
15107
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(375);
|
|
15067
15108
|
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(4);
|
|
15068
15109
|
/* harmony import */ var _addresses__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(27);
|
|
15069
15110
|
/* Export types here */
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Action } from '../Action';
|
|
2
|
-
import { getAddr } from '../addresses';
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* @category Triggers
|
|
7
|
-
*/
|
|
8
|
-
export class ShouldClosePriceTrigger extends Action {
|
|
9
|
-
constructor(token, lowerPrice, upperPrice) {
|
|
10
|
-
super('ShouldClosePriceTrigger', getAddr('Empty'), ['address', 'uint256', 'uint256'], [token, lowerPrice, upperPrice]);
|
|
11
|
-
}
|
|
12
|
-
}
|