@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
|
@@ -18,19 +18,19 @@ class LiquitySPDepositAction extends Action {
|
|
|
18
18
|
requireAddress(lqtyTo);
|
|
19
19
|
super('LiquitySPDeposit',
|
|
20
20
|
getAddr('LiquitySPDeposit'),
|
|
21
|
-
[
|
|
22
|
-
[
|
|
21
|
+
['uint256', 'address', 'address', 'address'],
|
|
22
|
+
[...arguments]);
|
|
23
23
|
|
|
24
24
|
this.mappableArgs = [
|
|
25
|
-
this.args[0]
|
|
26
|
-
this.args[
|
|
27
|
-
this.args[
|
|
28
|
-
this.args[
|
|
25
|
+
this.args[0],
|
|
26
|
+
this.args[1],
|
|
27
|
+
this.args[2],
|
|
28
|
+
this.args[3],
|
|
29
29
|
];
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
async getAssetsToApprove() {
|
|
33
|
-
return [{ asset: getAssetInfo('LUSD').address, owner: this.args[
|
|
33
|
+
return [{ asset: getAssetInfo('LUSD').address, owner: this.args[1]}];
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -18,14 +18,14 @@ class LiquitySPWithdrawAction extends Action {
|
|
|
18
18
|
requireAddress(lqtyTo);
|
|
19
19
|
super('LiquitySPWithdraw',
|
|
20
20
|
getAddr('LiquitySPWithdraw'),
|
|
21
|
-
[
|
|
22
|
-
[
|
|
21
|
+
['uint256', 'address', 'address', 'address'],
|
|
22
|
+
[...arguments]);
|
|
23
23
|
|
|
24
24
|
this.mappableArgs = [
|
|
25
|
-
this.args[0]
|
|
26
|
-
this.args[
|
|
27
|
-
this.args[
|
|
28
|
-
this.args[
|
|
25
|
+
this.args[0],
|
|
26
|
+
this.args[1],
|
|
27
|
+
this.args[2],
|
|
28
|
+
this.args[3],
|
|
29
29
|
];
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -19,19 +19,19 @@ class LiquityStakeAction extends Action {
|
|
|
19
19
|
requireAddress(lusdTo);
|
|
20
20
|
super('LiquityStake',
|
|
21
21
|
getAddr('LiquityStake'),
|
|
22
|
-
[
|
|
23
|
-
[
|
|
22
|
+
['uint256', 'address', 'address', 'address'],
|
|
23
|
+
[...arguments]);
|
|
24
24
|
|
|
25
25
|
this.mappableArgs = [
|
|
26
|
-
this.args[0]
|
|
27
|
-
this.args[
|
|
28
|
-
this.args[
|
|
29
|
-
this.args[
|
|
26
|
+
this.args[0],
|
|
27
|
+
this.args[1],
|
|
28
|
+
this.args[2],
|
|
29
|
+
this.args[3],
|
|
30
30
|
];
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
async getAssetsToApprove() {
|
|
34
|
-
return [{ asset: getAssetInfo('LQTY').address, owner: this.args[
|
|
34
|
+
return [{ asset: getAssetInfo('LQTY').address, owner: this.args[1]}];
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -15,17 +15,17 @@ class LiquitySupplyAction extends Action {
|
|
|
15
15
|
requireAddress(from);
|
|
16
16
|
super('LiquitySupply',
|
|
17
17
|
getAddr('LiquitySupply'),
|
|
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('WETH').address, owner: this.args[
|
|
28
|
+
return [{ asset: getAssetInfo('WETH').address, owner: this.args[1]}];
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -18,14 +18,14 @@ class LiquityUnstakeAction extends Action {
|
|
|
18
18
|
requireAddress(lusdTo);
|
|
19
19
|
super('LiquityUnstake',
|
|
20
20
|
getAddr('LiquityUnstake'),
|
|
21
|
-
[
|
|
22
|
-
[
|
|
21
|
+
['uint256', 'address', 'address', 'address'],
|
|
22
|
+
[...arguments]);
|
|
23
23
|
|
|
24
24
|
this.mappableArgs = [
|
|
25
|
-
this.args[0]
|
|
26
|
-
this.args[
|
|
27
|
-
this.args[
|
|
28
|
-
this.args[
|
|
25
|
+
this.args[0],
|
|
26
|
+
this.args[1],
|
|
27
|
+
this.args[2],
|
|
28
|
+
this.args[3],
|
|
29
29
|
];
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -14,12 +14,12 @@ class LiquityWithdrawAction extends Action {
|
|
|
14
14
|
requireAddress(to);
|
|
15
15
|
super('LiquityWithdraw',
|
|
16
16
|
getAddr('LiquityWithdraw'),
|
|
17
|
-
[
|
|
18
|
-
[
|
|
17
|
+
['uint256', 'address', 'address', 'address'],
|
|
18
|
+
[...arguments]);
|
|
19
19
|
|
|
20
20
|
this.mappableArgs = [
|
|
21
|
-
this.args[0]
|
|
22
|
-
this.args[
|
|
21
|
+
this.args[0],
|
|
22
|
+
this.args[1],
|
|
23
23
|
];
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -13,12 +13,12 @@ class MakerClaimAction extends Action {
|
|
|
13
13
|
* @param to {EthAddress} Tokens will be sent to this address
|
|
14
14
|
*/
|
|
15
15
|
constructor(vaultId, joinAddr, to) {
|
|
16
|
-
super('McdClaim', getAddr('McdClaim'), [
|
|
16
|
+
super('McdClaim', getAddr('McdClaim'), ['uint256','address','address'], [vaultId, joinAddr, to]);
|
|
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
|
}
|
|
@@ -14,14 +14,7 @@ class MakerGenerateAction extends Action {
|
|
|
14
14
|
*/
|
|
15
15
|
constructor(vaultId, amount, to, mcdManager = getAddr('McdCdpManager')) {
|
|
16
16
|
requireAddress(to);
|
|
17
|
-
super('McdGenerate', getAddr('McdGenerate'), [
|
|
18
|
-
|
|
19
|
-
this.mappableArgs = [
|
|
20
|
-
this.args[0][0],
|
|
21
|
-
this.args[0][1],
|
|
22
|
-
this.args[0][2],
|
|
23
|
-
this.args[0][3],
|
|
24
|
-
];
|
|
17
|
+
super('McdGenerate', getAddr('McdGenerate'), ['uint256','uint256','address','address'], [vaultId, amount, to, mcdManager]);
|
|
25
18
|
}
|
|
26
19
|
}
|
|
27
20
|
|
|
@@ -15,12 +15,12 @@ class MakerGiveAction extends Action {
|
|
|
15
15
|
*/
|
|
16
16
|
constructor(vaultId, newOwner, createProxy, mcdManager= getAddr('McdCdpManager')) {
|
|
17
17
|
requireAddress(newOwner);
|
|
18
|
-
super('McdGive', getAddr('McdGive'), [
|
|
18
|
+
super('McdGive', getAddr('McdGive'), ["uint256", "address", "bool", "address"], [vaultId, newOwner, createProxy, mcdManager]);
|
|
19
19
|
|
|
20
20
|
this.mappableArgs = [
|
|
21
|
-
this.args[0]
|
|
22
|
-
this.args[
|
|
23
|
-
this.args[
|
|
21
|
+
this.args[0],
|
|
22
|
+
this.args[1],
|
|
23
|
+
this.args[2],
|
|
24
24
|
];
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -12,13 +12,7 @@ class MakerMergeAction extends Action {
|
|
|
12
12
|
* @param mcdManager {EthAddress}
|
|
13
13
|
*/
|
|
14
14
|
constructor(srcVaultId, destVaultId, mcdManager = getAddr('McdCdpManager')) {
|
|
15
|
-
super('McdMerge', getAddr('McdMerge'), [
|
|
16
|
-
|
|
17
|
-
this.mappableArgs = [
|
|
18
|
-
this.args[0][0],
|
|
19
|
-
this.args[0][1],
|
|
20
|
-
this.args[0][2],
|
|
21
|
-
];
|
|
15
|
+
super('McdMerge', getAddr('McdMerge'), ['uint256','uint256','address'], [srcVaultId, destVaultId, mcdManager]);
|
|
22
16
|
}
|
|
23
17
|
}
|
|
24
18
|
|
|
@@ -10,12 +10,7 @@ class MakerOpenVaultAction extends Action {
|
|
|
10
10
|
* @param mcdManager {EthAddress}
|
|
11
11
|
*/
|
|
12
12
|
constructor(joinAddr, mcdManager = getAddr('McdCdpManager')) {
|
|
13
|
-
super('McdOpen', getAddr('McdOpen'), [
|
|
14
|
-
|
|
15
|
-
this.mappableArgs = [
|
|
16
|
-
this.args[0][0],
|
|
17
|
-
this.args[0][1],
|
|
18
|
-
];
|
|
13
|
+
super('McdOpen', getAddr('McdOpen'), ['address','address'], [joinAddr, mcdManager]);
|
|
19
14
|
}
|
|
20
15
|
}
|
|
21
16
|
|
|
@@ -14,18 +14,11 @@ class MakerPaybackAction extends Action {
|
|
|
14
14
|
* @param mcdManager {EthAddress}
|
|
15
15
|
*/
|
|
16
16
|
constructor(vaultId, amount, from, mcdManager = getAddr('McdCdpManager')) {
|
|
17
|
-
super('McdPayback', getAddr('McdPayback'), [
|
|
18
|
-
|
|
19
|
-
this.mappableArgs = [
|
|
20
|
-
this.args[0][0],
|
|
21
|
-
this.args[0][1],
|
|
22
|
-
this.args[0][2],
|
|
23
|
-
this.args[0][3],
|
|
24
|
-
];
|
|
17
|
+
super('McdPayback', getAddr('McdPayback'), ['uint256','uint256','address','address'], [vaultId, amount, from, mcdManager]);
|
|
25
18
|
}
|
|
26
19
|
|
|
27
20
|
async getAssetsToApprove() {
|
|
28
|
-
return [{asset: getAssetInfo('DAI').address, owner: this.args[
|
|
21
|
+
return [{asset: getAssetInfo('DAI').address, owner: this.args[2]}];
|
|
29
22
|
}
|
|
30
23
|
}
|
|
31
24
|
|
|
@@ -9,11 +9,7 @@ class MakerRatioAction extends Action {
|
|
|
9
9
|
* @param vaultId {uint256}
|
|
10
10
|
*/
|
|
11
11
|
constructor(vaultId) {
|
|
12
|
-
super('McdRatio', getAddr('McdRatio'), [
|
|
13
|
-
|
|
14
|
-
this.mappableArgs = [
|
|
15
|
-
this.args[0][0],
|
|
16
|
-
];
|
|
12
|
+
super('McdRatio', getAddr('McdRatio'), ['uint256'], [vaultId]);
|
|
17
13
|
}
|
|
18
14
|
}
|
|
19
15
|
|
|
@@ -15,15 +15,7 @@ class MakerSupplyAction extends Action {
|
|
|
15
15
|
* @param mcdManager {EthAddress}
|
|
16
16
|
*/
|
|
17
17
|
constructor(vaultId, amount, joinAddr, from, mcdManager = getAddr('McdCdpManager')) {
|
|
18
|
-
super('McdSupply', getAddr('McdSupply'), [
|
|
19
|
-
|
|
20
|
-
this.mappableArgs = [
|
|
21
|
-
this.args[0][0],
|
|
22
|
-
this.args[0][1],
|
|
23
|
-
this.args[0][2],
|
|
24
|
-
this.args[0][3],
|
|
25
|
-
this.args[0][4],
|
|
26
|
-
];
|
|
18
|
+
super('McdSupply', getAddr('McdSupply'), ['uint256','uint256','address','address','address'], [vaultId, amount, joinAddr, from, mcdManager]);
|
|
27
19
|
}
|
|
28
20
|
|
|
29
21
|
async getAssetsToApprove() {
|
|
@@ -16,15 +16,7 @@ class MakerWithdrawAction extends Action {
|
|
|
16
16
|
*/
|
|
17
17
|
constructor(vaultId, amount, joinAddr, to, mcdManager = getAddr('McdCdpManager')) {
|
|
18
18
|
requireAddress(to);
|
|
19
|
-
super('McdWithdraw', getAddr('McdWithdraw'), [
|
|
20
|
-
|
|
21
|
-
this.mappableArgs = [
|
|
22
|
-
this.args[0][0],
|
|
23
|
-
this.args[0][1],
|
|
24
|
-
this.args[0][2],
|
|
25
|
-
this.args[0][3],
|
|
26
|
-
this.args[0][4],
|
|
27
|
-
];
|
|
19
|
+
super('McdWithdraw', getAddr('McdWithdraw'), ['uint256','uint256','address','address','address'], [vaultId, amount, joinAddr, to, mcdManager]);
|
|
28
20
|
}
|
|
29
21
|
}
|
|
30
22
|
|
|
@@ -24,13 +24,13 @@ class MStableClaimAction extends Action {
|
|
|
24
24
|
super(
|
|
25
25
|
'MStableClaim',
|
|
26
26
|
getAddr('MStableClaim'),
|
|
27
|
-
[
|
|
28
|
-
[
|
|
27
|
+
['address', 'address', 'uint256', 'uint256'],
|
|
28
|
+
[...arguments],
|
|
29
29
|
);
|
|
30
30
|
|
|
31
31
|
this.mappableArgs = [
|
|
32
|
-
this.args[0]
|
|
33
|
-
this.args[
|
|
32
|
+
this.args[0],
|
|
33
|
+
this.args[1],
|
|
34
34
|
];
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -39,39 +39,39 @@ class MStableDepositAction extends Action {
|
|
|
39
39
|
super(
|
|
40
40
|
'MStableDeposit',
|
|
41
41
|
getAddr('MStableDeposit'),
|
|
42
|
-
[
|
|
43
|
-
[
|
|
42
|
+
['address', 'address', 'address', 'address', 'address', 'address', 'uint256', 'uint256', 'uint256'],
|
|
43
|
+
[...arguments],
|
|
44
44
|
);
|
|
45
45
|
|
|
46
46
|
this.mappableArgs = [
|
|
47
|
-
this.args[0]
|
|
48
|
-
this.args[
|
|
49
|
-
this.args[
|
|
50
|
-
this.args[
|
|
51
|
-
this.args[
|
|
52
|
-
this.args[
|
|
53
|
-
this.args[
|
|
54
|
-
this.args[
|
|
55
|
-
this.args[
|
|
47
|
+
this.args[0],
|
|
48
|
+
this.args[1],
|
|
49
|
+
this.args[2],
|
|
50
|
+
this.args[3],
|
|
51
|
+
this.args[4],
|
|
52
|
+
this.args[5],
|
|
53
|
+
this.args[6],
|
|
54
|
+
this.args[7],
|
|
55
|
+
this.args[8],
|
|
56
56
|
];
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
async getAssetsToApprove() {
|
|
60
|
-
const assetPair = this.args[
|
|
61
|
-
const owner = this.args[
|
|
60
|
+
const assetPair = this.args[8];
|
|
61
|
+
const owner = this.args[4];
|
|
62
62
|
let asset;
|
|
63
63
|
switch (assetPair) {
|
|
64
64
|
case mstableAssetPairs.BASSET_MASSET:
|
|
65
65
|
case mstableAssetPairs.BASSET_IMASSET:
|
|
66
66
|
case mstableAssetPairs.BASSET_IMASSETVAULT:
|
|
67
|
-
asset = this.args[0]
|
|
67
|
+
asset = this.args[0];
|
|
68
68
|
break;
|
|
69
69
|
case mstableAssetPairs.MASSET_IMASSET:
|
|
70
70
|
case mstableAssetPairs.MASSET_IMASSETVAULT:
|
|
71
|
-
asset = this.args[
|
|
71
|
+
asset = this.args[1];
|
|
72
72
|
break;
|
|
73
73
|
case mstableAssetPairs.IMASSET_IMASSETVAULT:
|
|
74
|
-
asset = this.args[
|
|
74
|
+
asset = this.args[2];
|
|
75
75
|
break;
|
|
76
76
|
default:
|
|
77
77
|
return [];
|
|
@@ -39,26 +39,26 @@ class MStableWithdrawAction extends Action {
|
|
|
39
39
|
super(
|
|
40
40
|
'MStableWithdraw',
|
|
41
41
|
getAddr('MStableWithdraw'),
|
|
42
|
-
[
|
|
43
|
-
[
|
|
42
|
+
['address', 'address', 'address', 'address', 'address', 'address', 'uint256', 'uint256', 'uint256'],
|
|
43
|
+
[...arguments],
|
|
44
44
|
);
|
|
45
45
|
|
|
46
46
|
this.mappableArgs = [
|
|
47
|
-
this.args[0]
|
|
48
|
-
this.args[
|
|
49
|
-
this.args[
|
|
50
|
-
this.args[
|
|
51
|
-
this.args[
|
|
52
|
-
this.args[
|
|
53
|
-
this.args[
|
|
54
|
-
this.args[
|
|
55
|
-
this.args[
|
|
47
|
+
this.args[0],
|
|
48
|
+
this.args[1],
|
|
49
|
+
this.args[2],
|
|
50
|
+
this.args[3],
|
|
51
|
+
this.args[4],
|
|
52
|
+
this.args[5],
|
|
53
|
+
this.args[6],
|
|
54
|
+
this.args[7],
|
|
55
|
+
this.args[8],
|
|
56
56
|
];
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
async getAssetsToApprove() {
|
|
60
|
-
const assetPair = this.args[
|
|
61
|
-
const owner = this.args[
|
|
60
|
+
const assetPair = this.args[8];
|
|
61
|
+
const owner = this.args[4];
|
|
62
62
|
let asset;
|
|
63
63
|
switch (assetPair) {
|
|
64
64
|
case mstableAssetPairs.BASSET_IMASSETVAULT:
|
|
@@ -67,10 +67,10 @@ class MStableWithdrawAction extends Action {
|
|
|
67
67
|
return [];
|
|
68
68
|
case mstableAssetPairs.MASSET_IMASSET:
|
|
69
69
|
case mstableAssetPairs.BASSET_IMASSET:
|
|
70
|
-
asset = this.args[
|
|
70
|
+
asset = this.args[2];
|
|
71
71
|
break;
|
|
72
72
|
case mstableAssetPairs.BASSET_MASSET:
|
|
73
|
-
asset = this.args[
|
|
73
|
+
asset = this.args[1];
|
|
74
74
|
break;
|
|
75
75
|
default:
|
|
76
76
|
return [];
|
|
@@ -15,16 +15,16 @@ class RariDepositAction extends Action {
|
|
|
15
15
|
* @param to {EthAddress} RSPT will be sent to this address
|
|
16
16
|
*/
|
|
17
17
|
constructor(fundManager, stablecoinAddress, poolTokenAddress, amount, from, to) {
|
|
18
|
-
super('RariDeposit', getAddr('RariDeposit'), [
|
|
18
|
+
super('RariDeposit', getAddr('RariDeposit'), ['address', 'address', 'address', 'uint256', 'address', 'address'], [fundManager, stablecoinAddress, poolTokenAddress, amount, from, to]);
|
|
19
19
|
this.mappableArgs = [
|
|
20
|
-
this.args[
|
|
21
|
-
this.args[
|
|
22
|
-
this.args[
|
|
20
|
+
this.args[3],
|
|
21
|
+
this.args[4],
|
|
22
|
+
this.args[5],
|
|
23
23
|
];
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
async getAssetsToApprove() {
|
|
27
|
-
return [{asset: this.args[
|
|
27
|
+
return [{asset: this.args[1], owner: this.args[4]}];
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -16,17 +16,17 @@ class RariWithdrawAction extends Action {
|
|
|
16
16
|
* @param to {EthAddress} stablecoins withdrawn will be sent to this address
|
|
17
17
|
*/
|
|
18
18
|
constructor(fundManager, poolTokenAddress, poolTokensAmountToPull, from, stablecoinAddress, stablecoinAmountToWithdraw, to) {
|
|
19
|
-
super('RariWithdraw', getAddr('RariWithdraw'), [
|
|
19
|
+
super('RariWithdraw', getAddr('RariWithdraw'), ['address', 'address', 'uint256', 'address', 'address', 'uint256', 'address'], [fundManager, poolTokenAddress, poolTokensAmountToPull, from, stablecoinAddress, stablecoinAmountToWithdraw, to]);
|
|
20
20
|
this.mappableArgs = [
|
|
21
|
-
this.args[
|
|
22
|
-
this.args[
|
|
23
|
-
this.args[
|
|
24
|
-
this.args[
|
|
21
|
+
this.args[2],
|
|
22
|
+
this.args[3],
|
|
23
|
+
this.args[5],
|
|
24
|
+
this.args[6],
|
|
25
25
|
];
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
async getAssetsToApprove() {
|
|
29
|
-
return [{asset: this.args[
|
|
29
|
+
return [{asset: this.args[1], owner: this.args[3]}];
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -13,13 +13,7 @@ class ReflexerGenerateAction extends Action {
|
|
|
13
13
|
*/
|
|
14
14
|
constructor(vaultId, amount, to) {
|
|
15
15
|
requireAddress(to);
|
|
16
|
-
super('ReflexerGenerate', getAddr('ReflexerGenerate'), [
|
|
17
|
-
|
|
18
|
-
this.mappableArgs = [
|
|
19
|
-
this.args[0][0],
|
|
20
|
-
this.args[0][1],
|
|
21
|
-
this.args[0][2],
|
|
22
|
-
];
|
|
16
|
+
super('ReflexerGenerate', getAddr('ReflexerGenerate'), ['uint256','uint256','address'], [vaultId, amount, to]);
|
|
23
17
|
}
|
|
24
18
|
}
|
|
25
19
|
|
|
@@ -12,17 +12,17 @@ class ReflexerNativeUniV2SaviourDepositAction extends Action {
|
|
|
12
12
|
* @param lpTokenAmount {string}
|
|
13
13
|
*/
|
|
14
14
|
constructor(from, safeId, lpTokenAmount) {
|
|
15
|
-
super('ReflexerNativeUniV2SaviourDeposit', getAddr('ReflexerNativeUniV2SaviourDeposit'), [
|
|
15
|
+
super('ReflexerNativeUniV2SaviourDeposit', getAddr('ReflexerNativeUniV2SaviourDeposit'), ['address','uint256','uint256'], [from, safeId, lpTokenAmount]);
|
|
16
16
|
this.mappableArgs = [
|
|
17
|
-
this.args[0]
|
|
18
|
-
this.args[
|
|
19
|
-
this.args[
|
|
17
|
+
this.args[0],
|
|
18
|
+
this.args[1],
|
|
19
|
+
this.args[2],
|
|
20
20
|
];
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
async getAssetsToApprove() {
|
|
24
24
|
const tokenAddress = getAddr('RaiWethUniV2LPToken');
|
|
25
|
-
return [{asset: tokenAddress, owner: this.args[0]
|
|
25
|
+
return [{asset: tokenAddress, owner: this.args[0]}];
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
}
|
|
@@ -11,16 +11,11 @@ class ReflexerNativeUniV2SaviourGetReservesAction extends Action {
|
|
|
11
11
|
* @param safeId {SafeId}
|
|
12
12
|
*/
|
|
13
13
|
constructor(to, safeId) {
|
|
14
|
-
super('ReflexerNativeUniV2SaviourGetReserves', getAddr('ReflexerNativeUniV2SaviourGetReserves'), [
|
|
14
|
+
super('ReflexerNativeUniV2SaviourGetReserves', getAddr('ReflexerNativeUniV2SaviourGetReserves'), ['address','uint256'], [to, safeId]);
|
|
15
15
|
this.mappableArgs = [
|
|
16
|
-
this.args[0]
|
|
16
|
+
this.args[0],
|
|
17
17
|
];
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
async getAssetsToApprove() {
|
|
21
|
-
return [];
|
|
22
18
|
}
|
|
23
|
-
|
|
24
19
|
}
|
|
25
20
|
|
|
26
|
-
module.exports = ReflexerNativeUniV2SaviourGetReservesAction;
|
|
21
|
+
module.exports = ReflexerNativeUniV2SaviourGetReservesAction;
|
|
@@ -12,17 +12,12 @@ class ReflexerNativeUniV2SaviourWithdrawAction extends Action {
|
|
|
12
12
|
* @param lpTokenAmount {string}
|
|
13
13
|
*/
|
|
14
14
|
constructor(to, safeId, lpTokenAmount) {
|
|
15
|
-
super('ReflexerNativeUniV2SaviourWithdraw', getAddr('ReflexerNativeUniV2SaviourWithdraw'), [
|
|
15
|
+
super('ReflexerNativeUniV2SaviourWithdraw', getAddr('ReflexerNativeUniV2SaviourWithdraw'), ['address','uint256','uint256', ], [to, safeId, lpTokenAmount]);
|
|
16
16
|
this.mappableArgs = [
|
|
17
|
-
this.args[0]
|
|
18
|
-
this.args[
|
|
17
|
+
this.args[0],
|
|
18
|
+
this.args[2],
|
|
19
19
|
];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
async getAssetsToApprove() {
|
|
23
|
-
return [];
|
|
24
20
|
}
|
|
25
|
-
|
|
26
21
|
}
|
|
27
22
|
|
|
28
|
-
module.exports = ReflexerNativeUniV2SaviourWithdrawAction;
|
|
23
|
+
module.exports = ReflexerNativeUniV2SaviourWithdrawAction;
|
|
@@ -9,11 +9,7 @@ class ReflexerOpenSafeAction extends Action {
|
|
|
9
9
|
* @param adapterAddr {EthAddress}
|
|
10
10
|
*/
|
|
11
11
|
constructor(adapterAddr) {
|
|
12
|
-
super('ReflexerOpen', getAddr('ReflexerOpen'), [
|
|
13
|
-
|
|
14
|
-
this.mappableArgs = [
|
|
15
|
-
this.args[0][0],
|
|
16
|
-
];
|
|
12
|
+
super('ReflexerOpen', getAddr('ReflexerOpen'), ['address'], [adapterAddr]);
|
|
17
13
|
}
|
|
18
14
|
}
|
|
19
15
|
|
|
@@ -13,13 +13,7 @@ class ReflexerPaybackAction extends Action {
|
|
|
13
13
|
* @param from {EthAddress} RAI will be sent from this address
|
|
14
14
|
*/
|
|
15
15
|
constructor(safeId, amount, from) {
|
|
16
|
-
super('ReflexerPayback', getAddr('ReflexerPayback'), [
|
|
17
|
-
|
|
18
|
-
this.mappableArgs = [
|
|
19
|
-
this.args[0][0],
|
|
20
|
-
this.args[0][1],
|
|
21
|
-
this.args[0][2],
|
|
22
|
-
];
|
|
16
|
+
super('ReflexerPayback', getAddr('ReflexerPayback'), ['uint256','uint256','address'], [safeId, amount, from]);
|
|
23
17
|
}
|
|
24
18
|
|
|
25
19
|
async getAssetsToApprove() {
|
|
@@ -14,14 +14,7 @@ class ReflexerSupplyAction extends Action {
|
|
|
14
14
|
* @param from {EthAddress} Tokens will be supplied from this address
|
|
15
15
|
*/
|
|
16
16
|
constructor(safeId, amount, adapterAddr, from) {
|
|
17
|
-
super('ReflexerSupply', getAddr('ReflexerSupply'), [
|
|
18
|
-
|
|
19
|
-
this.mappableArgs = [
|
|
20
|
-
this.args[0][0],
|
|
21
|
-
this.args[0][1],
|
|
22
|
-
this.args[0][2],
|
|
23
|
-
this.args[0][3],
|
|
24
|
-
];
|
|
17
|
+
super('ReflexerSupply', getAddr('ReflexerSupply'), ['uint256','uint256','address','address'], [safeId, amount, adapterAddr, from]);
|
|
25
18
|
}
|
|
26
19
|
|
|
27
20
|
async getAssetsToApprove() {
|
|
@@ -15,14 +15,7 @@ class ReflexerWithdrawAction extends Action {
|
|
|
15
15
|
*/
|
|
16
16
|
constructor(safeId, amount, adapterAddr, to) {
|
|
17
17
|
requireAddress(to);
|
|
18
|
-
super('ReflexerWithdraw', getAddr('ReflexerWithdraw'), [
|
|
19
|
-
|
|
20
|
-
this.mappableArgs = [
|
|
21
|
-
this.args[0][0],
|
|
22
|
-
this.args[0][1],
|
|
23
|
-
this.args[0][2],
|
|
24
|
-
this.args[0][3],
|
|
25
|
-
];
|
|
18
|
+
super('ReflexerWithdraw', getAddr('ReflexerWithdraw'), ['uint256','uint256','address','address'], [safeId, amount, adapterAddr, to]);
|
|
26
19
|
}
|
|
27
20
|
}
|
|
28
21
|
|