diff --git a/examples/quickstart/main.rs b/examples/quickstart/main.rs index eefe4e5..d74cd9a 100644 --- a/examples/quickstart/main.rs +++ b/examples/quickstart/main.rs @@ -2,7 +2,7 @@ use std::str::FromStr; use num_bigint::BigUint; use tycho_core::{ - dto::{Chain as TychoCoreChain, ProtocolComponent}, + models::{protocol::ProtocolComponent, Chain as TychoCoreChain}, Bytes, }; use tycho_execution::encoding::{ diff --git a/src/bin/tycho-encode.rs b/src/bin/tycho-encode.rs index b297b3b..96f9387 100644 --- a/src/bin/tycho-encode.rs +++ b/src/bin/tycho-encode.rs @@ -2,7 +2,7 @@ use std::io::{self, Read}; use clap::{Parser, Subcommand}; use serde_json::Value; -use tycho_core::dto::Chain; +use tycho_core::models::Chain; use tycho_execution::encoding::{ errors::EncodingError, evm::encoder_builder::EVMEncoderBuilder, models::Solution, tycho_encoder::TychoEncoder, diff --git a/src/encoding/evm/approvals/permit2.rs b/src/encoding/evm/approvals/permit2.rs index cb1d79d..0374afd 100644 --- a/src/encoding/evm/approvals/permit2.rs +++ b/src/encoding/evm/approvals/permit2.rs @@ -183,7 +183,7 @@ mod tests { use alloy_primitives::Uint; use num_bigint::BigUint; - use tycho_core::dto::Chain as TychoCoreChain; + use tycho_core::models::Chain as TychoCoreChain; use super::*; diff --git a/src/encoding/evm/encoder_builder.rs b/src/encoding/evm/encoder_builder.rs index efb6e73..eb9011f 100644 --- a/src/encoding/evm/encoder_builder.rs +++ b/src/encoding/evm/encoder_builder.rs @@ -1,4 +1,4 @@ -use tycho_core::dto::Chain; +use tycho_core::models::Chain; use crate::encoding::{ errors::EncodingError, diff --git a/src/encoding/evm/strategy_encoder/group_swaps.rs b/src/encoding/evm/strategy_encoder/group_swaps.rs index dfd877b..48cb86b 100644 --- a/src/encoding/evm/strategy_encoder/group_swaps.rs +++ b/src/encoding/evm/strategy_encoder/group_swaps.rs @@ -74,7 +74,7 @@ mod tests { use std::str::FromStr; use alloy_primitives::hex; - use tycho_core::{dto::ProtocolComponent, Bytes}; + use tycho_core::{models::protocol::ProtocolComponent, Bytes}; use super::*; use crate::encoding::models::Swap; diff --git a/src/encoding/evm/strategy_encoder/strategy_encoders.rs b/src/encoding/evm/strategy_encoder/strategy_encoders.rs index e082dd5..6983268 100644 --- a/src/encoding/evm/strategy_encoder/strategy_encoders.rs +++ b/src/encoding/evm/strategy_encoder/strategy_encoders.rs @@ -89,7 +89,7 @@ pub struct SplitSwapStrategyEncoder { impl SplitSwapStrategyEncoder { pub fn new( swapper_pk: String, - blockchain: tycho_core::dto::Chain, + blockchain: tycho_core::models::Chain, swap_encoder_registry: SwapEncoderRegistry, ) -> Result { let chain = Chain::from(blockchain); @@ -331,7 +331,7 @@ mod tests { use num_bigint::{BigInt, BigUint}; use rstest::rstest; use tycho_core::{ - dto::{Chain as TychoCoreChain, ProtocolComponent}, + models::{protocol::ProtocolComponent, Chain as TychoCoreChain}, Bytes, }; diff --git a/src/encoding/evm/strategy_encoder/strategy_validators.rs b/src/encoding/evm/strategy_encoder/strategy_validators.rs index 26eb368..e2a0107 100644 --- a/src/encoding/evm/strategy_encoder/strategy_validators.rs +++ b/src/encoding/evm/strategy_encoder/strategy_validators.rs @@ -178,7 +178,7 @@ impl SplitSwapValidator { mod tests { use std::str::FromStr; - use tycho_core::{dto::ProtocolComponent, Bytes}; + use tycho_core::{models::protocol::ProtocolComponent, Bytes}; use super::*; use crate::encoding::models::Swap; diff --git a/src/encoding/evm/swap_encoder/swap_encoder_registry.rs b/src/encoding/evm/swap_encoder/swap_encoder_registry.rs index ec73a0a..72ab48a 100644 --- a/src/encoding/evm/swap_encoder/swap_encoder_registry.rs +++ b/src/encoding/evm/swap_encoder/swap_encoder_registry.rs @@ -19,7 +19,7 @@ impl SwapEncoderRegistry { /// executors' addresses in the file at the given path. pub fn new( executors_file_path: Option, - blockchain: tycho_core::dto::Chain, + blockchain: tycho_core::models::Chain, ) -> Result { let chain = Chain::from(blockchain); let config_str = if let Some(ref path) = executors_file_path { diff --git a/src/encoding/evm/swap_encoder/swap_encoders.rs b/src/encoding/evm/swap_encoder/swap_encoders.rs index 0d7678e..a0becd7 100644 --- a/src/encoding/evm/swap_encoder/swap_encoders.rs +++ b/src/encoding/evm/swap_encoder/swap_encoders.rs @@ -291,7 +291,7 @@ mod tests { use alloy::hex::encode; use num_bigint::BigInt; - use tycho_core::{dto::ProtocolComponent, Bytes}; + use tycho_core::{models::protocol::ProtocolComponent, Bytes}; use super::*; @@ -479,7 +479,6 @@ mod tests { .unwrap(); let hex_swap = encode(&encoded_swap); - println!("{}", hex_swap); assert_eq!( hex_swap, String::from(concat!( diff --git a/src/encoding/evm/tycho_encoder.rs b/src/encoding/evm/tycho_encoder.rs index e9cfd36..aef79b7 100644 --- a/src/encoding/evm/tycho_encoder.rs +++ b/src/encoding/evm/tycho_encoder.rs @@ -22,7 +22,7 @@ pub struct EVMTychoEncoder { impl EVMTychoEncoder { pub fn new( - chain: tycho_core::dto::Chain, + chain: tycho_core::models::Chain, strategy_encoder: Box, ) -> Result { let chain: Chain = Chain::from(chain); @@ -119,7 +119,7 @@ impl TychoEncoder for EVMTychoEncoder { mod tests { use std::str::FromStr; - use tycho_core::dto::{Chain as TychoCoreChain, ProtocolComponent}; + use tycho_core::models::{protocol::ProtocolComponent, Chain as TychoCoreChain}; use super::*; use crate::encoding::{ diff --git a/src/encoding/models.rs b/src/encoding/models.rs index 0824475..c97bd32 100644 --- a/src/encoding/models.rs +++ b/src/encoding/models.rs @@ -2,7 +2,7 @@ use hex; use num_bigint::BigUint; use serde::{Deserialize, Serialize}; use tycho_core::{ - dto::{Chain as TychoCoreChain, ProtocolComponent}, + models::{protocol::ProtocolComponent, Chain as TychoCoreChain}, Bytes, }; @@ -187,7 +187,7 @@ mod tests { tokens: vec![], protocol_type_name: "".to_string(), chain: Default::default(), - contract_ids: vec![], + contract_addresses: vec![], static_attributes: Default::default(), change: Default::default(), creation_tx: Default::default(),