feat: Add check to don't support cyclical swaps with native actions

Remove unnecessary tests and improve comments

--- don't change below this line ---
ENG-4331 Took 30 minutes
This commit is contained in:
Diana Carvalho
2025-03-13 17:34:50 +00:00
parent 0aba7edf83
commit 27c9c53889
3 changed files with 76 additions and 160 deletions

View File

@@ -1389,24 +1389,6 @@ contract TychoRouterTest is TychoRouterTestSetup {
vm.stopPrank();
}
function testCyclicSwapUnwrapOutputIntegration() public {
vm.deal(tychoRouterAddr, 1 ether);
vm.startPrank(ALICE);
// Encoded solution generated using `test_cylic_swap_unwrap_output`
// but manually replacing the executor addresses with the ones in this test
// `dd8559c917393fc8dd2b4dd289c52ff445fde1b0` to `2e234dae75c793f67a35089c9d99245e1c58470b`
// `042c0ebbeab9d9987c2f64ee05f2b3aeb86eaf70` to `f62849f9a0b5bf2913b396098f7c7019b51a820a`
(bool success,) = tychoRouterAddr.call(
hex"d499aa880000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003000000000000000000000000cd09f75e2bf2a4d11f3ab23f1389fcc1621c0cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000067f7d35e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000003ede3eca2a72b3aecc820e955b36f38437d013950000000000000000000000000000000000000000000000000000000067d04d66000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000041043569db60af05e3bbc0e4fcff373ffeeacc0fa5bbbe322f171becf366be7f1c4d31d26e0b2952b4d7bf09ddc9902bbb2758870ce36b737286f76a2006fcfc861b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e100700001000000f62849f9a0b5bf2913b396098f7c7019b51a820a00000000000000000000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c59901f62849f9a0b5bf2913b396098f7c7019b51a820a2260fac5e5542a773aa44fbcfedf7c193bc2c599000bb800003c006d01020000002e234dae75c793f67a35089c9d99245e1c58470b2260fac5e5542a773aa44fbcfedf7c193bc2c599c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000bb83ede3eca2a72b3aecc820e955b36f38437d01395cbcdf9626bc03e24f779434178a73a0b4bad62ed0100000000000000000000000000000000000000000000000000000000000000"
);
assertEq(ALICE.balance, 993164318934741987); // 0.993164318934741987 ETH
vm.stopPrank();
}
// Base Network Tests
// Make sure to set the RPC_URL to base network
function testSwapSingleBase() public {