chore: fmt
This commit is contained in:
committed by
Diana Carvalho
parent
826eca4a80
commit
07d6323316
@@ -46,7 +46,9 @@ contract CurveExecutor is IExecutor {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
// Only add the value parameter when the first token is the native token
|
// Only add the value parameter when the first token is the native token
|
||||||
return curveRouter.exchange{value: params.route[0] == nativeToken ? amountIn : 0}(
|
return curveRouter.exchange{
|
||||||
|
value: params.route[0] == nativeToken ? amountIn : 0
|
||||||
|
}(
|
||||||
params.route,
|
params.route,
|
||||||
params.swapParams,
|
params.swapParams,
|
||||||
amountIn,
|
amountIn,
|
||||||
|
|||||||
@@ -79,7 +79,13 @@ contract CurveExecutorTest is Test, Constants {
|
|||||||
address[5] memory pools;
|
address[5] memory pools;
|
||||||
|
|
||||||
bytes memory data = abi.encode(
|
bytes memory data = abi.encode(
|
||||||
route, swapParams, amountIn, minAmountOut, pools, address(this), true
|
route,
|
||||||
|
swapParams,
|
||||||
|
amountIn,
|
||||||
|
minAmountOut,
|
||||||
|
pools,
|
||||||
|
address(this),
|
||||||
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
CurveExecutor.SwapParams memory params =
|
CurveExecutor.SwapParams memory params =
|
||||||
@@ -112,7 +118,13 @@ contract CurveExecutorTest is Test, Constants {
|
|||||||
|
|
||||||
deal(DAI_ADDR, address(curveExecutorExposed), amountIn);
|
deal(DAI_ADDR, address(curveExecutorExposed), amountIn);
|
||||||
bytes memory data = abi.encode(
|
bytes memory data = abi.encode(
|
||||||
route, swapParams, amountIn, minAmountOut, pools, address(this), true
|
route,
|
||||||
|
swapParams,
|
||||||
|
amountIn,
|
||||||
|
minAmountOut,
|
||||||
|
pools,
|
||||||
|
address(this),
|
||||||
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
uint256 amountOut = curveExecutorExposed.swap(amountIn, data);
|
uint256 amountOut = curveExecutorExposed.swap(amountIn, data);
|
||||||
@@ -132,12 +144,18 @@ contract CurveExecutorTest is Test, Constants {
|
|||||||
|
|
||||||
deal(address(curveExecutorExposed), amountIn);
|
deal(address(curveExecutorExposed), amountIn);
|
||||||
bytes memory data = abi.encode(
|
bytes memory data = abi.encode(
|
||||||
route, swapParams, amountIn, minAmountOut, pools, address(this), false
|
route,
|
||||||
|
swapParams,
|
||||||
|
amountIn,
|
||||||
|
minAmountOut,
|
||||||
|
pools,
|
||||||
|
address(this),
|
||||||
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
uint256 amountOut = curveExecutorExposed.swap(amountIn, data);
|
uint256 amountOut = curveExecutorExposed.swap(amountIn, data);
|
||||||
|
|
||||||
assertTrue(amountOut == 1001072414418410898);
|
assertTrue(amountOut == 1001072414418410898);
|
||||||
assertEq(IERC20(STETH_ADDR).balanceOf(address(this)), amountOut - 1); //// Gets 1 wei less than amountOut
|
assertEq(IERC20(STETH_ADDR).balanceOf(address(this)), amountOut - 1); //// Gets 1 wei less than amountOut
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -337,7 +355,13 @@ contract CurveExecutorTest is Test, Constants {
|
|||||||
|
|
||||||
deal(WETH_ADDR, address(curveExecutorExposed), amountIn);
|
deal(WETH_ADDR, address(curveExecutorExposed), amountIn);
|
||||||
bytes memory data = abi.encode(
|
bytes memory data = abi.encode(
|
||||||
route, swapParams, amountIn, minAmountOut, pools, address(this), true
|
route,
|
||||||
|
swapParams,
|
||||||
|
amountIn,
|
||||||
|
minAmountOut,
|
||||||
|
pools,
|
||||||
|
address(this),
|
||||||
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
uint256 amountOut = curveExecutorExposed.swap(amountIn, data);
|
uint256 amountOut = curveExecutorExposed.swap(amountIn, data);
|
||||||
|
|||||||
Reference in New Issue
Block a user