File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ contract BalancerSwapTest is Helper(true) {
105105 userData: abi.encode (maxAmountsIn, poolFees),
106106 fromInternalBalance: false
107107 });
108+ // poolerAddr declared as separate var to prevent stack too deep errors
108109 address poolerAddr = pooler.addr;
109110 bytes32 poolId = pool.getPoolId ();
110111 vm.prank (poolerAddr);
Original file line number Diff line number Diff line change @@ -124,8 +124,8 @@ library SwapEncoder {
124124 function toSwapStep (State storage state , Swap memory swap ) private returns (IVault.BatchSwapStep memory step ) {
125125 TokenRegistry.State storage tokenRegistry = state.tokenRegistry.tokenRegistry ();
126126 step.poolId = swap.poolId;
127- step.assetInIndex = TokenRegistry.tokenIndices (tokenRegistry, swap.assetIn);
128- step.assetOutIndex = TokenRegistry.tokenIndices (tokenRegistry, swap.assetOut);
127+ step.assetInIndex = TokenRegistry.tokenIndex (tokenRegistry, swap.assetIn);
128+ step.assetOutIndex = TokenRegistry.tokenIndex (tokenRegistry, swap.assetOut);
129129 step.amount = swap.amount;
130130 step.userData = swap.userData;
131131 }
Original file line number Diff line number Diff line change @@ -105,8 +105,8 @@ library TokenRegistry {
105105 return (sellTokenIndex - 1 , buyTokenIndex - 1 );
106106 }
107107
108- /// @dev Returns the token indices for the specified token
109- function tokenIndices (State storage state , IERC20 token ) internal hydrateArray (state) returns (uint256 ) {
108+ /// @dev Returns the token index for the specified token
109+ function tokenIndex (State storage state , IERC20 token ) internal hydrateArray (state) returns (uint256 ) {
110110 uint256 index = pushIfNotPresentIndexOf (state, token);
111111 return index - 1 ;
112112 }
You can’t perform that action at this time.
0 commit comments