From 1838ccf8a17d518e174ad926a979bc9d9c151cbd Mon Sep 17 00:00:00 2001 From: Diana Carvalho Date: Fri, 4 Apr 2025 14:32:26 +0100 Subject: [PATCH] fix: Fix Ekubo test --- don't change below this line --- ENG-4306 Took 15 minutes --- config/test_executor_addresses.json | 2 +- foundry/test/TychoRouter.t.sol | 6 ++---- src/encoding/evm/strategy_encoder/strategy_encoders.rs | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/config/test_executor_addresses.json b/config/test_executor_addresses.json index a7ec22f..018a56b 100644 --- a/config/test_executor_addresses.json +++ b/config/test_executor_addresses.json @@ -7,7 +7,7 @@ "pancakeswap_v3": "0x5991A2dF15A8F6A256D3Ec51E99254Cd3fb576A9", "uniswap_v4": "0xF62849F9A0B5Bf2913b396098F7c7019b51A820a", "vm:balancer_v2": "0xc7183455a4C133Ae270771860664b6B7ec320bB1", - "ekubo_v2": "0x2a07706473244BC757E10F2a9E86fB532828afe3", + "ekubo_v2": "0x3D7Ebc40AF7092E3F1C81F2e996cbA5Cae2090d7", "vm:curve": "0x1d1499e622D69689cdf9004d05Ec547d650Ff211" } } diff --git a/foundry/test/TychoRouter.t.sol b/foundry/test/TychoRouter.t.sol index cea80e7..9d286a4 100644 --- a/foundry/test/TychoRouter.t.sol +++ b/foundry/test/TychoRouter.t.sol @@ -955,7 +955,6 @@ contract TychoRouterTest is TychoRouterTestSetup { uint256 balanceAfter = ALICE.balance; assertTrue(success, "Call Failed"); - console.logUint(balanceAfter - balanceBefore); assertEq(balanceAfter - balanceBefore, 1117254495486192350); } @@ -1022,17 +1021,16 @@ contract TychoRouterTest is TychoRouterTestSetup { // This allows us to change the code at that address to be the testing executor code vm.etch( 0x4f88f6630a33dB05BEa1FeF7Dc7ff7508D1c531D, - 0x2a07706473244BC757E10F2a9E86fB532828afe3.code + 0x3D7Ebc40AF7092E3F1C81F2e996cbA5Cae2090d7.code ); deal(ALICE, 1 ether); uint256 balanceBefore = IERC20(USDC_ADDR).balanceOf(ALICE); - // Approve permit2 vm.startPrank(ALICE); // Encoded solution generated using `test_split_encoding_strategy_ekubo` (bool success,) = address(tychoRouter).call{value: 1 ether}( - hex"0a83cb080000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000077007500010000002a07706473244bc757e10f2a9e86fb532828afe31d1499e622d69689cdf9004d05ec547d650ff2110000000000000000000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4851d02a5948496a67827242eabc5725531342527c000000000000000000000000000000000000000000" + hex"0a83cb080000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000077007500010000003d7ebc40af7092e3f1c81f2e996cba5cae2090d7a4ad4f68d0b91cfd19687c881e50f3a00242828c0000000000000000000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4851d02a5948496a67827242eabc5725531342527c000000000000000000000000000000000000000000" ); uint256 balanceAfter = IERC20(USDC_ADDR).balanceOf(ALICE); diff --git a/src/encoding/evm/strategy_encoder/strategy_encoders.rs b/src/encoding/evm/strategy_encoder/strategy_encoders.rs index b3dee35..6bc2aa8 100644 --- a/src/encoding/evm/strategy_encoder/strategy_encoders.rs +++ b/src/encoding/evm/strategy_encoder/strategy_encoders.rs @@ -1083,7 +1083,7 @@ mod tests { eth_chain(), swap_encoder_registry, None, - Some(Bytes::from_str("0x1d1499e622D69689cdf9004d05Ec547d650Ff211").unwrap()), + Some(Bytes::from_str("0xA4AD4f68d0b91CFD19687c881e50f3A00242828c").unwrap()), ) .unwrap();