diff --git a/foundry/test/.gitignore b/foundry/test/.gitignore new file mode 100644 index 0000000..47e2914 --- /dev/null +++ b/foundry/test/.gitignore @@ -0,0 +1 @@ +*.runtime.json diff --git a/foundry/test/protocols/BalancerV2.t.sol b/foundry/test/protocols/BalancerV2.t.sol index 1540ce1..7c056f1 100644 --- a/foundry/test/protocols/BalancerV2.t.sol +++ b/foundry/test/protocols/BalancerV2.t.sol @@ -136,7 +136,6 @@ contract BalancerV2ExecutorTest is Constants, TestUtils { } function testExportContract() public { - vm.skip(true); exportRuntimeBytecode(address(balancerV2Exposed), "BalancerV2"); } } diff --git a/foundry/test/protocols/BalancerV3.t.sol b/foundry/test/protocols/BalancerV3.t.sol index 3a1a182..d28a94b 100644 --- a/foundry/test/protocols/BalancerV3.t.sol +++ b/foundry/test/protocols/BalancerV3.t.sol @@ -119,6 +119,10 @@ contract BalancerV3ExecutorTest is Constants, TestUtils { assertGt(balanceAfter, balanceBefore); assertEq(balanceAfter - balanceBefore, amountOut); } + + function testExportContract() public { + exportRuntimeBytecode(address(balancerV3Exposed), "BalancerV3"); + } } contract TychoRouterForBalancerV3Test is TychoRouterTestSetup { diff --git a/foundry/test/protocols/Curve.t.sol b/foundry/test/protocols/Curve.t.sol index bf288d4..666ca37 100644 --- a/foundry/test/protocols/Curve.t.sol +++ b/foundry/test/protocols/Curve.t.sol @@ -46,7 +46,7 @@ contract CurveExecutorExposed is CurveExecutor { } } -contract CurveExecutorTest is Test, Constants { +contract CurveExecutorTest is Test, TestUtils, Constants { using SafeERC20 for IERC20; CurveExecutorExposed curveExecutorExposed; @@ -393,6 +393,10 @@ contract CurveExecutorTest is Test, Constants { metaRegistry.get_coin_indices(pool, tokenIn, tokenOut); return (coinInIndex, coinOutIndex); } + + function testExportContract() public { + exportRuntimeBytecode(address(curveExecutorExposed), "Curve"); + } } contract TychoRouterForBalancerV3Test is TychoRouterTestSetup { diff --git a/foundry/test/protocols/Ekubo.t.sol b/foundry/test/protocols/Ekubo.t.sol index f1e5da9..04b4b18 100644 --- a/foundry/test/protocols/Ekubo.t.sol +++ b/foundry/test/protocols/Ekubo.t.sol @@ -202,6 +202,10 @@ contract EkuboExecutorTest is Constants, TestUtils { function testMultiHopSwapIntegration() public setUpFork(22082754) { multiHopSwap(loadCallDataFromFile("test_ekubo_encode_swap_multi")); } + + function testExportContract() public { + exportRuntimeBytecode(address(executor), "Ekubo"); + } } contract TychoRouterForBalancerV3Test is TychoRouterTestSetup { diff --git a/foundry/test/protocols/Hashflow.t.sol b/foundry/test/protocols/Hashflow.t.sol index dee68d8..69c03d4 100644 --- a/foundry/test/protocols/Hashflow.t.sol +++ b/foundry/test/protocols/Hashflow.t.sol @@ -41,7 +41,7 @@ contract HashflowUtils is Test { } } -contract HashflowExecutorECR20Test is Constants, HashflowUtils { +contract HashflowExecutorECR20Test is Constants, TestUtils, HashflowUtils { using SafeERC20 for IERC20; HashflowExecutorExposed executor; diff --git a/foundry/test/protocols/MaverickV2.t.sol b/foundry/test/protocols/MaverickV2.t.sol index 131994a..998a154 100644 --- a/foundry/test/protocols/MaverickV2.t.sol +++ b/foundry/test/protocols/MaverickV2.t.sol @@ -126,6 +126,10 @@ contract MaverickV2ExecutorTest is TestUtils, Constants { assertGt(balanceAfter, balanceBefore); assertEq(balanceAfter - balanceBefore, amountOut); } + + function testExportContract() public { + exportRuntimeBytecode(address(maverickV2Exposed), "MaverickV2"); + } } contract TychoRouterForBalancerV3Test is TychoRouterTestSetup { diff --git a/foundry/test/protocols/UniswapV2.t.sol b/foundry/test/protocols/UniswapV2.t.sol index a509877..4e0ec28 100644 --- a/foundry/test/protocols/UniswapV2.t.sol +++ b/foundry/test/protocols/UniswapV2.t.sol @@ -263,4 +263,8 @@ contract UniswapV2ExecutorTest is Constants, Permit2TestHelper, TestUtils { assertEq(IERC20(BASE_MAG7).balanceOf(BOB), 1379830606); } + + function testExportContract() public { + exportRuntimeBytecode(address(uniswapV2Exposed), "UniswapV2"); + } } diff --git a/foundry/test/protocols/UniswapV3.t.sol b/foundry/test/protocols/UniswapV3.t.sol index cbc081d..4f92dfe 100644 --- a/foundry/test/protocols/UniswapV3.t.sol +++ b/foundry/test/protocols/UniswapV3.t.sol @@ -39,7 +39,12 @@ contract UniswapV3ExecutorExposed is UniswapV3Executor { } } -contract UniswapV3ExecutorTest is Test, Constants, Permit2TestHelper { +contract UniswapV3ExecutorTest is + Test, + TestUtils, + Constants, + Permit2TestHelper +{ using SafeERC20 for IERC20; UniswapV3ExecutorExposed uniswapV3Exposed; @@ -210,6 +215,10 @@ contract UniswapV3ExecutorTest is Test, Constants, Permit2TestHelper { transferType ); } + + function testExportContract() public { + exportRuntimeBytecode(address(uniswapV3Exposed), "UniswapV3"); + } } contract TychoRouterForBalancerV3Test is TychoRouterTestSetup { diff --git a/foundry/test/protocols/UniswapV4.t.sol b/foundry/test/protocols/UniswapV4.t.sol index 508283f..656fd65 100644 --- a/foundry/test/protocols/UniswapV4.t.sol +++ b/foundry/test/protocols/UniswapV4.t.sol @@ -261,6 +261,10 @@ contract UniswapV4ExecutorTest is Constants, TestUtils { ); assertTrue(IERC20(WETH_ADDR).balanceOf(ALICE) == amountOut); } + + function testExportContract() public { + exportRuntimeBytecode(address(uniswapV4Exposed), "UniswapV4"); + } } contract TychoRouterForBalancerV3Test is TychoRouterTestSetup {