Merge branch 'main' into usx/dc/ENG-4673-integration-test

This commit is contained in:
Tamara
2025-07-14 09:06:31 -04:00
committed by GitHub
18 changed files with 138 additions and 172 deletions

View File

@@ -4,10 +4,9 @@ pub mod encoding;
use std::str::FromStr;
use alloy::{primitives::B256, signers::local::PrivateKeySigner};
use tycho_common::{models::Chain as TychoCommonChain, Bytes};
use tycho_common::{models::Chain, Bytes};
use tycho_execution::encoding::{
evm::encoder_builders::TychoRouterEncoderBuilder,
models::{Chain, UserTransferType},
evm::encoder_builders::TychoRouterEncoderBuilder, models::UserTransferType,
tycho_encoder::TychoEncoder,
};
@@ -16,7 +15,7 @@ pub fn router_address() -> Bytes {
}
pub fn eth_chain() -> Chain {
TychoCommonChain::Ethereum.into()
Chain::Ethereum
}
pub fn eth() -> Bytes {

View File

@@ -80,7 +80,7 @@ fn test_uniswap_v3_uniswap_v2() {
.clone();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solution,
&solution,
&UserTransferType::TransferFrom,
@@ -167,7 +167,7 @@ fn test_uniswap_v3_uniswap_v3() {
.clone();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solution,
&solution,
&UserTransferType::TransferFrom,
@@ -263,7 +263,7 @@ fn test_uniswap_v3_curve() {
.clone();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solution,
&solution,
&UserTransferType::TransferFrom,
@@ -334,7 +334,7 @@ fn test_balancer_v2_uniswap_v2() {
.clone();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solution,
&solution,
&UserTransferType::TransferFrom,
@@ -490,7 +490,7 @@ fn test_multi_protocol() {
.clone();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solution,
&solution,
&UserTransferType::TransferFromPermit2,
@@ -565,7 +565,7 @@ fn test_uniswap_v3_balancer_v3() {
.clone();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solution,
&solution,
&UserTransferType::TransferFrom,

View File

@@ -63,7 +63,7 @@ fn test_single_encoding_strategy_ekubo() {
.clone();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solution,
&solution,
&UserTransferType::TransferFrom,
@@ -115,7 +115,7 @@ fn test_single_encoding_strategy_maverick() {
.clone();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solution,
&solution,
&UserTransferType::TransferFrom,
@@ -177,7 +177,7 @@ fn test_single_encoding_strategy_usv4_eth_in() {
.clone();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solution,
&solution,
&UserTransferType::TransferFromPermit2,
@@ -244,7 +244,7 @@ fn test_single_encoding_strategy_usv4_eth_out() {
.clone();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solution,
&solution,
&UserTransferType::TransferFromPermit2,
@@ -330,7 +330,7 @@ fn test_single_encoding_strategy_usv4_grouped_swap() {
.clone();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solution,
&solution,
&UserTransferType::TransferFromPermit2,
@@ -440,7 +440,7 @@ fn test_single_encoding_strategy_curve() {
.clone();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solution,
&solution,
&UserTransferType::TransferFrom,
@@ -507,7 +507,7 @@ fn test_single_encoding_strategy_curve_st_eth() {
.clone();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solution,
&solution,
&UserTransferType::TransferFrom,
@@ -560,7 +560,7 @@ fn test_single_encoding_strategy_balancer_v3() {
.clone();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solution,
&solution,
&UserTransferType::TransferFrom,

View File

@@ -69,7 +69,7 @@ fn test_sequential_swap_strategy_encoder() {
.clone();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solution,
&solution,
&UserTransferType::TransferFromPermit2,
@@ -135,7 +135,7 @@ fn test_sequential_swap_strategy_encoder_no_permit2() {
.clone();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solution,
&solution,
&UserTransferType::TransferFrom,
@@ -260,7 +260,7 @@ fn test_sequential_strategy_cyclic_swap() {
.clone();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solution,
&solution,
&UserTransferType::TransferFromPermit2,

View File

@@ -54,7 +54,7 @@ fn test_single_swap_strategy_encoder() {
.unwrap();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solutions[0].clone(),
&solution,
&UserTransferType::TransferFromPermit2,
@@ -139,7 +139,7 @@ fn test_single_swap_strategy_encoder_no_permit2() {
.unwrap()[0]
.clone();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solution,
&solution,
&UserTransferType::TransferFrom,
@@ -221,7 +221,7 @@ fn test_single_swap_strategy_encoder_no_transfer_in() {
.unwrap()[0]
.clone();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solution,
&solution,
&UserTransferType::None,
@@ -305,7 +305,7 @@ fn test_single_swap_strategy_encoder_wrap() {
.clone();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solution,
&solution,
&UserTransferType::TransferFromPermit2,
@@ -357,7 +357,7 @@ fn test_single_swap_strategy_encoder_unwrap() {
.clone();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solution,
&solution,
&UserTransferType::TransferFromPermit2,

View File

@@ -99,7 +99,7 @@ fn test_split_swap_strategy_encoder() {
.clone();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solution,
&solution,
&UserTransferType::TransferFromPermit2,
@@ -212,7 +212,7 @@ fn test_split_input_cyclic_swap() {
.clone();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solution,
&solution,
&UserTransferType::TransferFromPermit2,
@@ -372,7 +372,7 @@ fn test_split_output_cyclic_swap() {
.clone();
let calldata = encode_tycho_router_call(
eth_chain().id,
eth_chain().id(),
encoded_solution,
&solution,
&UserTransferType::TransferFromPermit2,