Merge pull request #54 from propeller-heads/encoding/dc/ENG-4169-use-dto-objects

chore: Use tycho_core::dto objects instead of tycho_core::models
This commit is contained in:
dianacarvalho1
2025-02-05 10:33:21 +00:00
committed by GitHub
8 changed files with 11 additions and 8 deletions

View File

@@ -1,7 +1,10 @@
use std::str::FromStr; use std::str::FromStr;
use num_bigint::BigUint; use num_bigint::BigUint;
use tycho_core::{dto::ProtocolComponent, models::Chain, Bytes}; use tycho_core::{
dto::{Chain, ProtocolComponent},
Bytes,
};
use tycho_execution::encoding::{ use tycho_execution::encoding::{
evm::{ evm::{
strategy_encoder::strategy_encoder_registry::EVMStrategyEncoderRegistry, strategy_encoder::strategy_encoder_registry::EVMStrategyEncoderRegistry,

View File

@@ -12,7 +12,7 @@ use alloy_sol_types::{eip712_domain, sol, SolStruct, SolValue};
use chrono::Utc; use chrono::Utc;
use num_bigint::BigUint; use num_bigint::BigUint;
use tokio::runtime::Runtime; use tokio::runtime::Runtime;
use tycho_core::{models::Chain, Bytes}; use tycho_core::{dto::Chain, Bytes};
use crate::encoding::{ use crate::encoding::{
errors::EncodingError, errors::EncodingError,

View File

@@ -1,4 +1,4 @@
use tycho_core::models::Chain; use tycho_core::dto::Chain;
pub struct ChainId(u64); pub struct ChainId(u64);

View File

@@ -1,6 +1,6 @@
use std::collections::HashMap; use std::collections::HashMap;
use tycho_core::models::Chain; use tycho_core::dto::Chain;
use crate::encoding::{ use crate::encoding::{
errors::EncodingError, errors::EncodingError,

View File

@@ -3,7 +3,7 @@ use std::{cmp::max, collections::HashSet, str::FromStr};
use alloy_primitives::{aliases::U24, FixedBytes, U256, U8}; use alloy_primitives::{aliases::U24, FixedBytes, U256, U8};
use alloy_sol_types::SolValue; use alloy_sol_types::SolValue;
use num_bigint::BigUint; use num_bigint::BigUint;
use tycho_core::{keccak256, models::Chain, Bytes}; use tycho_core::{dto::Chain, keccak256, Bytes};
use crate::encoding::{ use crate::encoding::{
errors::EncodingError, errors::EncodingError,

View File

@@ -1,6 +1,6 @@
use std::{collections::HashMap, fs}; use std::{collections::HashMap, fs};
use tycho_core::models::Chain; use tycho_core::dto::Chain;
use crate::encoding::{ use crate::encoding::{
errors::EncodingError, evm::swap_encoder::builder::SwapEncoderBuilder, errors::EncodingError, evm::swap_encoder::builder::SwapEncoderBuilder,

View File

@@ -104,7 +104,7 @@ impl<S: StrategyEncoderRegistry> TychoEncoder<S> for EVMTychoEncoder<S> {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use tycho_core::{dto::ProtocolComponent, models::Chain}; use tycho_core::dto::{Chain, ProtocolComponent};
use super::*; use super::*;
use crate::encoding::{ use crate::encoding::{

View File

@@ -1,4 +1,4 @@
use tycho_core::{models::Chain, Bytes}; use tycho_core::{dto::Chain, Bytes};
use crate::encoding::{errors::EncodingError, models::Solution, swap_encoder::SwapEncoder}; use crate::encoding::{errors::EncodingError, models::Solution, swap_encoder::SwapEncoder};