diff --git a/crates/e2e/src/setup/mod.rs b/crates/e2e/src/setup/mod.rs index 472024fc89..26d0b44504 100644 --- a/crates/e2e/src/setup/mod.rs +++ b/crates/e2e/src/setup/mod.rs @@ -11,8 +11,8 @@ use { crate::nodes::{NODE_HOST, Node}, ::alloy::signers::local::{MnemonicBuilder, coins_bip39::English}, anyhow::{Result, anyhow}, - ethcontract::futures::FutureExt, ethrpc::Web3, + futures::FutureExt, std::{ future::Future, io::Write, diff --git a/crates/e2e/tests/e2e/ethflow.rs b/crates/e2e/tests/e2e/ethflow.rs index 6624861247..b215f65966 100644 --- a/crates/e2e/tests/e2e/ethflow.rs +++ b/crates/e2e/tests/e2e/ethflow.rs @@ -19,15 +19,7 @@ use { run_test, wait_for_condition, }, - ethcontract::H160, - ethrpc::{ - Web3, - alloy::{ - CallBuilderExt, - conversions::{IntoAlloy, IntoLegacy}, - }, - block_stream::timestamp_of_current_block_in_seconds, - }, + ethrpc::{Web3, alloy::CallBuilderExt, block_stream::timestamp_of_current_block_in_seconds}, model::{ DomainSeparator, order::{ @@ -207,7 +199,7 @@ async fn eth_flow_tx(web3: Web3) { test_trade_availability_in_api( services.client(), ðflow_order, - &trader.address().into_legacy(), + &trader.address(), onchain.contracts(), ethflow_contract, ) @@ -457,23 +449,16 @@ async fn test_order_availability_in_api( let is_available = || async { services.get_order(&uid).await.is_ok() }; wait_for_condition(TIMEOUT, is_available).await.unwrap(); - test_orders_query( - services, - order, - &owner.into_legacy(), - contracts, - ethflow_contract, - ) - .await; + test_orders_query(services, order, owner, contracts, ethflow_contract).await; // Api returns eth flow orders for both eth-flow contract address and actual // owner for address in [owner, ethflow_contract.address()] { test_account_query( - &address.into_legacy(), + address, services.client(), order, - &owner.into_legacy(), + owner, contracts, ethflow_contract, ) @@ -484,7 +469,7 @@ async fn test_order_availability_in_api( async fn test_trade_availability_in_api( client: &Client, order: &ExtendedEthFlowOrder, - owner: &H160, + owner: &Address, contracts: &Contracts, ethflow_contract: &CoWSwapEthFlow::Instance, ) { @@ -498,7 +483,7 @@ async fn test_trade_availability_in_api( // Api returns eth flow orders for both eth-flow contract address and actual // owner - for address in [owner, ðflow_contract.address().into_legacy()] { + for address in [owner, ethflow_contract.address()] { test_trade_query( &TradeQuery::ByOwner(*address), client, @@ -529,7 +514,7 @@ async fn test_order_was_settled(ethflow_order: &ExtendedEthFlowOrder, onchain: & async fn test_orders_query( services: &Services<'_>, order: &ExtendedEthFlowOrder, - owner: &H160, + owner: &Address, contracts: &Contracts, ethflow_contract: &CoWSwapEthFlow::Instance, ) { @@ -541,10 +526,10 @@ async fn test_orders_query( } async fn test_account_query( - queried_account: &H160, + queried_account: &Address, client: &Client, order: &ExtendedEthFlowOrder, - owner: &H160, + owner: &Address, contracts: &Contracts, ethflow_contract: &CoWSwapEthFlow::Instance, ) { @@ -564,7 +549,7 @@ async fn test_account_query( enum TradeQuery { ByUid(OrderUid), - ByOwner(H160), + ByOwner(Address), } async fn test_trade_query( @@ -594,7 +579,7 @@ async fn test_trade_query( async fn test_order_parameters( response: &Order, order: &ExtendedEthFlowOrder, - owner: &H160, + owner: &Address, contracts: &Contracts, ethflow_contract: &CoWSwapEthFlow::Instance, ) { @@ -614,7 +599,7 @@ async fn test_order_parameters( assert_eq!( response.metadata.onchain_order_data, Some(OnchainOrderData { - sender: owner.into_alloy(), + sender: *owner, placement_error: None, }) ); diff --git a/crates/e2e/tests/e2e/liquidity.rs b/crates/e2e/tests/e2e/liquidity.rs index 948d4071e1..cba31e19ad 100644 --- a/crates/e2e/tests/e2e/liquidity.rs +++ b/crates/e2e/tests/e2e/liquidity.rs @@ -1,6 +1,6 @@ use { alloy::{ - primitives::{Address, address}, + primitives::{Address, B256, address}, providers::{ Provider, ext::{AnvilApi, ImpersonateConfig}, @@ -21,11 +21,7 @@ use { wait_for_condition, }, }, - ethcontract::H256, - ethrpc::{ - Web3, - alloy::{CallBuilderExt, conversions::IntoLegacy}, - }, + ethrpc::{Web3, alloy::CallBuilderExt}, model::{ order::{OrderCreation, OrderKind}, signature::EcdsaSigningScheme, @@ -403,7 +399,7 @@ async fn fill_or_kill_zeroex_limit_order( zeroex: &IZeroex::Instance, zeroex_order: &shared::zeroex_api::OrderRecord, from: Address, -) -> anyhow::Result { +) -> anyhow::Result { let order = zeroex_order.order(); let tx_hash = zeroex .fillOrKillLimitOrder( @@ -435,5 +431,5 @@ async fn fill_or_kill_zeroex_limit_order( .watch() .await?; - Ok(tx_hash.into_legacy()) + Ok(tx_hash) }