feat: Upgrade tycho dependencies (#289)
Don't use tycho_execution from tycho_simulation #time 8m
This commit is contained in:
2399
protocol-testing/Cargo.lock
generated
2399
protocol-testing/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,8 @@ glob = "0.3.0"
|
||||
miette = { version = "7.6.0", features = ["fancy"] }
|
||||
# Logging & Tracing
|
||||
tracing = "0.1.37"
|
||||
tycho-simulation = { git = "https://github.com/propeller-heads/tycho-simulation.git", rev = "f73c2ef28328abdde791edf1fb21748f78dbee6a", features = ["evm"] }
|
||||
tycho-simulation = { git = "https://github.com/propeller-heads/tycho-simulation.git", tag = "0.167.0", features = ["evm"] }
|
||||
tycho-execution = "0.129.0"
|
||||
num-bigint = "0.4"
|
||||
num-traits = "0.2"
|
||||
num-rational = "0.4.2"
|
||||
|
||||
@@ -10,17 +10,15 @@ use alloy::{primitives::Keccak256, sol_types::SolValue};
|
||||
use miette::{IntoDiagnostic, WrapErr};
|
||||
use num_bigint::BigUint;
|
||||
use serde_json::json;
|
||||
use tycho_execution::encoding::{
|
||||
errors::EncodingError,
|
||||
evm::{encoder_builders::TychoRouterEncoderBuilder, utils::bytes_to_address},
|
||||
models::{EncodedSolution, NativeAction, Solution, SwapBuilder, Transaction, UserTransferType},
|
||||
};
|
||||
use tycho_simulation::{
|
||||
evm::protocol::u256_num::biguint_to_u256,
|
||||
protocol::models::ProtocolComponent,
|
||||
tycho_common::{dto::Chain, Bytes},
|
||||
tycho_execution::encoding::{
|
||||
errors::EncodingError,
|
||||
evm::{encoder_builders::TychoRouterEncoderBuilder, utils::bytes_to_address},
|
||||
models::{
|
||||
EncodedSolution, NativeAction, Solution, SwapBuilder, Transaction, UserTransferType,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
use crate::execution::EXECUTOR_ADDRESS;
|
||||
|
||||
@@ -13,6 +13,7 @@ use alloy::{
|
||||
use miette::{miette, IntoDiagnostic, WrapErr};
|
||||
use num_bigint::BigUint;
|
||||
use tracing::info;
|
||||
use tycho_execution::encoding::models::Solution;
|
||||
use tycho_simulation::{
|
||||
evm::protocol::u256_num::{biguint_to_u256, u256_to_biguint},
|
||||
tycho_common::{
|
||||
@@ -23,7 +24,6 @@ use tycho_simulation::{
|
||||
allowance_slot_detector::{AllowanceSlotDetectorConfig, EVMAllowanceSlotDetector},
|
||||
balance_slot_detector::{BalanceSlotDetectorConfig, EVMBalanceSlotDetector},
|
||||
},
|
||||
tycho_execution::encoding::models::Solution,
|
||||
};
|
||||
|
||||
use crate::rpc::RPCProvider;
|
||||
@@ -236,7 +236,7 @@ pub async fn setup_router_overwrites(
|
||||
/// - RPC queries for storage detection fail
|
||||
async fn setup_user_overwrites(
|
||||
solution: &Solution,
|
||||
transaction: &tycho_simulation::tycho_execution::encoding::models::Transaction,
|
||||
transaction: &tycho_execution::encoding::models::Transaction,
|
||||
user_address: Address,
|
||||
rpc_url: String,
|
||||
block: &Block,
|
||||
@@ -319,7 +319,7 @@ async fn setup_user_overwrites(
|
||||
/// Simulate a trade using eth_call for historical blocks
|
||||
pub async fn simulate_trade_with_eth_call(
|
||||
rpc_provider: &RPCProvider,
|
||||
transaction: &tycho_simulation::tycho_execution::encoding::models::Transaction,
|
||||
transaction: &tycho_execution::encoding::models::Transaction,
|
||||
solution: &Solution,
|
||||
block: &Block,
|
||||
) -> miette::Result<BigUint> {
|
||||
|
||||
@@ -21,6 +21,7 @@ use num_traits::{Signed, ToPrimitive, Zero};
|
||||
use postgres::{Client, Error, NoTls};
|
||||
use tokio::runtime::Runtime;
|
||||
use tracing::{debug, error, info, warn};
|
||||
use tycho_execution::encoding::evm::utils::bytes_to_address;
|
||||
use tycho_simulation::{
|
||||
evm::{decoder::TychoStreamDecoder, protocol::u256_num::bytes_to_u256},
|
||||
protocol::models::{DecoderContext, Update},
|
||||
@@ -33,7 +34,6 @@ use tycho_simulation::{
|
||||
models::token::Token,
|
||||
Bytes,
|
||||
},
|
||||
tycho_execution::encoding::evm::utils::bytes_to_address,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
|
||||
Reference in New Issue
Block a user