@defisaver/sdk 0.2.12 → 0.2.13

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.
Files changed (131) hide show
  1. package/ACTIONS.md +379 -21
  2. package/DEV.md +0 -298
  3. package/package.json +2 -2
  4. package/src/Action.js +3 -6
  5. package/src/actions/aave/AaveBorrowAction.js +2 -11
  6. package/src/actions/aave/AaveClaimStkAaveAction.js +5 -5
  7. package/src/actions/aave/AaveCollateralSwitchAction.js +4 -5
  8. package/src/actions/aave/AavePaybackAction.js +2 -11
  9. package/src/actions/aave/AaveSupplyAction.js +6 -6
  10. package/src/actions/aave/AaveWithdrawAction.js +1 -8
  11. package/src/actions/aaveV3/AaveV3ATokenPaybackAction.js +13 -13
  12. package/src/actions/aaveV3/AaveV3BorrowAction.js +16 -16
  13. package/src/actions/aaveV3/AaveV3ClaimRewardsAction.js +8 -8
  14. package/src/actions/aaveV3/AaveV3CollateralSwitchAction.js +9 -9
  15. package/src/actions/aaveV3/AaveV3PaybackAction.js +16 -16
  16. package/src/actions/aaveV3/AaveV3SetEModeAction.js +7 -7
  17. package/src/actions/aaveV3/AaveV3SupplyAction.js +17 -17
  18. package/src/actions/aaveV3/AaveV3SwapBorrowRateModeAction.js +8 -8
  19. package/src/actions/aaveV3/AaveV3WithdrawAction.js +11 -11
  20. package/src/actions/balancer/BalancerV2ClaimAction.js +10 -12
  21. package/src/actions/balancer/BalancerV2SupplyAction.js +14 -16
  22. package/src/actions/balancer/BalancerV2WithdrawAction.js +15 -17
  23. package/src/actions/basic/AutomationV2Unsub.js +3 -3
  24. package/src/actions/basic/ChangeProxyOwnerAction.js +2 -4
  25. package/src/actions/basic/GasFeeAction.js +6 -6
  26. package/src/actions/basic/PullTokenAction.js +3 -9
  27. package/src/actions/basic/SellAction.js +5 -6
  28. package/src/actions/basic/SendTokenAction.js +3 -9
  29. package/src/actions/basic/SendTokenAndUnwrapAction.js +30 -0
  30. package/src/actions/basic/SubInputsAction.js +3 -8
  31. package/src/actions/basic/SumInputsAction.js +3 -8
  32. package/src/actions/basic/ToggleSubAction.js +19 -0
  33. package/src/actions/basic/TokenBalanceAction.js +3 -3
  34. package/src/actions/basic/UnwrapEthAction.js +3 -8
  35. package/src/actions/basic/UpdateSubAction.js +19 -0
  36. package/src/actions/basic/WrapEthAction.js +5 -8
  37. package/src/actions/basic/index.js +6 -0
  38. package/src/actions/checkers/MakerRatioCheckAction.js +5 -5
  39. package/src/actions/compound/CompoundBorrowAction.js +1 -7
  40. package/src/actions/compound/CompoundClaimAction.js +3 -3
  41. package/src/actions/compound/CompoundCollateralSwitchAction.js +2 -4
  42. package/src/actions/compound/CompoundGetDebtAction.js +3 -3
  43. package/src/actions/compound/CompoundPaybackAction.js +1 -7
  44. package/src/actions/compound/CompoundSupplyAction.js +4 -4
  45. package/src/actions/compound/CompoundWithdrawAction.js +1 -7
  46. package/src/actions/convex/ConvexClaimAction.js +60 -0
  47. package/src/actions/convex/ConvexDepositAction.js +67 -0
  48. package/src/actions/convex/ConvexWithdrawAction.js +65 -0
  49. package/src/actions/convex/index.js +9 -0
  50. package/src/actions/curve/CurveClaimFeesAction.js +4 -4
  51. package/src/actions/curve/CurveDepositAction.js +7 -7
  52. package/src/actions/curve/CurveGaugeDepositAction.js +6 -6
  53. package/src/actions/curve/CurveGaugeWithdrawAction.js +4 -4
  54. package/src/actions/curve/CurveMintCrvAction.js +3 -3
  55. package/src/actions/curve/CurveStethPoolDepositAction.js +9 -9
  56. package/src/actions/curve/CurveStethPoolWithdrawAction.js +11 -9
  57. package/src/actions/curve/CurveSwapAction.js +15 -15
  58. package/src/actions/curve/CurveWithdrawAction.js +7 -7
  59. package/src/actions/dydx/DyDxWithdrawAction.js +1 -7
  60. package/src/actions/flashloan/AaveV2FlashLoanAction.js +2 -2
  61. package/src/actions/flashloan/AaveV3FlashLoanAction.js +2 -2
  62. package/src/actions/flashloan/BalancerFlashLoanAction.js +2 -2
  63. package/src/actions/flashloan/DyDxFlashLoanAction.js +5 -1
  64. package/src/actions/flashloan/MakerFlashLoanAction.js +2 -2
  65. package/src/actions/guni/GUniDeposit.js +9 -9
  66. package/src/actions/guni/GUniWithdraw.js +5 -5
  67. package/src/actions/index.js +2 -0
  68. package/src/actions/insta/InstPullTokensAction.js +4 -4
  69. package/src/actions/lido/LidoStakeAction.js +2 -7
  70. package/src/actions/lido/LidoUnwrapAction.js +2 -7
  71. package/src/actions/lido/LidoWrapAction.js +7 -7
  72. package/src/actions/liquity/LiquityBorrowAction.js +5 -5
  73. package/src/actions/liquity/LiquityClaimAction.js +3 -3
  74. package/src/actions/liquity/LiquityCloseAction.js +4 -4
  75. package/src/actions/liquity/LiquityEthGainToTroveAction.js +3 -3
  76. package/src/actions/liquity/LiquityOpenAction.js +8 -8
  77. package/src/actions/liquity/LiquityPaybackAction.js +5 -5
  78. package/src/actions/liquity/LiquityRedeemAction.js +7 -7
  79. package/src/actions/liquity/LiquitySPDepositAction.js +7 -7
  80. package/src/actions/liquity/LiquitySPWithdrawAction.js +6 -6
  81. package/src/actions/liquity/LiquityStakeAction.js +7 -7
  82. package/src/actions/liquity/LiquitySupplyAction.js +5 -5
  83. package/src/actions/liquity/LiquityUnstakeAction.js +6 -6
  84. package/src/actions/liquity/LiquityWithdrawAction.js +4 -4
  85. package/src/actions/maker/MakerClaimAction.js +4 -4
  86. package/src/actions/maker/MakerGenerateAction.js +1 -8
  87. package/src/actions/maker/MakerGiveAction.js +4 -4
  88. package/src/actions/maker/MakerMergeAction.js +1 -7
  89. package/src/actions/maker/MakerOpenVaultAction.js +1 -6
  90. package/src/actions/maker/MakerPaybackAction.js +2 -9
  91. package/src/actions/maker/MakerRatioAction.js +1 -5
  92. package/src/actions/maker/MakerSupplyAction.js +1 -9
  93. package/src/actions/maker/MakerWithdrawAction.js +1 -9
  94. package/src/actions/mstable/MStableClaimAction.js +4 -4
  95. package/src/actions/mstable/MStableDepositAction.js +16 -16
  96. package/src/actions/mstable/MStableWithdrawAction.js +15 -15
  97. package/src/actions/rari/RariDepositAction.js +5 -5
  98. package/src/actions/rari/RariWithdrawAction.js +6 -6
  99. package/src/actions/reflexer/ReflexerGenerateAction.js +1 -7
  100. package/src/actions/reflexer/ReflexerNativeUniV2SaviourDepositAction.js +5 -5
  101. package/src/actions/reflexer/ReflexerNativeUniV2SaviourGetReservesAction.js +3 -8
  102. package/src/actions/reflexer/ReflexerNativeUniV2SaviourWithdrawAction.js +4 -9
  103. package/src/actions/reflexer/ReflexerOpenSafeAction.js +1 -5
  104. package/src/actions/reflexer/ReflexerPaybackAction.js +1 -7
  105. package/src/actions/reflexer/ReflexerSupplyAction.js +1 -8
  106. package/src/actions/reflexer/ReflexerWithdrawAction.js +1 -8
  107. package/src/actions/uniswap/UniswapSupplyAction.js +20 -22
  108. package/src/actions/uniswap/UniswapWithdrawAction.js +16 -18
  109. package/src/actions/uniswapV3/UniswapV3CollectAction.js +7 -9
  110. package/src/actions/uniswapV3/UniswapV3CreatePoolAction.js +20 -22
  111. package/src/actions/uniswapV3/UniswapV3MintAction.js +19 -21
  112. package/src/actions/uniswapV3/UniswapV3SupplyAction.js +17 -19
  113. package/src/actions/uniswapV3/UniswapV3WithdrawAction.js +12 -14
  114. package/src/actions/yearn/YearnSupplyAction.js +6 -6
  115. package/src/actions/yearn/YearnWithdrawAction.js +6 -6
  116. package/src/addresses.js +19 -12
  117. package/src/triggers/ChainLinkPriceTrigger.js +2 -2
  118. package/src/triggers/CompoundRatioTrigger.js +1 -1
  119. package/src/triggers/GasPriceTrigger.js +1 -1
  120. package/src/triggers/LiquityRatioTrigger.js +2 -2
  121. package/src/triggers/MakerRatioTrigger.js +1 -5
  122. package/src/triggers/ReflexerRatioTrigger.js +1 -1
  123. package/src/triggers/TimestampTrigger.js +1 -1
  124. package/src/triggers/UniV3CurrentTickTrigger.js +1 -1
  125. package/src/utils/convex-utils.js +20 -0
  126. package/src/utils/convexPoolInfo.json +1039 -0
  127. package/src/utils/index.js +2 -0
  128. package/test/Action.js +2 -1
  129. package/test/Strategy.js +44 -0
  130. package/test/accessLists/access-lists.js +1 -2
  131. package/test/actions/maker/MakerPaybackAction.js +2 -2
@@ -17,8 +17,8 @@ class AaveV2FlashLoanAction extends Action {
17
17
  super(
18
18
  'FLAaveV2',
19
19
  getAddr('FLAaveV2'),
20
- [['address[]','uint256[]', 'uint256[]', 'address', 'address', 'bytes', 'bytes']],
21
- [[tokens, loanAmounts, modes, loanPayer, flParamGetterAddr, flParamGetterData, []]]
20
+ ['address[]','uint256[]', 'uint256[]', 'address', 'address', 'bytes', 'bytes'],
21
+ [tokens, loanAmounts, modes, loanPayer, flParamGetterAddr, flParamGetterData, []]
22
22
  );
23
23
  }
24
24
  }
@@ -17,8 +17,8 @@ class AaveV3FlashLoanAction extends ActionWithL2 {
17
17
  super(
18
18
  'FLAaveV3',
19
19
  getAddr('FLAaveV3'),
20
- [['address[]','uint256[]', 'uint256[]', 'address', 'address', 'bytes', 'bytes']],
21
- [[tokens, loanAmounts, modes, loanPayer, flParamGetterAddr, flParamGetterData, []]]
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
- [['address[]','uint256[]', 'uint256[]', 'address', 'address', 'bytes', 'bytes']],
19
- [[tokens, amounts, [], getAddr('Empty'), flParamGetterAddr, flParamGetterData, []]]
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', getAddr('FLDyDx'),[['address[]','uint256[]', 'uint256[]', 'address', 'address', 'bytes', 'bytes']], [[[tokenAddr], [loanAmount], [], getAddr('Empty'),flParamGetterAddr, flParamGetterData, []]]);
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
- [['address[]','uint256[]', 'uint256[]', 'address', 'address', 'bytes', 'bytes']],
18
- [[[], [amount], [], getAddr('Empty'), flParamGetterAddr, flParamGetterData, []]]
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
- [['address', 'address', 'address', 'uint256', 'uint256', 'uint256', 'uint256', 'address', 'address']],
23
- [[pool, token0, token1, amount0Max, amount1max, amount0Min, amount1Min, to, from]]
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[0][3],
27
- this.args[0][4],
28
- this.args[0][5],
29
- this.args[0][6],
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[0][1], owner: this.args[0][8]});
37
- approveArr.push({asset: this.args[0][2], owner: this.args[0][8]});
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
- [['address', 'uint256', 'uint256', 'uint256', 'address', 'address']],
20
- [[pool, burnAmount, amount0Min, amount1Min, to, from]]
19
+ ['address', 'uint256', 'uint256', 'uint256', 'address', 'address'],
20
+ [pool, burnAmount, amount0Min, amount1Min, to, from]
21
21
  );
22
22
  this.mappableArgs = [
23
- this.args[0][1],
23
+ this.args[1],
24
24
  ];
25
25
  }
26
26
 
27
27
  async getAssetsToApprove() {
28
- return [{asset: this.args[0][0], owner: this.args[0][5]}];
28
+ return [{asset: this.args[0], owner: this.args[5]}];
29
29
  }
30
30
  }
31
31
 
32
- module.exports = GUniWithdraw;
32
+ module.exports = GUniWithdraw;
@@ -18,6 +18,7 @@ const guni = require('./guni');
18
18
  const mstable = require('./mstable');
19
19
  const rari = require('./rari');
20
20
  const aaveV3 = require('./aaveV3');
21
+ const convex = require('./convex');
21
22
 
22
23
  module.exports = {
23
24
  maker,
@@ -40,4 +41,5 @@ module.exports = {
40
41
  mstable,
41
42
  rari,
42
43
  aaveV3,
44
+ convex,
43
45
  };
@@ -7,16 +7,16 @@ class InstPullTokensAction extends Action {
7
7
  super(
8
8
  "InstPullTokens",
9
9
  getAddr("InstPullTokens"),
10
- [["address", "address[]", "uint256[]", "address"]],
11
- [[dsaAddress, tokens, amounts, to]]
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][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'), [['uint256','address', 'address']], [[amount, from, to]]);
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[0][1]}];
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'), [['uint256','address', 'address']], [[amount, from, to]]);
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[0][1]}];
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'), [['uint256','address', 'address', 'bool']], [[amount, from, to, useEth]]);
16
+ super('LidoWrap', getAddr('LidoWrap'), ['uint256','address', 'address', 'bool'], [amount, from, to, useEth]);
17
17
  this.mappableArgs = [
18
- this.args[0][0],
19
- this.args[0][1],
20
- this.args[0][2],
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[0][3]){
26
- return [{asset: getAssetInfo('WETH').address, owner: this.args[0][1]}];
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[0][1]}];
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
- [['uint256', 'uint256', 'address', 'address', 'address']],
19
- [[...arguments]]);
18
+ ['uint256', 'uint256', 'address', 'address', 'address'],
19
+ [...arguments]);
20
20
 
21
21
  this.mappableArgs = [
22
- this.args[0][0],
23
- this.args[0][1],
24
- this.args[0][2],
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
- [['address']],
17
- [[...arguments]]);
16
+ ['address'],
17
+ [...arguments]);
18
18
 
19
19
  this.mappableArgs = [
20
- this.args[0][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
- [['address', 'address']],
20
- [[from, to]]);
19
+ ['address', 'address'],
20
+ [from, to]);
21
21
 
22
22
  this.mappableArgs = [
23
- this.args[0][0],
24
- this.args[0][1],
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
- [['address', 'address', 'address']],
16
- [[...arguments]]);
15
+ ['address', 'address', 'address'],
16
+ [...arguments]);
17
17
 
18
18
  this.mappableArgs = [
19
- this.args[0][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
- [['uint256', 'uint256', 'uint256', 'address', 'address', 'address', 'address']],
23
- [[...arguments]]);
22
+ ['uint256', 'uint256', 'uint256', 'address', 'address', 'address', 'address'],
23
+ [...arguments]);
24
24
 
25
25
  this.mappableArgs = [
26
- this.args[0][0],
27
- this.args[0][1],
28
- this.args[0][2],
29
- this.args[0][3],
30
- this.args[0][4],
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[0][3]}];
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
- [['uint256', 'address', 'address', 'address']],
19
- [[...arguments]]);
18
+ ['uint256', 'address', 'address', 'address'],
19
+ [...arguments]);
20
20
 
21
21
  this.mappableArgs = [
22
- this.args[0][0],
23
- this.args[0][1],
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[0][1]}];
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
- [['uint256', 'address', 'address', 'address', 'address', 'address', 'uint256', 'uint256', 'uint256']],
32
- [[...arguments]]);
31
+ ['uint256', 'address', 'address', 'address', 'address', 'address', 'uint256', 'uint256', 'uint256'],
32
+ [...arguments]);
33
33
 
34
34
  this.mappableArgs = [
35
- this.args[0][0],
36
- this.args[0][1],
37
- this.args[0][2],
38
- this.args[0][8],
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[0][1]}];
43
+ return [{ asset: getAssetInfo('LUSD').address, owner: this.args[1]}];
44
44
  }
45
45
  }
46
46
 
@@ -18,19 +18,19 @@ class LiquitySPDepositAction extends Action {
18
18
  requireAddress(lqtyTo);
19
19
  super('LiquitySPDeposit',
20
20
  getAddr('LiquitySPDeposit'),
21
- [['uint256', 'address', 'address', 'address']],
22
- [[...arguments]]);
21
+ ['uint256', 'address', 'address', 'address'],
22
+ [...arguments]);
23
23
 
24
24
  this.mappableArgs = [
25
- this.args[0][0],
26
- this.args[0][1],
27
- this.args[0][2],
28
- this.args[0][3],
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[0][1]}];
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
- [['uint256', 'address', 'address', 'address']],
22
- [[...arguments]]);
21
+ ['uint256', 'address', 'address', 'address'],
22
+ [...arguments]);
23
23
 
24
24
  this.mappableArgs = [
25
- this.args[0][0],
26
- this.args[0][1],
27
- this.args[0][2],
28
- this.args[0][3],
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
- [['uint256', 'address', 'address', 'address']],
23
- [[...arguments]]);
22
+ ['uint256', 'address', 'address', 'address'],
23
+ [...arguments]);
24
24
 
25
25
  this.mappableArgs = [
26
- this.args[0][0],
27
- this.args[0][1],
28
- this.args[0][2],
29
- this.args[0][3],
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[0][1]}];
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
- [['uint256', 'address', 'address', 'address']],
19
- [[...arguments]]);
18
+ ['uint256', 'address', 'address', 'address'],
19
+ [...arguments]);
20
20
 
21
21
  this.mappableArgs = [
22
- this.args[0][0],
23
- this.args[0][1],
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[0][1]}];
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
- [['uint256', 'address', 'address', 'address']],
22
- [[...arguments]]);
21
+ ['uint256', 'address', 'address', 'address'],
22
+ [...arguments]);
23
23
 
24
24
  this.mappableArgs = [
25
- this.args[0][0],
26
- this.args[0][1],
27
- this.args[0][2],
28
- this.args[0][3],
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
- [['uint256', 'address', 'address', 'address']],
18
- [[...arguments]]);
17
+ ['uint256', 'address', 'address', 'address'],
18
+ [...arguments]);
19
19
 
20
20
  this.mappableArgs = [
21
- this.args[0][0],
22
- this.args[0][1],
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'), [['uint256','address','address']], [[vaultId, joinAddr, to]]);
16
+ super('McdClaim', getAddr('McdClaim'), ['uint256','address','address'], [vaultId, joinAddr, to]);
17
17
 
18
18
  this.mappableArgs = [
19
- this.args[0][0],
20
- this.args[0][1],
21
- this.args[0][2],
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'), [['uint256','uint256','address','address']], [[vaultId, amount, to, mcdManager]]);
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'), [["uint256", "address", "bool", "address"]], [[vaultId, newOwner, createProxy, mcdManager]]);
18
+ super('McdGive', getAddr('McdGive'), ["uint256", "address", "bool", "address"], [vaultId, newOwner, createProxy, mcdManager]);
19
19
 
20
20
  this.mappableArgs = [
21
- this.args[0][0],
22
- this.args[0][1],
23
- this.args[0][2],
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'), [['uint256','uint256','address']], [[srcVaultId, destVaultId, mcdManager]]);
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'), [['address','address']], [[joinAddr, mcdManager]]);
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'), [['uint256','uint256','address','address']], [[vaultId, amount, from, mcdManager]]);
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[0][2]}];
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'), [['uint256']], [[vaultId]]);
13
-
14
- this.mappableArgs = [
15
- this.args[0][0],
16
- ];
12
+ super('McdRatio', getAddr('McdRatio'), ['uint256'], [vaultId]);
17
13
  }
18
14
  }
19
15