@defisaver/sdk 0.2.0 → 0.2.4

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 (113) 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 -7
  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/balancer/BalancerV2ClaimAction.js +10 -12
  12. package/src/actions/balancer/BalancerV2SupplyAction.js +14 -16
  13. package/src/actions/balancer/BalancerV2WithdrawAction.js +15 -17
  14. package/src/actions/basic/AutomationV2Unsub.js +3 -3
  15. package/src/actions/basic/ChangeProxyOwnerAction.js +2 -4
  16. package/src/actions/basic/GasFeeAction.js +6 -6
  17. package/src/actions/basic/PullTokenAction.js +3 -9
  18. package/src/actions/basic/SellAction.js +5 -6
  19. package/src/actions/basic/SendTokenAction.js +3 -9
  20. package/src/actions/basic/SendTokenAndUnwrapAction.js +3 -9
  21. package/src/actions/basic/SubInputsAction.js +3 -8
  22. package/src/actions/basic/SumInputsAction.js +3 -8
  23. package/src/actions/basic/ToggleSubAction.js +19 -0
  24. package/src/actions/basic/TokenBalanceAction.js +3 -3
  25. package/src/actions/basic/UnwrapEthAction.js +3 -8
  26. package/src/actions/basic/UpdateSubAction.js +1 -1
  27. package/src/actions/basic/WrapEthAction.js +1 -5
  28. package/src/actions/basic/index.js +2 -0
  29. package/src/actions/checkers/MakerRatioCheckAction.js +5 -5
  30. package/src/actions/compound/CompoundBorrowAction.js +1 -7
  31. package/src/actions/compound/CompoundClaimAction.js +3 -3
  32. package/src/actions/compound/CompoundCollateralSwitchAction.js +2 -4
  33. package/src/actions/compound/CompoundGetDebtAction.js +3 -3
  34. package/src/actions/compound/CompoundPaybackAction.js +1 -7
  35. package/src/actions/compound/CompoundSupplyAction.js +4 -4
  36. package/src/actions/compound/CompoundWithdrawAction.js +1 -7
  37. package/src/actions/curve/CurveClaimFeesAction.js +4 -4
  38. package/src/actions/curve/CurveDepositAction.js +7 -7
  39. package/src/actions/curve/CurveGaugeDepositAction.js +6 -6
  40. package/src/actions/curve/CurveGaugeWithdrawAction.js +4 -4
  41. package/src/actions/curve/CurveMintCrvAction.js +3 -3
  42. package/src/actions/curve/CurveStethPoolDepositAction.js +9 -9
  43. package/src/actions/curve/CurveStethPoolWithdrawAction.js +11 -9
  44. package/src/actions/curve/CurveSwapAction.js +15 -15
  45. package/src/actions/curve/CurveWithdrawAction.js +7 -7
  46. package/src/actions/dydx/DyDxWithdrawAction.js +1 -7
  47. package/src/actions/flashloan/AaveV2FlashLoanAction.js +2 -2
  48. package/src/actions/flashloan/BalancerFlashLoanAction.js +2 -2
  49. package/src/actions/flashloan/DyDxFlashLoanAction.js +5 -1
  50. package/src/actions/flashloan/MakerFlashLoanAction.js +2 -2
  51. package/src/actions/guni/GUniDeposit.js +9 -9
  52. package/src/actions/guni/GUniWithdraw.js +5 -5
  53. package/src/actions/insta/InstPullTokensAction.js +4 -4
  54. package/src/actions/lido/LidoStakeAction.js +2 -7
  55. package/src/actions/lido/LidoUnwrapAction.js +2 -7
  56. package/src/actions/lido/LidoWrapAction.js +7 -7
  57. package/src/actions/liquity/LiquityBorrowAction.js +5 -5
  58. package/src/actions/liquity/LiquityClaimAction.js +3 -3
  59. package/src/actions/liquity/LiquityCloseAction.js +4 -4
  60. package/src/actions/liquity/LiquityEthGainToTroveAction.js +3 -3
  61. package/src/actions/liquity/LiquityOpenAction.js +8 -8
  62. package/src/actions/liquity/LiquityPaybackAction.js +5 -5
  63. package/src/actions/liquity/LiquityRedeemAction.js +7 -7
  64. package/src/actions/liquity/LiquitySPDepositAction.js +7 -7
  65. package/src/actions/liquity/LiquitySPWithdrawAction.js +6 -6
  66. package/src/actions/liquity/LiquityStakeAction.js +7 -7
  67. package/src/actions/liquity/LiquitySupplyAction.js +5 -5
  68. package/src/actions/liquity/LiquityUnstakeAction.js +6 -6
  69. package/src/actions/liquity/LiquityWithdrawAction.js +4 -4
  70. package/src/actions/maker/MakerClaimAction.js +4 -4
  71. package/src/actions/maker/MakerGenerateAction.js +1 -8
  72. package/src/actions/maker/MakerGiveAction.js +4 -4
  73. package/src/actions/maker/MakerMergeAction.js +1 -7
  74. package/src/actions/maker/MakerOpenVaultAction.js +1 -6
  75. package/src/actions/maker/MakerPaybackAction.js +2 -9
  76. package/src/actions/maker/MakerRatioAction.js +1 -5
  77. package/src/actions/maker/MakerSupplyAction.js +1 -9
  78. package/src/actions/maker/MakerWithdrawAction.js +1 -9
  79. package/src/actions/mstable/MStableClaimAction.js +4 -4
  80. package/src/actions/mstable/MStableDepositAction.js +16 -16
  81. package/src/actions/mstable/MStableWithdrawAction.js +15 -15
  82. package/src/actions/rari/RariDepositAction.js +5 -5
  83. package/src/actions/rari/RariWithdrawAction.js +6 -6
  84. package/src/actions/reflexer/ReflexerGenerateAction.js +1 -7
  85. package/src/actions/reflexer/ReflexerNativeUniV2SaviourDepositAction.js +5 -5
  86. package/src/actions/reflexer/ReflexerNativeUniV2SaviourGetReservesAction.js +3 -8
  87. package/src/actions/reflexer/ReflexerNativeUniV2SaviourWithdrawAction.js +4 -9
  88. package/src/actions/reflexer/ReflexerOpenSafeAction.js +1 -5
  89. package/src/actions/reflexer/ReflexerPaybackAction.js +1 -7
  90. package/src/actions/reflexer/ReflexerSupplyAction.js +1 -8
  91. package/src/actions/reflexer/ReflexerWithdrawAction.js +1 -8
  92. package/src/actions/uniswap/UniswapSupplyAction.js +20 -22
  93. package/src/actions/uniswap/UniswapWithdrawAction.js +16 -18
  94. package/src/actions/uniswapV3/UniswapV3CollectAction.js +7 -9
  95. package/src/actions/uniswapV3/UniswapV3CreatePoolAction.js +20 -22
  96. package/src/actions/uniswapV3/UniswapV3MintAction.js +19 -21
  97. package/src/actions/uniswapV3/UniswapV3SupplyAction.js +17 -19
  98. package/src/actions/uniswapV3/UniswapV3WithdrawAction.js +12 -14
  99. package/src/actions/yearn/YearnSupplyAction.js +6 -6
  100. package/src/actions/yearn/YearnWithdrawAction.js +6 -6
  101. package/src/addresses.js +3 -0
  102. package/src/triggers/ChainLinkPriceTrigger.js +2 -2
  103. package/src/triggers/CompoundRatioTrigger.js +1 -1
  104. package/src/triggers/GasPriceTrigger.js +1 -1
  105. package/src/triggers/LiquityRatioTrigger.js +3 -2
  106. package/src/triggers/MakerRatioTrigger.js +1 -5
  107. package/src/triggers/ReflexerRatioTrigger.js +2 -1
  108. package/src/triggers/TimestampTrigger.js +1 -1
  109. package/src/triggers/UniV3CurrentTickTrigger.js +1 -1
  110. package/test/Action.js +2 -1
  111. package/test/Strategy.js +44 -0
  112. package/test/accessLists/access-lists.js +1 -2
  113. package/test/actions/maker/MakerPaybackAction.js +2 -2
@@ -22,36 +22,34 @@ class UniswapV3SupplyAction extends Action {
22
22
  'UniSupplyV3',
23
23
  getAddr('UniSupplyV3'),
24
24
  [
25
- [
26
- "uint256",
27
- "uint256",
28
- "uint256",
29
- "uint256",
30
- "uint256",
31
- "uint256",
32
- "address",
33
- "address",
34
- "address",
35
- ],
25
+ "uint256",
26
+ "uint256",
27
+ "uint256",
28
+ "uint256",
29
+ "uint256",
30
+ "uint256",
31
+ "address",
32
+ "address",
33
+ "address",
36
34
  ],
37
- [[...arguments]]
35
+ [...arguments]
38
36
  );
39
37
 
40
38
  this.mappableArgs = [
41
- this.args[0][0],
42
- this.args[0][1],
43
- this.args[0][2],
39
+ this.args[0],
40
+ this.args[1],
41
+ this.args[2],
44
42
  ];
45
43
  }
46
44
 
47
45
  async getAssetsToApprove() {
48
- const assetA = getAssetInfoByAddress(this.args[0][7]);
49
- const assetB = getAssetInfoByAddress(this.args[0][8]);
46
+ const assetA = getAssetInfoByAddress(this.args[7]);
47
+ const assetB = getAssetInfoByAddress(this.args[8]);
50
48
 
51
49
  const approveArr = [];
52
50
 
53
- if (assetA.symbol !== 'ETH') approveArr.push({asset: this.args[0][7], owner: this.args[0][6], specialApproveLabel: 'uniswap v3'});
54
- if (assetB.symbol !== 'ETH') approveArr.push({asset: this.args[0][8], owner: this.args[0][6], specialApproveLabel: 'uniswap v3'});
51
+ if (assetA.symbol !== 'ETH') approveArr.push({asset: this.args[7], owner: this.args[6], specialApproveLabel: 'uniswap v3'});
52
+ if (assetB.symbol !== 'ETH') approveArr.push({asset: this.args[8], owner: this.args[6], specialApproveLabel: 'uniswap v3'});
55
53
 
56
54
  return approveArr;
57
55
  }
@@ -21,32 +21,30 @@ class UniswapV3WithdrawAction extends Action {
21
21
  'UniWithdrawV3',
22
22
  getAddr('UniWithdrawV3'),
23
23
  [
24
- [
25
- "uint256",
26
- "uint128",
27
- "uint256",
28
- "uint256",
29
- "uint256",
30
- "address",
31
- "uint128",
32
- "uint128",
33
- ],
24
+ "uint256",
25
+ "uint128",
26
+ "uint256",
27
+ "uint256",
28
+ "uint256",
29
+ "address",
30
+ "uint128",
31
+ "uint128",
34
32
  ],
35
- [[tokenId, liquidity, amount0Min, amount1Min, deadline, recipient, amount0Max, amount1Max]]
33
+ [tokenId, liquidity, amount0Min, amount1Min, deadline, recipient, amount0Max, amount1Max]
36
34
  );
37
35
 
38
36
  this.from = from;
39
37
 
40
38
  this.mappableArgs = [
41
- this.args[0][0],
42
- this.args[0][1],
39
+ this.args[0],
40
+ this.args[1],
43
41
  ];
44
42
  }
45
43
 
46
44
  async getAssetsToApprove() {
47
45
  return [{
48
46
  nft: getAddr('UniswapV3PositionManager'),
49
- tokenId: this.args[0][0],
47
+ tokenId: this.args[0],
50
48
  owner: this.from,
51
49
  specialApproveLabel: 'uniswap v3'
52
50
  }];
@@ -13,17 +13,17 @@ class YearnSupplyAction extends Action {
13
13
  * @param to {ETHAddress} yTokens will be sent to this address
14
14
  */
15
15
  constructor(tokenAddr, amount, from, to) {
16
- super('YearnSupply', getAddr('YearnSupply'), [['address','uint256','address', 'address']], [[tokenAddr, amount, from, to]]);
16
+ super('YearnSupply', getAddr('YearnSupply'), ['address','uint256','address', 'address'], [tokenAddr, amount, from, to]);
17
17
  this.mappableArgs = [
18
- this.args[0][1],
19
- this.args[0][2],
20
- this.args[0][3],
18
+ this.args[1],
19
+ this.args[2],
20
+ this.args[3],
21
21
  ];
22
22
  }
23
23
 
24
24
  async getAssetsToApprove() {
25
- const asset = getAssetInfoByAddress(this.args[0][0]);
26
- if (asset.symbol !== 'ETH') return [{asset: this.args[0][0], owner: this.args[0][2], specialApproveLabel: 'yearn'}];
25
+ const asset = getAssetInfoByAddress(this.args[0]);
26
+ if (asset.symbol !== 'ETH') return [{asset: this.args[0], owner: this.args[2], specialApproveLabel: 'yearn'}];
27
27
  return [];
28
28
  }
29
29
  }
@@ -13,17 +13,17 @@ class YearnWithdrawAction extends Action {
13
13
  * @param to {ETHAddress} underlying tokens will be sent to this address
14
14
  */
15
15
  constructor(tokenAddr, amount, from, to) {
16
- super('YearnWithdraw', getAddr('YearnWithdraw'), [['address','uint256','address', 'address']], [[tokenAddr, amount, from, to]]);
16
+ super('YearnWithdraw', getAddr('YearnWithdraw'), ['address','uint256','address', 'address'], [tokenAddr, amount, from, to]);
17
17
  this.mappableArgs = [
18
- this.args[0][1],
19
- this.args[0][2],
20
- this.args[0][3],
18
+ this.args[1],
19
+ this.args[2],
20
+ this.args[3],
21
21
  ];
22
22
  }
23
23
 
24
24
  async getAssetsToApprove() {
25
- const asset = getAssetInfoByAddress(this.args[0][0]);
26
- if (asset.symbol !== 'ETH') return [{asset: this.args[0][0], owner: this.args[0][2], specialApproveLabel: 'yearn'}];
25
+ const asset = getAssetInfoByAddress(this.args[0]);
26
+ if (asset.symbol !== 'ETH') return [{asset: this.args[0], owner: this.args[2], specialApproveLabel: 'yearn'}];
27
27
  return [];
28
28
  }
29
29
  }
package/src/addresses.js CHANGED
@@ -15,6 +15,8 @@ const actionAddresses = {
15
15
  'TokenBalance': '0xa92B177950F1460119940436515FD857C24494BC',
16
16
  'AutomationV2Unsub': '0xe35Fb12fE9796847751076aCf5ee7d124108612C',
17
17
  'SendTokenAndUnwrap': '0xeecd376026335261c89faD40D89625391b1eFF6a',
18
+ 'ToggleSub': '0x9A78E9d6538cfDbA0242Ca5eC46771E6132E8085',
19
+ 'UpdateSub': '0x94D707f411B852082a5ce49C3f47c49c7757761f',
18
20
 
19
21
  // exchange
20
22
  'DFSSell': '0x1abDDCae131ce200e66140d9fBd0C37F7a40e642',
@@ -52,6 +54,7 @@ const actionAddresses = {
52
54
  'CompBorrow': '0x8495579BF6Ae848f7E59686536F834f1d2CCd79C',
53
55
  'CompClaim': '0x81F488cF7A0128A9DB5e7207042cCAB1CB0ac902',
54
56
  'CompPayback': '0x2881590d5FfBd1e88BFc0Dc292f10e5377977f87',
57
+ 'CompPaybackNew': '0xa2Fa682f44BE40a11d69Eb738CBB91148f0D9742',
55
58
  'CompSupply': '0xB4CEDe40b249b756Ce0EAa3e14F6af89f25f9a3d',
56
59
  'CompWithdraw': '0x3792F83D6A82091cb53052458038CC86e206463F',
57
60
  'CompGetDebt': '0xc2B8f8423bc8Fe2e9A44cA9d364d835D1751b725',
@@ -4,9 +4,9 @@ const {getAddr} = require("../addresses.js");
4
4
  class ChainLinkPriceTrigger extends Action {
5
5
 
6
6
  constructor(tokenAddr, price, state) {
7
- super("ChainLinkPriceTrigger", getAddr("ChainLinkPriceTrigger"), [["address", "uint256", "uint8"]], [[...arguments]]);
7
+ super("ChainLinkPriceTrigger", getAddr("ChainLinkPriceTrigger"), ["address", "uint256", "uint8"], [...arguments]);
8
8
  }
9
9
 
10
10
  }
11
11
 
12
- module.exports = ChainLinkPriceTrigger;
12
+ module.exports = ChainLinkPriceTrigger;
@@ -4,7 +4,7 @@ const {getAddr} = require("../addresses.js");
4
4
  class CompoundRatioTrigger extends Action {
5
5
 
6
6
  constructor(user, ratio, state) {
7
- super("CompoundRatioTrigger", getAddr("CompoundRatioTrigger"), [["address", "uint256", "uint8"]], [[...arguments]]);
7
+ super("CompoundRatioTrigger", getAddr("CompoundRatioTrigger"), ["address", "uint256", "uint8"], [...arguments]);
8
8
  }
9
9
  }
10
10
 
@@ -4,7 +4,7 @@ const {getAddr} = require("../addresses.js");
4
4
  class GasPriceTrigger extends Action {
5
5
 
6
6
  constructor(maxGasPrice) {
7
- super("GasPriceTrigger", getAddr("GasPriceTrigger"), [["uint256"]], [[...arguments]]);
7
+ super("GasPriceTrigger", getAddr("GasPriceTrigger"), ["uint256"], [...arguments]);
8
8
  }
9
9
  }
10
10
 
@@ -1,4 +1,5 @@
1
1
  const Action = require("../Action");
2
+ const {getAddr} = require("../addresses");
2
3
 
3
4
  class LiquityRatioTrigger extends Action {
4
5
 
@@ -6,8 +7,8 @@ class LiquityRatioTrigger extends Action {
6
7
  super(
7
8
  "LiquityRatioTrigger",
8
9
  getAddr("LiquityRatioTrigger"),
9
- [["addresss", "uint256", "uint8"]],
10
- [[...arguments]]
10
+ ["addresss", "uint256", "uint8"],
11
+ [...arguments]
11
12
  );
12
13
  }
13
14
  }
@@ -4,11 +4,7 @@ const {getAddr} = require("../addresses.js");
4
4
  class MakerRatioTrigger extends Action {
5
5
 
6
6
  constructor(vaultId, ratio, state) {
7
- super("McdRatioTrigger", getAddr("McdRatioTrigger"), [["uint256", "uint256", "uint8"]], [[...arguments]]);
8
- }
9
-
10
- async getEthValue() {
11
- return this.args[0];
7
+ super("McdRatioTrigger", getAddr("McdRatioTrigger"), ["uint256", "uint256", "uint8"], [...arguments]);
12
8
  }
13
9
  }
14
10
 
@@ -1,9 +1,10 @@
1
1
  const Action = require("../Action");
2
+ const {getAddr} = require("../addresses");
2
3
 
3
4
  class ReflexerRatioTrigger extends Action {
4
5
 
5
6
  constructor(vaultId, ratio, state) {
6
- super("ReflexerRatioTrigger", getAddr("ReflexerRatioTrigger"), [["uint256", "uint256", "uint8"]], [[...arguments]]);
7
+ super("ReflexerRatioTrigger", getAddr("ReflexerRatioTrigger"), ["uint256", "uint256", "uint8"], [...arguments]);
7
8
  }
8
9
  }
9
10
 
@@ -4,7 +4,7 @@ const {getAddr} = require("../addresses.js");
4
4
  class TimestampTrigger extends Action {
5
5
 
6
6
  constructor(nextTimestamp) {
7
- super("TimestampTrigger", getAddr("TimestampTrigger"), [["uint256"]], [[...arguments]]);
7
+ super("TimestampTrigger", getAddr("TimestampTrigger"), ["uint256"], [...arguments]);
8
8
  }
9
9
  }
10
10
 
@@ -4,7 +4,7 @@ const {getAddr} = require("../addresses.js");
4
4
  class UniV3CurrentTickTrigger extends Action {
5
5
 
6
6
  constructor(tokenId, state) {
7
- super("UniV3CurrentTickTrigger", getAddr("UniV3CurrentTickTrigger"), [["uint256", "uint8"]], [[...arguments]]);
7
+ super("UniV3CurrentTickTrigger", getAddr("UniV3CurrentTickTrigger"), ["uint256", "uint8"], [...arguments]);
8
8
  }
9
9
 
10
10
  }
package/test/Action.js CHANGED
@@ -39,6 +39,7 @@ describe('Action', () => {
39
39
  let action;
40
40
  it('Constructor', () => {
41
41
  action = new dfs.Action('MockSwap', '0x0a80C3C540eEF99811f4579fa7b1A0617294e06f', ['uint256', 'address'], ['$1', '0x6b175474e89094c44da98b954eedeac495271d0f']);
42
+ action.mappableArgs = [action.args[0][0], action.args[0][1]];
42
43
  })
43
44
  it('encodeForDsProxyCall', () => encodeForDsProxyCall(action));
44
45
  it('encodeForRecipe', () => encodeForRecipe(action));
@@ -54,7 +55,7 @@ describe('Action', () => {
54
55
  assert.throws(() => encodeForRecipe(action));
55
56
  });
56
57
  it('encodeForRecipe with custom mappableArgs', () => {
57
- action.mappableArgs = [action.args[0][0], action.args[1]];
58
+ action.mappableArgs = [action.args[0][0][0], action.args[0][1]];
58
59
  encodeForRecipe(action)
59
60
  });
60
61
  })
@@ -0,0 +1,44 @@
1
+ const dfs = require('../index.js');
2
+
3
+ describe('Strategy', () => {
4
+
5
+ context('Yearn Repay', () => {
6
+ let repayStrategy;
7
+
8
+ it('Constructor', () => {
9
+ repayStrategy = new dfs.Strategy('McdYearnRepayStrategy');
10
+
11
+ repayStrategy.addSubSlot('&vaultId', 'uint256');
12
+ repayStrategy.addSubSlot('&targetRatio', 'uint256');
13
+ repayStrategy.addSubSlot('&daiAddr', 'address');
14
+ repayStrategy.addSubSlot('&mcdManager', 'address');
15
+
16
+ const mcdRatioTrigger = new dfs.triggers.MakerRatioTrigger('0', '0', '0');
17
+ repayStrategy.addTrigger(mcdRatioTrigger);
18
+
19
+ const yearnWithdrawAction = new dfs.actions.yearn.YearnWithdrawAction(
20
+ '%yDaiAddr',
21
+ '%amount',
22
+ '&proxy',
23
+ '&proxy',
24
+ );
25
+
26
+ const feeTakingAction = new dfs.actions.basic.GasFeeAction(
27
+ '0', '&daiAddr', '$1',
28
+ );
29
+
30
+ const mcdPaybackAction = new dfs.actions.maker.MakerPaybackAction(
31
+ '&vaultId',
32
+ '$2',
33
+ '&proxy',
34
+ '&mcdManager',
35
+ );
36
+
37
+ repayStrategy.addAction(yearnWithdrawAction);
38
+ repayStrategy.addAction(feeTakingAction);
39
+ repayStrategy.addAction(mcdPaybackAction);
40
+ })
41
+
42
+ it('encodeForDsProxyCall', () => repayStrategy.encodeForDsProxyCall());
43
+ })
44
+ })
@@ -85,8 +85,7 @@ describe('Access-Lists', () => {
85
85
  sampleRecipes.forEach((recipe) => {
86
86
  it(`... should make an access list for recipe ${recipe.name}`, () => {
87
87
  const recipeAccessList = recipe.getAccessList();
88
- console.log(recipeAccessList);
89
- testDuplicates(recipeAccessList);
88
+ testDuplicates(recipeAccessList);
90
89
  testInclusion(recipe, recipeAccessList);
91
90
  });
92
91
  });
@@ -14,7 +14,7 @@ describe('Action: MakerPaybackAction', () => {
14
14
  assetAmountInWei(1, 'DAI'),
15
15
  '0x0a80C3C540eEF99811f4579fa7b1A0617294e06f'
16
16
  );
17
- assert.equal(action.args[0][3], getAddr('McdCdpManager'));
17
+ assert.equal(action.args[3], getAddr('McdCdpManager'));
18
18
  })
19
19
  it('encodeForDsProxyCall', () => encodeForDsProxyCall(action));
20
20
  it('encodeForRecipe', () => encodeForRecipe(action));
@@ -38,7 +38,7 @@ describe('Action: MakerPaybackAction', () => {
38
38
  '0x0a80C3C540eEF99811f4579fa7b1A0617294e06f',
39
39
  getAddr('BCdpManager'),
40
40
  );
41
- assert.equal(action.args[0][3], getAddr('BCdpManager'));
41
+ assert.equal(action.args[3], getAddr('BCdpManager'));
42
42
  })
43
43
  it('encodeForDsProxyCall', () => encodeForDsProxyCall(action));
44
44
  it('encodeForRecipe', () => encodeForRecipe(action));