From 07d63233167c96384662f9e8d784668440071211 Mon Sep 17 00:00:00 2001 From: royvardhan Date: Mon, 17 Mar 2025 22:15:35 +0530 Subject: [PATCH] chore: fmt --- foundry/src/executors/CurveExecutor.sol | 4 ++- foundry/test/executors/CurveExecutor.t.sol | 34 ++++++++++++++++++---- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/foundry/src/executors/CurveExecutor.sol b/foundry/src/executors/CurveExecutor.sol index df13894..891cab2 100644 --- a/foundry/src/executors/CurveExecutor.sol +++ b/foundry/src/executors/CurveExecutor.sol @@ -46,7 +46,9 @@ contract CurveExecutor is IExecutor { ); } // 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.swapParams, amountIn, diff --git a/foundry/test/executors/CurveExecutor.t.sol b/foundry/test/executors/CurveExecutor.t.sol index b09ecb2..39c84cc 100644 --- a/foundry/test/executors/CurveExecutor.t.sol +++ b/foundry/test/executors/CurveExecutor.t.sol @@ -79,7 +79,13 @@ contract CurveExecutorTest is Test, Constants { address[5] memory pools; 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 = @@ -112,7 +118,13 @@ contract CurveExecutorTest is Test, Constants { deal(DAI_ADDR, address(curveExecutorExposed), amountIn); 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); @@ -132,12 +144,18 @@ contract CurveExecutorTest is Test, Constants { deal(address(curveExecutorExposed), amountIn); 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); - assertTrue(amountOut == 1001072414418410898); + assertTrue(amountOut == 1001072414418410898); 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); 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);