@defisaver/sdk 0.2.0 → 0.2.2
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/package.json +1 -1
- package/src/Action.js +4 -8
- package/src/actions/aave/AaveBorrowAction.js +2 -11
- package/src/actions/aave/AaveClaimStkAaveAction.js +5 -5
- package/src/actions/aave/AaveCollateralSwitchAction.js +4 -5
- package/src/actions/aave/AavePaybackAction.js +2 -11
- package/src/actions/aave/AaveSupplyAction.js +6 -6
- package/src/actions/aave/AaveWithdrawAction.js +1 -8
- package/src/actions/balancer/BalancerV2ClaimAction.js +10 -12
- package/src/actions/balancer/BalancerV2SupplyAction.js +14 -16
- package/src/actions/balancer/BalancerV2WithdrawAction.js +15 -17
- package/src/actions/basic/AutomationV2Unsub.js +3 -3
- package/src/actions/basic/ChangeProxyOwnerAction.js +2 -4
- package/src/actions/basic/GasFeeAction.js +6 -6
- package/src/actions/basic/PullTokenAction.js +3 -9
- package/src/actions/basic/SellAction.js +5 -6
- package/src/actions/basic/SendTokenAction.js +3 -9
- package/src/actions/basic/SendTokenAndUnwrapAction.js +3 -9
- package/src/actions/basic/SubInputsAction.js +3 -8
- package/src/actions/basic/SumInputsAction.js +3 -8
- package/src/actions/basic/TokenBalanceAction.js +3 -3
- package/src/actions/basic/UnwrapEthAction.js +3 -8
- package/src/actions/basic/UpdateSubAction.js +1 -1
- package/src/actions/basic/WrapEthAction.js +1 -5
- package/src/actions/checkers/MakerRatioCheckAction.js +5 -5
- package/src/actions/compound/CompoundBorrowAction.js +1 -7
- package/src/actions/compound/CompoundClaimAction.js +3 -3
- package/src/actions/compound/CompoundCollateralSwitchAction.js +2 -4
- package/src/actions/compound/CompoundGetDebtAction.js +3 -3
- package/src/actions/compound/CompoundPaybackAction.js +1 -7
- package/src/actions/compound/CompoundSupplyAction.js +4 -4
- package/src/actions/compound/CompoundWithdrawAction.js +1 -7
- package/src/actions/curve/CurveClaimFeesAction.js +4 -4
- package/src/actions/curve/CurveDepositAction.js +7 -7
- package/src/actions/curve/CurveGaugeDepositAction.js +6 -6
- package/src/actions/curve/CurveGaugeWithdrawAction.js +4 -4
- package/src/actions/curve/CurveMintCrvAction.js +3 -3
- package/src/actions/curve/CurveStethPoolDepositAction.js +7 -7
- package/src/actions/curve/CurveStethPoolWithdrawAction.js +7 -7
- package/src/actions/curve/CurveSwapAction.js +15 -15
- package/src/actions/curve/CurveWithdrawAction.js +7 -7
- package/src/actions/dydx/DyDxWithdrawAction.js +1 -7
- package/src/actions/flashloan/AaveV2FlashLoanAction.js +2 -2
- package/src/actions/flashloan/BalancerFlashLoanAction.js +2 -2
- package/src/actions/flashloan/DyDxFlashLoanAction.js +5 -1
- package/src/actions/flashloan/MakerFlashLoanAction.js +2 -2
- package/src/actions/guni/GUniDeposit.js +9 -9
- package/src/actions/guni/GUniWithdraw.js +5 -5
- package/src/actions/insta/InstPullTokensAction.js +4 -4
- package/src/actions/lido/LidoStakeAction.js +2 -7
- package/src/actions/lido/LidoUnwrapAction.js +2 -7
- package/src/actions/lido/LidoWrapAction.js +7 -7
- package/src/actions/liquity/LiquityBorrowAction.js +5 -5
- package/src/actions/liquity/LiquityClaimAction.js +3 -3
- package/src/actions/liquity/LiquityCloseAction.js +4 -4
- package/src/actions/liquity/LiquityEthGainToTroveAction.js +3 -3
- package/src/actions/liquity/LiquityOpenAction.js +8 -8
- package/src/actions/liquity/LiquityPaybackAction.js +5 -5
- package/src/actions/liquity/LiquityRedeemAction.js +7 -7
- package/src/actions/liquity/LiquitySPDepositAction.js +7 -7
- package/src/actions/liquity/LiquitySPWithdrawAction.js +6 -6
- package/src/actions/liquity/LiquityStakeAction.js +7 -7
- package/src/actions/liquity/LiquitySupplyAction.js +5 -5
- package/src/actions/liquity/LiquityUnstakeAction.js +6 -6
- package/src/actions/liquity/LiquityWithdrawAction.js +4 -4
- package/src/actions/maker/MakerClaimAction.js +4 -4
- package/src/actions/maker/MakerGenerateAction.js +1 -8
- package/src/actions/maker/MakerGiveAction.js +4 -4
- package/src/actions/maker/MakerMergeAction.js +1 -7
- package/src/actions/maker/MakerOpenVaultAction.js +1 -6
- package/src/actions/maker/MakerPaybackAction.js +2 -9
- package/src/actions/maker/MakerRatioAction.js +1 -5
- package/src/actions/maker/MakerSupplyAction.js +1 -9
- package/src/actions/maker/MakerWithdrawAction.js +1 -9
- package/src/actions/mstable/MStableClaimAction.js +4 -4
- package/src/actions/mstable/MStableDepositAction.js +16 -16
- package/src/actions/mstable/MStableWithdrawAction.js +15 -15
- package/src/actions/rari/RariDepositAction.js +5 -5
- package/src/actions/rari/RariWithdrawAction.js +6 -6
- package/src/actions/reflexer/ReflexerGenerateAction.js +1 -7
- package/src/actions/reflexer/ReflexerNativeUniV2SaviourDepositAction.js +5 -5
- package/src/actions/reflexer/ReflexerNativeUniV2SaviourGetReservesAction.js +3 -8
- package/src/actions/reflexer/ReflexerNativeUniV2SaviourWithdrawAction.js +4 -9
- package/src/actions/reflexer/ReflexerOpenSafeAction.js +1 -5
- package/src/actions/reflexer/ReflexerPaybackAction.js +1 -7
- package/src/actions/reflexer/ReflexerSupplyAction.js +1 -8
- package/src/actions/reflexer/ReflexerWithdrawAction.js +1 -8
- package/src/actions/uniswap/UniswapSupplyAction.js +20 -22
- package/src/actions/uniswap/UniswapWithdrawAction.js +16 -18
- package/src/actions/uniswapV3/UniswapV3CollectAction.js +7 -9
- package/src/actions/uniswapV3/UniswapV3CreatePoolAction.js +20 -22
- package/src/actions/uniswapV3/UniswapV3MintAction.js +19 -21
- package/src/actions/uniswapV3/UniswapV3SupplyAction.js +17 -19
- package/src/actions/uniswapV3/UniswapV3WithdrawAction.js +12 -14
- package/src/actions/yearn/YearnSupplyAction.js +6 -6
- package/src/actions/yearn/YearnWithdrawAction.js +6 -6
- package/src/triggers/ChainLinkPriceTrigger.js +2 -2
- package/src/triggers/CompoundRatioTrigger.js +1 -1
- package/src/triggers/GasPriceTrigger.js +1 -1
- package/src/triggers/LiquityRatioTrigger.js +3 -2
- package/src/triggers/MakerRatioTrigger.js +1 -5
- package/src/triggers/ReflexerRatioTrigger.js +2 -1
- package/src/triggers/TimestampTrigger.js +1 -1
- package/src/triggers/UniV3CurrentTickTrigger.js +1 -1
- package/test/Action.js +2 -1
- package/test/accessLists/access-lists.js +1 -2
- package/test/actions/maker/MakerPaybackAction.js +2 -2
|
@@ -13,12 +13,12 @@ class CompoundSupplyAction extends Action {
|
|
|
13
13
|
* @param enableAsColl {boolean} If we need to enable asset as collateral
|
|
14
14
|
*/
|
|
15
15
|
constructor(cTokenAddr, amount, from, enableAsColl = true) {
|
|
16
|
-
super('CompSupply', getAddr('CompSupply'), [
|
|
16
|
+
super('CompSupply', getAddr('CompSupply'), ['address','uint256','address','bool'], [cTokenAddr, amount, from, enableAsColl]);
|
|
17
17
|
|
|
18
18
|
this.mappableArgs = [
|
|
19
|
-
this.args[0]
|
|
20
|
-
this.args[
|
|
21
|
-
this.args[
|
|
19
|
+
this.args[0],
|
|
20
|
+
this.args[1],
|
|
21
|
+
this.args[2],
|
|
22
22
|
];
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -13,13 +13,7 @@ class CompoundWithdrawAction extends Action {
|
|
|
13
13
|
*/
|
|
14
14
|
constructor(cTokenAddr, amount, to) {
|
|
15
15
|
requireAddress(to);
|
|
16
|
-
super('CompWithdraw', getAddr('CompWithdraw'), [
|
|
17
|
-
|
|
18
|
-
this.mappableArgs = [
|
|
19
|
-
this.args[0][0],
|
|
20
|
-
this.args[0][1],
|
|
21
|
-
this.args[0][2],
|
|
22
|
-
];
|
|
16
|
+
super('CompWithdraw', getAddr('CompWithdraw'), ['address','uint256','address'], [...arguments]);
|
|
23
17
|
}
|
|
24
18
|
}
|
|
25
19
|
|
|
@@ -18,12 +18,12 @@ class CurveClaimFeesAction extends Action {
|
|
|
18
18
|
requireAddress(receiver);
|
|
19
19
|
super('CurveClaimFeesAction',
|
|
20
20
|
getAddr('CurveClaimFeesAction'),
|
|
21
|
-
[
|
|
22
|
-
[
|
|
21
|
+
['address', 'address'],
|
|
22
|
+
[...arguments]);
|
|
23
23
|
|
|
24
24
|
this.mappableArgs = [
|
|
25
|
-
this.args[0]
|
|
26
|
-
this.args[
|
|
25
|
+
this.args[0],
|
|
26
|
+
this.args[1],
|
|
27
27
|
];
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -31,19 +31,19 @@ class CurveDepositAction extends Action {
|
|
|
31
31
|
requireAddress(receiver);
|
|
32
32
|
super('CurveDeposit',
|
|
33
33
|
getAddr('CurveDeposit'),
|
|
34
|
-
[
|
|
35
|
-
[
|
|
34
|
+
['address', 'address', 'address', 'address', 'bytes4', 'uint256', 'uint256[]', 'address[]', 'bool'],
|
|
35
|
+
[...arguments]);
|
|
36
36
|
|
|
37
37
|
this.mappableArgs = [
|
|
38
|
-
this.args[0]
|
|
39
|
-
this.args[
|
|
40
|
-
this.args[
|
|
41
|
-
...this.args[
|
|
38
|
+
this.args[0],
|
|
39
|
+
this.args[1],
|
|
40
|
+
this.args[5],
|
|
41
|
+
...this.args[6],
|
|
42
42
|
];
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
async getAssetsToApprove() {
|
|
46
|
-
return this.args[
|
|
46
|
+
return this.args[7].map(_asset => Object({ asset: _asset, owner: this.args[0] }));
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -17,19 +17,19 @@ class CurveGaugeDepositAction extends Action {
|
|
|
17
17
|
requireAddress(onBehalfOf);
|
|
18
18
|
super('CurveGaugeDeposit',
|
|
19
19
|
getAddr('CurveGaugeDeposit'),
|
|
20
|
-
[
|
|
21
|
-
[
|
|
20
|
+
['address', 'address', 'address', 'address', 'uint256'],
|
|
21
|
+
[...arguments],
|
|
22
22
|
);
|
|
23
23
|
|
|
24
24
|
this.mappableArgs = [
|
|
25
|
-
this.args[
|
|
26
|
-
this.args[
|
|
27
|
-
this.args[
|
|
25
|
+
this.args[2],
|
|
26
|
+
this.args[3],
|
|
27
|
+
this.args[4],
|
|
28
28
|
];
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
async getAssetsToApprove() {
|
|
32
|
-
return { asset: this.args[
|
|
32
|
+
return { asset: this.args[1], owner: this.args[2] };
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -14,13 +14,13 @@ class CurveGaugeWithdrawAction extends Action {
|
|
|
14
14
|
requireAddress(receiver);
|
|
15
15
|
super('CurveGaugeWithdraw',
|
|
16
16
|
getAddr('CurveGaugeWithdraw'),
|
|
17
|
-
[
|
|
18
|
-
[
|
|
17
|
+
['address', 'address', 'address', 'uint256'],
|
|
18
|
+
[...arguments],
|
|
19
19
|
);
|
|
20
20
|
|
|
21
21
|
this.mappableArgs = [
|
|
22
|
-
this.args[
|
|
23
|
-
this.args[
|
|
22
|
+
this.args[2],
|
|
23
|
+
this.args[3],
|
|
24
24
|
];
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -12,12 +12,12 @@ class CurveMintCrvAction extends Action {
|
|
|
12
12
|
requireAddress(receiver);
|
|
13
13
|
super('CurveMintCrv',
|
|
14
14
|
getAddr('CurveMintCrv'),
|
|
15
|
-
[
|
|
16
|
-
[
|
|
15
|
+
['address[8]', 'address'],
|
|
16
|
+
[...arguments],
|
|
17
17
|
);
|
|
18
18
|
|
|
19
19
|
this.mappableArgs = [
|
|
20
|
-
this.args[
|
|
20
|
+
this.args[8],
|
|
21
21
|
];
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -23,16 +23,16 @@ class CurveStethPoolDepositAction extends Action {
|
|
|
23
23
|
super(
|
|
24
24
|
'CurveStethPoolDeposit',
|
|
25
25
|
getAddr('CurveStethPoolDeposit'),
|
|
26
|
-
[
|
|
27
|
-
[
|
|
26
|
+
['address', 'address', 'uint256[2]', 'uint256'],
|
|
27
|
+
[...arguments],
|
|
28
28
|
);
|
|
29
29
|
|
|
30
30
|
this.mappableArgs = [
|
|
31
|
-
this.args[0]
|
|
32
|
-
this.args[
|
|
33
|
-
this.args[
|
|
34
|
-
this.args[
|
|
35
|
-
this.args[
|
|
31
|
+
this.args[0],
|
|
32
|
+
this.args[1],
|
|
33
|
+
this.args[2][0],
|
|
34
|
+
this.args[2][1],
|
|
35
|
+
this.args[3],
|
|
36
36
|
];
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -23,16 +23,16 @@ class CurveStethPoolWithdrawAction extends Action {
|
|
|
23
23
|
super(
|
|
24
24
|
'CurveStethPoolWithdraw',
|
|
25
25
|
getAddr('CurveStethPoolWithdraw'),
|
|
26
|
-
[
|
|
27
|
-
[
|
|
26
|
+
['address', 'address', 'uint256[2]', 'uint256'],
|
|
27
|
+
[...arguments],
|
|
28
28
|
);
|
|
29
29
|
|
|
30
30
|
this.mappableArgs = [
|
|
31
|
-
this.args[0]
|
|
32
|
-
this.args[
|
|
33
|
-
this.args[
|
|
34
|
-
this.args[
|
|
35
|
-
this.args[
|
|
31
|
+
this.args[0],
|
|
32
|
+
this.args[1],
|
|
33
|
+
this.args[2][0],
|
|
34
|
+
this.args[2][1],
|
|
35
|
+
this.args[3],
|
|
36
36
|
];
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -6,33 +6,33 @@ const { getAddr } = require('../../addresses');
|
|
|
6
6
|
class CurveSwapAction extends Action {
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
* @param {EthAddress} sender
|
|
11
|
-
* @param {EthAddress} receiver
|
|
12
|
-
* @param {EthAddress} pool
|
|
13
|
-
* @param {EthAddress} tokenA
|
|
14
|
-
* @param {EthAddress} tokenB
|
|
15
|
-
* @param {string} amount
|
|
16
|
-
* @param {string} expected
|
|
9
|
+
*
|
|
10
|
+
* @param {EthAddress} sender
|
|
11
|
+
* @param {EthAddress} receiver
|
|
12
|
+
* @param {EthAddress} pool
|
|
13
|
+
* @param {EthAddress} tokenA
|
|
14
|
+
* @param {EthAddress} tokenB
|
|
15
|
+
* @param {string} amount
|
|
16
|
+
* @param {string} expected
|
|
17
17
|
*/
|
|
18
18
|
constructor(sender, receiver, pool, tokenA, tokenB, amount, expected) {
|
|
19
19
|
requireAddress(sender);
|
|
20
20
|
requireAddress(receiver);
|
|
21
21
|
super('CurveSwap',
|
|
22
22
|
getAddr('CurveSwap'),
|
|
23
|
-
[
|
|
24
|
-
[
|
|
23
|
+
['address', 'address', 'address', 'address', 'address', 'uint256', 'uint256'],
|
|
24
|
+
[...arguments]);
|
|
25
25
|
|
|
26
26
|
this.mappableArgs = [
|
|
27
|
-
this.args[0]
|
|
28
|
-
this.args[
|
|
29
|
-
this.args[
|
|
30
|
-
this.args[
|
|
27
|
+
this.args[0],
|
|
28
|
+
this.args[1],
|
|
29
|
+
this.args[5],
|
|
30
|
+
this.args[6],
|
|
31
31
|
];
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
async getAssetsToApprove() {
|
|
35
|
-
return [{ asset: this.args[
|
|
35
|
+
return [{ asset: this.args[3], owner: this.args[0] }];
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -34,19 +34,19 @@ class CurveWithdrawAction extends Action {
|
|
|
34
34
|
requireAddress(receiver);
|
|
35
35
|
super('CurveWithdrawAction',
|
|
36
36
|
getAddr('CurveWithdrawAction'),
|
|
37
|
-
[
|
|
38
|
-
[
|
|
37
|
+
['address', 'address', 'address', 'address', 'bytes4', 'uint256', 'uint256[]', 'address[]', 'bool', 'bool'],
|
|
38
|
+
[...arguments]);
|
|
39
39
|
|
|
40
40
|
this.mappableArgs = [
|
|
41
|
-
this.args[0]
|
|
42
|
-
this.args[
|
|
43
|
-
this.args[
|
|
44
|
-
...this.args[
|
|
41
|
+
this.args[0],
|
|
42
|
+
this.args[1],
|
|
43
|
+
this.args[5],
|
|
44
|
+
...this.args[6],
|
|
45
45
|
];
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
async getAssetsToApprove() {
|
|
49
|
-
return { asset: this.args[
|
|
49
|
+
return { asset: this.args[3], owner: this.args[0] };
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -13,13 +13,7 @@ class DyDxWithdrawAction extends Action {
|
|
|
13
13
|
*/
|
|
14
14
|
constructor(tokenAddr, amount, to) {
|
|
15
15
|
requireAddress(to);
|
|
16
|
-
super('DyDxWithdraw', getAddr('DyDxWithdraw'), [
|
|
17
|
-
|
|
18
|
-
this.mappableArgs = [
|
|
19
|
-
this.args[0][0],
|
|
20
|
-
this.args[0][1],
|
|
21
|
-
this.args[0][2],
|
|
22
|
-
];
|
|
16
|
+
super('DyDxWithdraw', getAddr('DyDxWithdraw'), ['address','uint256','address'], [...arguments]);
|
|
23
17
|
}
|
|
24
18
|
}
|
|
25
19
|
|
|
@@ -17,8 +17,8 @@ class AaveV2FlashLoanAction extends Action {
|
|
|
17
17
|
super(
|
|
18
18
|
'FLAaveV2',
|
|
19
19
|
getAddr('FLAaveV2'),
|
|
20
|
-
[
|
|
21
|
-
[
|
|
20
|
+
['address[]','uint256[]', 'uint256[]', 'address', 'address', 'bytes', 'bytes'],
|
|
21
|
+
[tokens, loanAmounts, modes, loanPayer, flParamGetterAddr, flParamGetterData, []]
|
|
22
22
|
);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -15,8 +15,8 @@ class BalancerFlashLoanAction extends Action {
|
|
|
15
15
|
super(
|
|
16
16
|
'FLBalancer',
|
|
17
17
|
getAddr('FLBalancer'),
|
|
18
|
-
[
|
|
19
|
-
[
|
|
18
|
+
['address[]','uint256[]', 'uint256[]', 'address', 'address', 'bytes', 'bytes'],
|
|
19
|
+
[tokens, amounts, [], getAddr('Empty'), flParamGetterAddr, flParamGetterData, []]
|
|
20
20
|
);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -12,7 +12,11 @@ class DyDxFlashLoanAction extends Action {
|
|
|
12
12
|
* @param flParamGetterData {bytes}
|
|
13
13
|
*/
|
|
14
14
|
constructor(loanAmount, tokenAddr, flParamGetterAddr = getAddr('Empty'), flParamGetterData= []) {
|
|
15
|
-
super('FLDyDx',
|
|
15
|
+
super('FLDyDx',
|
|
16
|
+
getAddr('FLDyDx'),
|
|
17
|
+
['address[]','uint256[]', 'uint256[]', 'address', 'address', 'bytes', 'bytes'],
|
|
18
|
+
[[tokenAddr], [loanAmount], [], getAddr('Empty'),flParamGetterAddr, flParamGetterData, []],
|
|
19
|
+
);
|
|
16
20
|
}
|
|
17
21
|
}
|
|
18
22
|
|
|
@@ -14,8 +14,8 @@ class MakerFlashLoanAction extends Action {
|
|
|
14
14
|
super(
|
|
15
15
|
'FLMaker',
|
|
16
16
|
getAddr('FLMaker'),
|
|
17
|
-
[
|
|
18
|
-
[[
|
|
17
|
+
['address[]','uint256[]', 'uint256[]', 'address', 'address', 'bytes', 'bytes'],
|
|
18
|
+
[[], [amount], [], getAddr('Empty'), flParamGetterAddr, flParamGetterData, []]
|
|
19
19
|
);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -19,25 +19,25 @@ class GUniDeposit extends Action {
|
|
|
19
19
|
super(
|
|
20
20
|
'GUniDeposit',
|
|
21
21
|
getAddr('GUniDeposit'),
|
|
22
|
-
[
|
|
23
|
-
[
|
|
22
|
+
['address', 'address', 'address', 'uint256', 'uint256', 'uint256', 'uint256', 'address', 'address'],
|
|
23
|
+
[pool, token0, token1, amount0Max, amount1max, amount0Min, amount1Min, to, from]
|
|
24
24
|
);
|
|
25
25
|
this.mappableArgs = [
|
|
26
|
-
this.args[
|
|
27
|
-
this.args[
|
|
28
|
-
this.args[
|
|
29
|
-
this.args[
|
|
26
|
+
this.args[3],
|
|
27
|
+
this.args[4],
|
|
28
|
+
this.args[5],
|
|
29
|
+
this.args[6],
|
|
30
30
|
];
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
async getAssetsToApprove() {
|
|
34
34
|
const approveArr = [];
|
|
35
35
|
|
|
36
|
-
approveArr.push({asset: this.args[
|
|
37
|
-
approveArr.push({asset: this.args[
|
|
36
|
+
approveArr.push({asset: this.args[1], owner: this.args[8]});
|
|
37
|
+
approveArr.push({asset: this.args[2], owner: this.args[8]});
|
|
38
38
|
|
|
39
39
|
return approveArr;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
module.exports = GUniDeposit;
|
|
43
|
+
module.exports = GUniDeposit;
|
|
@@ -16,17 +16,17 @@ class GUniWithdraw extends Action {
|
|
|
16
16
|
super(
|
|
17
17
|
'GUniWithdraw',
|
|
18
18
|
getAddr('GUniWithdraw'),
|
|
19
|
-
[
|
|
20
|
-
[
|
|
19
|
+
['address', 'uint256', 'uint256', 'uint256', 'address', 'address'],
|
|
20
|
+
[pool, burnAmount, amount0Min, amount1Min, to, from]
|
|
21
21
|
);
|
|
22
22
|
this.mappableArgs = [
|
|
23
|
-
this.args[
|
|
23
|
+
this.args[1],
|
|
24
24
|
];
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
async getAssetsToApprove() {
|
|
28
|
-
return [{asset: this.args[0]
|
|
28
|
+
return [{asset: this.args[0], owner: this.args[5]}];
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
module.exports = GUniWithdraw;
|
|
32
|
+
module.exports = GUniWithdraw;
|
|
@@ -7,16 +7,16 @@ class InstPullTokensAction extends Action {
|
|
|
7
7
|
super(
|
|
8
8
|
"InstPullTokens",
|
|
9
9
|
getAddr("InstPullTokens"),
|
|
10
|
-
[
|
|
11
|
-
[
|
|
10
|
+
["address", "address[]", "uint256[]", "address"],
|
|
11
|
+
[dsaAddress, tokens, amounts, to]
|
|
12
12
|
);
|
|
13
13
|
this.mappableArgs = [];
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
async getAssetsToApprove() {
|
|
17
17
|
return [{
|
|
18
|
-
dsaAddress: this.args[0]
|
|
19
|
-
specialApproveLabel: 'Instadapp'
|
|
18
|
+
dsaAddress: this.args[0],
|
|
19
|
+
specialApproveLabel: 'Instadapp'
|
|
20
20
|
}];
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -12,16 +12,11 @@ class LidoStakeAction extends Action {
|
|
|
12
12
|
* @param to {EthAddress} stETH will be sent to this address
|
|
13
13
|
*/
|
|
14
14
|
constructor(amount, from, to) {
|
|
15
|
-
super('LidoStake', getAddr('LidoStake'), [
|
|
16
|
-
this.mappableArgs = [
|
|
17
|
-
this.args[0][0],
|
|
18
|
-
this.args[0][1],
|
|
19
|
-
this.args[0][2],
|
|
20
|
-
];
|
|
15
|
+
super('LidoStake', getAddr('LidoStake'), ['uint256','address', 'address'], [amount, from, to]);
|
|
21
16
|
}
|
|
22
17
|
|
|
23
18
|
async getAssetsToApprove() {
|
|
24
|
-
return [{asset: getAssetInfo('WETH').address, owner: this.args[
|
|
19
|
+
return [{asset: getAssetInfo('WETH').address, owner: this.args[1]}];
|
|
25
20
|
}
|
|
26
21
|
}
|
|
27
22
|
|
|
@@ -11,16 +11,11 @@ class LidoUnwrapAction extends Action {
|
|
|
11
11
|
* @param to {EthAddress} stETH will be sent to this address
|
|
12
12
|
*/
|
|
13
13
|
constructor(amount, from, to) {
|
|
14
|
-
super('LidoUnwrap', getAddr('LidoUnwrap'), [
|
|
15
|
-
this.mappableArgs = [
|
|
16
|
-
this.args[0][0],
|
|
17
|
-
this.args[0][1],
|
|
18
|
-
this.args[0][2],
|
|
19
|
-
];
|
|
14
|
+
super('LidoUnwrap', getAddr('LidoUnwrap'), ['uint256','address', 'address'], [amount, from, to]);
|
|
20
15
|
}
|
|
21
16
|
|
|
22
17
|
async getAssetsToApprove() {
|
|
23
|
-
return [{asset: '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0', owner: this.args[
|
|
18
|
+
return [{asset: '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0', owner: this.args[1]}];
|
|
24
19
|
}
|
|
25
20
|
}
|
|
26
21
|
|
|
@@ -13,19 +13,19 @@ class LidoWrapAction extends Action {
|
|
|
13
13
|
* @param useEth {boolean} true for using WETH, false for using stEth
|
|
14
14
|
*/
|
|
15
15
|
constructor(amount, from, to, useEth) {
|
|
16
|
-
super('LidoWrap', getAddr('LidoWrap'), [
|
|
16
|
+
super('LidoWrap', getAddr('LidoWrap'), ['uint256','address', 'address', 'bool'], [amount, from, to, useEth]);
|
|
17
17
|
this.mappableArgs = [
|
|
18
|
-
this.args[0]
|
|
19
|
-
this.args[
|
|
20
|
-
this.args[
|
|
18
|
+
this.args[0],
|
|
19
|
+
this.args[1],
|
|
20
|
+
this.args[2],
|
|
21
21
|
];
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
async getAssetsToApprove() {
|
|
25
|
-
if (this.args[
|
|
26
|
-
return [{asset: getAssetInfo('WETH').address, owner: this.args[
|
|
25
|
+
if (this.args[3]){
|
|
26
|
+
return [{asset: getAssetInfo('WETH').address, owner: this.args[1]}];
|
|
27
27
|
}else{
|
|
28
|
-
return [{asset: '0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84', owner: this.args[
|
|
28
|
+
return [{asset: '0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84', owner: this.args[1]}];
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -15,13 +15,13 @@ class LiquityBorrowAction extends Action {
|
|
|
15
15
|
requireAddress(to);
|
|
16
16
|
super('LiquityBorrow',
|
|
17
17
|
getAddr('LiquityBorrow'),
|
|
18
|
-
[
|
|
19
|
-
[
|
|
18
|
+
['uint256', 'uint256', 'address', 'address', 'address'],
|
|
19
|
+
[...arguments]);
|
|
20
20
|
|
|
21
21
|
this.mappableArgs = [
|
|
22
|
-
this.args[0]
|
|
23
|
-
this.args[
|
|
24
|
-
this.args[
|
|
22
|
+
this.args[0],
|
|
23
|
+
this.args[1],
|
|
24
|
+
this.args[2],
|
|
25
25
|
];
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -13,11 +13,11 @@ class LiquityClaimAction extends Action {
|
|
|
13
13
|
requireAddress(to);
|
|
14
14
|
super('LiquityClaim',
|
|
15
15
|
getAddr('LiquityClaim'),
|
|
16
|
-
[
|
|
17
|
-
[
|
|
16
|
+
['address'],
|
|
17
|
+
[...arguments]);
|
|
18
18
|
|
|
19
19
|
this.mappableArgs = [
|
|
20
|
-
this.args[0]
|
|
20
|
+
this.args[0],
|
|
21
21
|
];
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -16,12 +16,12 @@ class LiquityCloseAction extends Action {
|
|
|
16
16
|
requireAddress(to);
|
|
17
17
|
super('LiquityClose',
|
|
18
18
|
getAddr('LiquityClose'),
|
|
19
|
-
[
|
|
20
|
-
[
|
|
19
|
+
['address', 'address'],
|
|
20
|
+
[from, to]);
|
|
21
21
|
|
|
22
22
|
this.mappableArgs = [
|
|
23
|
-
this.args[0]
|
|
24
|
-
this.args[
|
|
23
|
+
this.args[0],
|
|
24
|
+
this.args[1],
|
|
25
25
|
];
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -12,11 +12,11 @@ class LiquityEthGainToTroveAction extends Action {
|
|
|
12
12
|
requireAddress(lqtyTo);
|
|
13
13
|
super('LiquityEthGainToTrove',
|
|
14
14
|
getAddr('LiquityEthGainToTrove'),
|
|
15
|
-
[
|
|
16
|
-
[
|
|
15
|
+
['address', 'address', 'address'],
|
|
16
|
+
[...arguments]);
|
|
17
17
|
|
|
18
18
|
this.mappableArgs = [
|
|
19
|
-
this.args[0]
|
|
19
|
+
this.args[0],
|
|
20
20
|
];
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -19,20 +19,20 @@ class LiquityOpenAction extends Action {
|
|
|
19
19
|
requireAddress(to);
|
|
20
20
|
super('LiquityOpen',
|
|
21
21
|
getAddr('LiquityOpen'),
|
|
22
|
-
[
|
|
23
|
-
[
|
|
22
|
+
['uint256', 'uint256', 'uint256', 'address', 'address', 'address', 'address'],
|
|
23
|
+
[...arguments]);
|
|
24
24
|
|
|
25
25
|
this.mappableArgs = [
|
|
26
|
-
this.args[0]
|
|
27
|
-
this.args[
|
|
28
|
-
this.args[
|
|
29
|
-
this.args[
|
|
30
|
-
this.args[
|
|
26
|
+
this.args[0],
|
|
27
|
+
this.args[1],
|
|
28
|
+
this.args[2],
|
|
29
|
+
this.args[3],
|
|
30
|
+
this.args[4],
|
|
31
31
|
];
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
async getAssetsToApprove() {
|
|
35
|
-
return [{ asset: getAssetInfo('WETH').address, owner: this.args[
|
|
35
|
+
return [{ asset: getAssetInfo('WETH').address, owner: this.args[3]}];
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -15,17 +15,17 @@ class LiquityPaybackAction extends Action {
|
|
|
15
15
|
requireAddress(from);
|
|
16
16
|
super('LiquityPayback',
|
|
17
17
|
getAddr('LiquityPayback'),
|
|
18
|
-
[
|
|
19
|
-
[
|
|
18
|
+
['uint256', 'address', 'address', 'address'],
|
|
19
|
+
[...arguments]);
|
|
20
20
|
|
|
21
21
|
this.mappableArgs = [
|
|
22
|
-
this.args[0]
|
|
23
|
-
this.args[
|
|
22
|
+
this.args[0],
|
|
23
|
+
this.args[1],
|
|
24
24
|
];
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
async getAssetsToApprove() {
|
|
28
|
-
return [{ asset: getAssetInfo('LUSD').address, owner: this.args[
|
|
28
|
+
return [{ asset: getAssetInfo('LUSD').address, owner: this.args[1]}];
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -28,19 +28,19 @@ class LiquityRedeemAction extends Action {
|
|
|
28
28
|
requireAddress(to);
|
|
29
29
|
super('LiquityRedeem',
|
|
30
30
|
getAddr('LiquityRedeem'),
|
|
31
|
-
[
|
|
32
|
-
[
|
|
31
|
+
['uint256', 'address', 'address', 'address', 'address', 'address', 'uint256', 'uint256', 'uint256'],
|
|
32
|
+
[...arguments]);
|
|
33
33
|
|
|
34
34
|
this.mappableArgs = [
|
|
35
|
-
this.args[0]
|
|
36
|
-
this.args[
|
|
37
|
-
this.args[
|
|
38
|
-
this.args[
|
|
35
|
+
this.args[0],
|
|
36
|
+
this.args[1],
|
|
37
|
+
this.args[2],
|
|
38
|
+
this.args[8],
|
|
39
39
|
];
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
async getAssetsToApprove() {
|
|
43
|
-
return [{ asset: getAssetInfo('LUSD').address, owner: this.args[
|
|
43
|
+
return [{ asset: getAssetInfo('LUSD').address, owner: this.args[1]}];
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|