From e00063053dcfaca00a92a0c240d5558c90b8dbe1 Mon Sep 17 00:00:00 2001 From: TAMARA LIPOWSKI Date: Thu, 25 Sep 2025 23:58:33 -0400 Subject: [PATCH] fix: Pass proper native address when encoding router call - We were using the wrapped address here instead of the proper native address, so the value was being set to the in amount when it should have been zero. --- protocol-testing/src/encoding.rs | 11 ++++------- protocol-testing/src/main.rs | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/protocol-testing/src/encoding.rs b/protocol-testing/src/encoding.rs index 7541bc7..936eb84 100644 --- a/protocol-testing/src/encoding.rs +++ b/protocol-testing/src/encoding.rs @@ -117,13 +117,10 @@ pub fn encode_swap( .wrap_err("Failed to encode solution")?[0] .clone(); - let transaction = encode_tycho_router_call( - encoded_solution, - &solution, - &chain.wrapped_native_token().address, - ) - .into_diagnostic() - .wrap_err("Failed to encode router calldata")?; + let transaction = + encode_tycho_router_call(encoded_solution, &solution, &chain.native_token().address) + .into_diagnostic() + .wrap_err("Failed to encode router calldata")?; Ok((transaction, solution)) } diff --git a/protocol-testing/src/main.rs b/protocol-testing/src/main.rs index c01625a..1ae8748 100644 --- a/protocol-testing/src/main.rs +++ b/protocol-testing/src/main.rs @@ -81,7 +81,7 @@ impl Args { fn main() -> miette::Result<()> { // Load .env file before setting up logging dotenv().ok(); - + tracing_subscriber::fmt() .with_env_filter(EnvFilter::from_default_env()) .with_target(false)