Merge remote-tracking branch 'upstream/main' into ekubo
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use std::io::{self, Read};
|
||||
|
||||
use clap::{Parser, Subcommand};
|
||||
use tycho_core::models::Chain;
|
||||
use tycho_common::models::Chain;
|
||||
use tycho_execution::encoding::{
|
||||
evm::encoder_builder::EVMEncoderBuilder, models::Solution, tycho_encoder::TychoEncoder,
|
||||
};
|
||||
|
||||
@@ -15,7 +15,7 @@ use tokio::{
|
||||
runtime::{Handle, Runtime},
|
||||
task::block_in_place,
|
||||
};
|
||||
use tycho_core::Bytes;
|
||||
use tycho_common::Bytes;
|
||||
|
||||
use crate::encoding::{
|
||||
errors::EncodingError,
|
||||
@@ -175,7 +175,7 @@ mod tests {
|
||||
|
||||
use alloy_primitives::Uint;
|
||||
use num_bigint::BigUint;
|
||||
use tycho_core::models::Chain as TychoCoreChain;
|
||||
use tycho_common::models::Chain as TychoCoreChain;
|
||||
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use tycho_core::models::Chain;
|
||||
use tycho_common::models::Chain;
|
||||
|
||||
use crate::encoding::{
|
||||
errors::EncodingError,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use tycho_core::Bytes;
|
||||
use tycho_common::Bytes;
|
||||
|
||||
use crate::encoding::{evm::constants::GROUPABLE_PROTOCOLS, models::Swap};
|
||||
|
||||
@@ -74,7 +74,7 @@ mod tests {
|
||||
use std::str::FromStr;
|
||||
|
||||
use alloy_primitives::hex;
|
||||
use tycho_core::{models::protocol::ProtocolComponent, Bytes};
|
||||
use tycho_common::{models::protocol::ProtocolComponent, Bytes};
|
||||
|
||||
use super::*;
|
||||
use crate::encoding::models::Swap;
|
||||
|
||||
@@ -2,7 +2,7 @@ use std::{collections::HashSet, str::FromStr};
|
||||
|
||||
use alloy_primitives::{aliases::U24, U256, U8};
|
||||
use alloy_sol_types::SolValue;
|
||||
use tycho_core::Bytes;
|
||||
use tycho_common::Bytes;
|
||||
|
||||
use crate::encoding::{
|
||||
errors::EncodingError,
|
||||
@@ -80,7 +80,7 @@ pub struct SplitSwapStrategyEncoder {
|
||||
|
||||
impl SplitSwapStrategyEncoder {
|
||||
pub fn new(
|
||||
blockchain: tycho_core::models::Chain,
|
||||
blockchain: tycho_common::models::Chain,
|
||||
swap_encoder_registry: SwapEncoderRegistry,
|
||||
swapper_pk: Option<String>,
|
||||
) -> Result<Self, EncodingError> {
|
||||
@@ -341,7 +341,7 @@ mod tests {
|
||||
use alloy_primitives::hex;
|
||||
use num_bigint::{BigInt, BigUint};
|
||||
use rstest::rstest;
|
||||
use tycho_core::{
|
||||
use tycho_common::{
|
||||
models::{protocol::ProtocolComponent, Chain as TychoCoreChain},
|
||||
Bytes,
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::collections::{HashMap, HashSet, VecDeque};
|
||||
|
||||
use tycho_core::Bytes;
|
||||
use tycho_common::Bytes;
|
||||
|
||||
use crate::encoding::{
|
||||
errors::EncodingError,
|
||||
@@ -203,7 +203,7 @@ mod tests {
|
||||
|
||||
use num_bigint::BigUint;
|
||||
use rstest::rstest;
|
||||
use tycho_core::{models::protocol::ProtocolComponent, Bytes};
|
||||
use tycho_common::{models::protocol::ProtocolComponent, Bytes};
|
||||
|
||||
use super::*;
|
||||
use crate::encoding::models::Swap;
|
||||
|
||||
@@ -19,7 +19,7 @@ impl SwapEncoderRegistry {
|
||||
/// executors' addresses in the file at the given path.
|
||||
pub fn new(
|
||||
executors_file_path: Option<String>,
|
||||
blockchain: tycho_core::models::Chain,
|
||||
blockchain: tycho_common::models::Chain,
|
||||
) -> Result<Self, EncodingError> {
|
||||
let chain = Chain::from(blockchain);
|
||||
let config_str = if let Some(ref path) = executors_file_path {
|
||||
|
||||
@@ -2,7 +2,7 @@ use std::str::FromStr;
|
||||
|
||||
use alloy_primitives::{Address, Bytes as AlloyBytes};
|
||||
use alloy_sol_types::SolValue;
|
||||
use tycho_core::Bytes;
|
||||
use tycho_common::Bytes;
|
||||
|
||||
use crate::encoding::{
|
||||
errors::EncodingError,
|
||||
@@ -328,7 +328,7 @@ mod tests {
|
||||
|
||||
use alloy::hex::encode;
|
||||
use num_bigint::BigInt;
|
||||
use tycho_core::{models::protocol::ProtocolComponent, Bytes};
|
||||
use tycho_common::{models::protocol::ProtocolComponent, Bytes};
|
||||
|
||||
use super::*;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::collections::HashSet;
|
||||
|
||||
use num_bigint::BigUint;
|
||||
use tycho_core::Bytes;
|
||||
use tycho_common::Bytes;
|
||||
|
||||
use crate::encoding::{
|
||||
errors::EncodingError,
|
||||
@@ -34,7 +34,7 @@ impl Clone for EVMTychoEncoder {
|
||||
|
||||
impl EVMTychoEncoder {
|
||||
pub fn new(
|
||||
chain: tycho_core::models::Chain,
|
||||
chain: tycho_common::models::Chain,
|
||||
strategy_encoder: Box<dyn StrategyEncoder>,
|
||||
) -> Result<Self, EncodingError> {
|
||||
let chain: Chain = Chain::from(chain);
|
||||
@@ -177,7 +177,7 @@ impl TychoEncoder for EVMTychoEncoder {
|
||||
mod tests {
|
||||
use std::str::FromStr;
|
||||
|
||||
use tycho_core::models::{protocol::ProtocolComponent, Chain as TychoCoreChain};
|
||||
use tycho_common::models::{protocol::ProtocolComponent, Chain as TychoCoreChain};
|
||||
|
||||
use super::*;
|
||||
use crate::encoding::{
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::{cmp::max, sync::Arc};
|
||||
use alloy_primitives::{aliases::U24, keccak256, Address, FixedBytes, Keccak256, U256, U8};
|
||||
use num_bigint::BigUint;
|
||||
use tokio::runtime::{Handle, Runtime};
|
||||
use tycho_core::Bytes;
|
||||
use tycho_common::Bytes;
|
||||
|
||||
use crate::encoding::{
|
||||
errors::EncodingError,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use hex;
|
||||
use num_bigint::BigUint;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tycho_core::{
|
||||
use tycho_common::{
|
||||
models::{protocol::ProtocolComponent, Chain as TychoCoreChain},
|
||||
Bytes,
|
||||
};
|
||||
@@ -130,6 +130,7 @@ impl From<TychoCoreChain> for Chain {
|
||||
TychoCoreChain::Arbitrum => Chain { id: 42161, name: chain.to_string() },
|
||||
TychoCoreChain::Starknet => Chain { id: 0, name: chain.to_string() },
|
||||
TychoCoreChain::Base => Chain { id: 8453, name: chain.to_string() },
|
||||
TychoCoreChain::Unichain => Chain { id: 130, name: chain.to_string() },
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use tycho_core::Bytes;
|
||||
use tycho_common::Bytes;
|
||||
|
||||
use crate::encoding::{errors::EncodingError, models::Solution, swap_encoder::SwapEncoder};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user