From 203aedc8795bcdcc6ef9639f66199f9dfd16bfdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Duarte?= Date: Thu, 11 Dec 2025 15:40:53 +0000 Subject: [PATCH 1/6] fix lints --- crates/autopilot/src/maintenance.rs | 1 - crates/driver/src/domain/mempools.rs | 35 +++++++++++++++----------- crates/shared/src/order_quoting.rs | 2 +- crates/shared/src/trade_finding/mod.rs | 1 - 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/crates/autopilot/src/maintenance.rs b/crates/autopilot/src/maintenance.rs index 44a9c5ac16..1344c6ba67 100644 --- a/crates/autopilot/src/maintenance.rs +++ b/crates/autopilot/src/maintenance.rs @@ -152,7 +152,6 @@ impl Maintenance { self_ .cow_amm_indexer .iter() - .cloned() .map(|indexer| async move { indexer.run_maintenance().await }), ), ) diff --git a/crates/driver/src/domain/mempools.rs b/crates/driver/src/domain/mempools.rs index c70f5ccd46..14e2179009 100644 --- a/crates/driver/src/domain/mempools.rs +++ b/crates/driver/src/domain/mempools.rs @@ -48,19 +48,18 @@ impl Mempools { settlement: &Settlement, submission_deadline: BlockNo, ) -> Result { - let (submission, _remaining_futures) = - select_ok(self.mempools.iter().cloned().map(|mempool| { - async move { - let result = self - .submit(&mempool, solver, settlement, submission_deadline) - .instrument(tracing::info_span!("mempool", kind = mempool.to_string())) - .await; - observe::mempool_executed(&mempool, settlement, &result); - result - } - .boxed() - })) - .await?; + let (submission, _remaining_futures) = select_ok(self.mempools.iter().map(|mempool| { + async move { + let result = self + .submit(mempool, solver, settlement, submission_deadline) + .instrument(tracing::info_span!("mempool", kind = mempool.to_string())) + .await; + observe::mempool_executed(mempool, settlement, &result); + result + } + .boxed() + })) + .await?; Ok(submission.tx_hash) } @@ -373,13 +372,19 @@ pub enum RevertProtection { #[derive(Debug, thiserror::Error)] pub enum Error { - #[error("Mined reverted transaction: {tx_id:?}, block number: {reverted_at_block}")] + #[error( + "Mined reverted transaction: {tx_id:?}, submitted at: {submitted_at_block}, reverted at: \ + {reverted_at_block}" + )] Revert { tx_id: eth::TxId, submitted_at_block: BlockNo, reverted_at_block: BlockNo, }, - #[error("Simulation started reverting during submission, block number: {reverted_at_block}")] + #[error( + "Simulation started reverting during submission, submitted at: {submitted_at_block}, \ + reverted at: {reverted_at_block}" + )] SimulationRevert { submitted_at_block: BlockNo, reverted_at_block: BlockNo, diff --git a/crates/shared/src/order_quoting.rs b/crates/shared/src/order_quoting.rs index e133985f2d..ab6234fa59 100644 --- a/crates/shared/src/order_quoting.rs +++ b/crates/shared/src/order_quoting.rs @@ -263,7 +263,7 @@ pub trait OrderQuoting: Send + Sync { #[derive(Error, Debug)] pub enum CalculateQuoteError { - #[error("sell amount does not cover fee")] + #[error("sell amount does not cover fee: {fee_amount}")] SellAmountDoesNotCoverFee { fee_amount: U256 }, #[error("{estimator_kind:?} estimator failed: {source}")] diff --git a/crates/shared/src/trade_finding/mod.rs b/crates/shared/src/trade_finding/mod.rs index d25483f7bf..182e905a9c 100644 --- a/crates/shared/src/trade_finding/mod.rs +++ b/crates/shared/src/trade_finding/mod.rs @@ -285,7 +285,6 @@ pub fn map_interactions(interactions: &[InteractionData]) -> Vec { pub fn map_interactions_data(interactions: &[Interaction]) -> Vec { interactions .iter() - .cloned() .map(|i| i.to_interaction_data()) .collect() } From 4c63246f40663bed428a56035cb403f505998db3 Mon Sep 17 00:00:00 2001 From: Marcin Szymczak Date: Thu, 11 Dec 2025 17:57:25 +0100 Subject: [PATCH 2/6] Migrate autopilot to alloy --- crates/autopilot/src/database/events.rs | 3 +- .../src/database/onchain_order_events/mod.rs | 32 ++++++++--------- .../domain/competition/winner_selection.rs | 34 ++++++++++--------- crates/autopilot/src/domain/settlement/mod.rs | 5 ++- .../src/domain/settlement/transaction/mod.rs | 16 ++++----- .../settlement/transaction/tokenized.rs | 4 +-- crates/autopilot/src/infra/solvers/mod.rs | 20 +++++------ crates/autopilot/src/run.rs | 2 +- 8 files changed, 56 insertions(+), 60 deletions(-) diff --git a/crates/autopilot/src/database/events.rs b/crates/autopilot/src/database/events.rs index 47138a673b..fabef815ff 100644 --- a/crates/autopilot/src/database/events.rs +++ b/crates/autopilot/src/database/events.rs @@ -9,7 +9,6 @@ use { byte_array::ByteArray, events::{Event, EventIndex, Invalidation, PreSignature, Settlement, Trade}, }, - ethcontract::EventMetadata, ethrpc::alloy::conversions::IntoLegacy, number::conversions::u256_to_big_decimal, std::convert::TryInto, @@ -114,7 +113,7 @@ pub async fn replace_events( Ok(()) } -pub fn meta_to_event_index(meta: &EventMetadata) -> EventIndex { +pub fn meta_to_event_index(meta: ðcontract::EventMetadata) -> EventIndex { EventIndex { block_number: i64::try_from(meta.block_number).unwrap_or(i64::MAX), log_index: i64::try_from(meta.log_index).unwrap_or(i64::MAX), diff --git a/crates/autopilot/src/database/onchain_order_events/mod.rs b/crates/autopilot/src/database/onchain_order_events/mod.rs index 6d7a3b7208..4ea43ab215 100644 --- a/crates/autopilot/src/database/onchain_order_events/mod.rs +++ b/crates/autopilot/src/database/onchain_order_events/mod.rs @@ -27,7 +27,6 @@ use { onchain_broadcasted_orders::{OnchainOrderPlacement, OnchainOrderPlacementError}, orders::{Order, OrderClass, insert_quotes}, }, - ethcontract::H160, ethrpc::{ Web3, alloy::conversions::IntoLegacy, @@ -73,7 +72,7 @@ pub struct OnchainOrderParser { quoter: Arc, custom_onchain_data_parser: Box>, domain_separator: DomainSeparator, - settlement_contract: H160, + settlement_contract: Address, metrics: &'static Metrics, trampoline: HooksTrampoline::Instance, } @@ -89,7 +88,7 @@ where quoter: Arc, custom_onchain_data_parser: Box>, domain_separator: DomainSeparator, - settlement_contract: H160, + settlement_contract: Address, trampoline: HooksTrampoline::Instance, ) -> Self { OnchainOrderParser { @@ -454,7 +453,7 @@ async fn parse_general_onchain_order_placement_data( quoter: &'_ dyn OrderQuoting, order_placement_events_and_quotes_zipped: I, domain_separator: DomainSeparator, - settlement_contract: H160, + settlement_contract: Address, metrics: &'static Metrics, ) -> Vec where @@ -489,7 +488,7 @@ where order_data, signing_scheme, order_uid, - owner.into_legacy(), + owner, settlement_contract, metrics, ); @@ -592,8 +591,8 @@ fn convert_onchain_order_placement( order_data: OrderData, signing_scheme: SigningScheme, order_uid: OrderUid, - owner: H160, - settlement_contract: H160, + owner: Address, + settlement_contract: Address, metrics: &'static Metrics, ) -> (OnchainOrderPlacement, Order) { // eth flow orders are expected to be within the market price so they are @@ -611,7 +610,7 @@ fn convert_onchain_order_placement( let order = database::orders::Order { uid: ByteArray(order_uid.0), - owner: ByteArray(owner.0), + owner: ByteArray(owner.0.0), creation_timestamp: Utc.timestamp_opt(event_timestamp, 0).unwrap(), sell_token: ByteArray(order_data.sell_token.0.0), buy_token: ByteArray(order_data.buy_token.0.0), @@ -625,7 +624,7 @@ fn convert_onchain_order_placement( partially_fillable: order_data.partially_fillable, signature: order_placement.signature.data.to_vec(), signing_scheme: signing_scheme_into(signing_scheme), - settlement_contract: ByteArray(settlement_contract.0), + settlement_contract: ByteArray(settlement_contract.0.0), sell_token_balance: sell_token_source_into(order_data.sell_token_balance), buy_token_balance: buy_token_destination_into(order_data.buy_token_balance), cancellation_timestamp: None, @@ -788,7 +787,6 @@ mod test { alloy::primitives::U256, contracts::alloy::CoWSwapOnchainOrders, database::{byte_array::ByteArray, onchain_broadcasted_orders::OnchainOrderPlacement}, - ethcontract::H160, ethrpc::Web3, model::{ DomainSeparator, @@ -980,7 +978,7 @@ mod test { }, data: Default::default(), }; - let settlement_contract = H160::from([8u8; 20]); + let settlement_contract = Address::repeat_byte(8); let quote = Quote::default(); let order_uid = OrderUid([9u8; 56]); let signing_scheme = SigningScheme::Eip1271; @@ -992,7 +990,7 @@ mod test { order_data, signing_scheme, order_uid, - owner.into_legacy(), + owner, settlement_contract, Metrics::get(), ); @@ -1033,7 +1031,7 @@ mod test { partially_fillable: expected_order_data.partially_fillable, signature: order_placement.signature.data.to_vec(), signing_scheme: signing_scheme_into(SigningScheme::Eip1271), - settlement_contract: ByteArray(settlement_contract.0), + settlement_contract: ByteArray(settlement_contract.0.into()), sell_token_balance: sell_token_source_into(expected_order_data.sell_token_balance), buy_token_balance: buy_token_destination_into(expected_order_data.buy_token_balance), cancellation_timestamp: None, @@ -1091,7 +1089,7 @@ mod test { }, data: Default::default(), }; - let settlement_contract = H160::from([8u8; 20]); + let settlement_contract = Address::repeat_byte(8); let quote = Quote { sell_amount, buy_amount: buy_amount / U256::from(2), @@ -1106,7 +1104,7 @@ mod test { order_data, signing_scheme, order_uid, - owner.into_legacy(), + owner, settlement_contract, Metrics::get(), ); @@ -1147,7 +1145,7 @@ mod test { partially_fillable: expected_order_data.partially_fillable, signature: order_placement.signature.data.to_vec(), signing_scheme: signing_scheme_into(SigningScheme::Eip1271), - settlement_contract: ByteArray(settlement_contract.0), + settlement_contract: ByteArray(settlement_contract.0.into()), sell_token_balance: sell_token_source_into(expected_order_data.sell_token_balance), buy_token_balance: buy_token_destination_into(expected_order_data.buy_token_balance), cancellation_timestamp: None, @@ -1269,7 +1267,7 @@ mod test { quoter: Arc::new(order_quoter), custom_onchain_data_parser: Box::new(custom_onchain_order_parser), domain_separator, - settlement_contract: H160::zero(), + settlement_contract: Address::ZERO, metrics: Metrics::get(), }; let result = onchain_order_parser diff --git a/crates/autopilot/src/domain/competition/winner_selection.rs b/crates/autopilot/src/domain/competition/winner_selection.rs index b94ecb6a91..b81d46b106 100644 --- a/crates/autopilot/src/domain/competition/winner_selection.rs +++ b/crates/autopilot/src/domain/competition/winner_selection.rs @@ -476,9 +476,7 @@ mod tests { }, infra::Driver, }, - alloy::primitives::{U256, address}, - ethcontract::H160, - ethrpc::alloy::conversions::IntoAlloy, + alloy::primitives::{Address, U160, U256, address}, hex_literal::hex, number::serialization::HexOrDecimalU256, serde::Deserialize, @@ -1101,7 +1099,7 @@ mod tests { #[serde_as] #[derive(Deserialize, Debug)] struct TestCase { - pub tokens: Vec<(String, H160)>, + pub tokens: Vec<(String, Address)>, pub auction: TestAuction, pub solutions: HashMap, pub expected_fair_solutions: Vec, @@ -1119,7 +1117,12 @@ mod tests { let arbitrator = create_test_arbitrator(); // map (token id -> token address) for later reference during the test - let token_map: HashMap = self.tokens.iter().cloned().collect(); + let token_map: HashMap = self + .tokens + .iter() + .cloned() + .map(|(id, address)| (id, address.into())) + .collect(); // map (order id -> order) for later reference during the test let order_map: HashMap = self @@ -1158,7 +1161,7 @@ mod tests { prices .iter() .map(|(token_id, price)| { - let token_address = token_map.get(token_id).unwrap().into_alloy().into(); + let token_address = *token_map.get(token_id).unwrap(); let price = create_price(*price); (token_address, price) }) @@ -1228,8 +1231,8 @@ mod tests { let reference_scores = arbitrator.compute_reference_scores(&ranking); assert_eq!(reference_scores.len(), self.expected_reference_scores.len()); for (solver_id, expected_score) in &self.expected_reference_scores { - let solver_address = solver_map.get(solver_id).unwrap().into_alloy(); - let score = reference_scores.get(&solver_address).unwrap(); + let solver_address = solver_map.get(solver_id).unwrap(); + let score = reference_scores.get(solver_address).unwrap(); assert_eq!(score.0, eth::Ether(*expected_score)) } } @@ -1279,15 +1282,15 @@ mod tests { } } - fn address(id: u64) -> H160 { - H160::from_low_u64_le(id) + fn address(id: u64) -> Address { + Address::from(U160::from(id)) } fn create_order( uid: u64, - sell_token: H160, + sell_token: TokenAddress, sell_amount: eth::U256, - buy_token: H160, + buy_token: TokenAddress, buy_amount: eth::U256, side: order::Side, ) -> Order { @@ -1295,11 +1298,11 @@ mod tests { uid: create_order_uid(uid), sell: eth::Asset { amount: sell_amount.into(), - token: sell_token.into_alloy().into(), + token: sell_token, }, buy: eth::Asset { amount: buy_amount.into(), - token: buy_token.into_alloy().into(), + token: buy_token, }, protocol_fees: vec![], side, @@ -1373,7 +1376,7 @@ mod tests { async fn create_solution( solution_id: u64, - solver_address: H160, + solver_address: Address, trades: Vec<(OrderUid, TradedOrder)>, prices: Option>, ) -> Participant { @@ -1389,7 +1392,6 @@ mod tests { }); let trade_order_map: HashMap = trades.into_iter().collect(); - let solver_address = solver_address.into_alloy(); let solution = Solution::new( solution_id, diff --git a/crates/autopilot/src/domain/settlement/mod.rs b/crates/autopilot/src/domain/settlement/mod.rs index 0bdedd6430..f07a2b103b 100644 --- a/crates/autopilot/src/domain/settlement/mod.rs +++ b/crates/autopilot/src/domain/settlement/mod.rs @@ -357,8 +357,7 @@ mod tests { eth, settlement::{OrderMatchKey, trade_to_key}, }, - alloy::primitives::address, - ethcontract::BlockId, + alloy::primitives::{BlockNumber, address}, hex_literal::hex, std::collections::{HashMap, HashSet}, }; @@ -371,7 +370,7 @@ mod tests { async fn is_valid_solver( &self, _prospective_solver: eth::Address, - _block: BlockId, + _block: BlockNumber, ) -> Result { return Ok(true); } diff --git a/crates/autopilot/src/domain/settlement/transaction/mod.rs b/crates/autopilot/src/domain/settlement/transaction/mod.rs index bb1f377c6f..27fb19c4ba 100644 --- a/crates/autopilot/src/domain/settlement/transaction/mod.rs +++ b/crates/autopilot/src/domain/settlement/transaction/mod.rs @@ -3,10 +3,8 @@ use { boundary, domain::{self, auction::order, eth}, }, - alloy::sol_types::SolCall, + alloy::{primitives::BlockNumber, sol_types::SolCall}, contracts::alloy::{GPv2AllowListAuthentication, GPv2Settlement}, - ethcontract::BlockId, - ethrpc::alloy::conversions::{IntoAlloy, IntoLegacy}, std::collections::HashSet, }; @@ -20,7 +18,7 @@ pub trait Authenticator { async fn is_valid_solver( &self, prospective_solver: eth::Address, - block: BlockId, + block: BlockNumber, ) -> Result; } @@ -29,7 +27,7 @@ impl Authenticator for GPv2AllowListAuthentication::Instance { async fn is_valid_solver( &self, prospective_solver: eth::Address, - block: BlockId, + block: BlockNumber, ) -> Result { // It's technically possible that some time passes between the transaction // happening and us indexing it. If the transaction was malicious and @@ -38,7 +36,7 @@ impl Authenticator for GPv2AllowListAuthentication::Instance { // underlying call needs to happen on the same block the transaction happened. Ok(self .isSolver(prospective_solver) - .block(block.into_alloy()) + .block(block.into()) .call() .await .map_err(Error::Authentication)?) @@ -84,7 +82,7 @@ impl Transaction { // In cases of solvers using EOA to submit solutions, the address is the sender // of the transaction. In cases of solvers using a smart contract to // submit solutions, the address is deduced from the calldata. - let block = BlockId::Number(transaction.block.0.into()); + let block = BlockNumber::from(transaction.block.0); let solver = find_solver_address(authenticator, callers, block).await?; /// Number of bytes that may be appended to the calldata to store an @@ -121,7 +119,7 @@ impl Transaction { let mut trades = Vec::with_capacity(decoded_trades.len()); for trade in decoded_trades { - let flags = tokenized::TradeFlags(trade.flags.into_legacy()); + let flags = tokenized::TradeFlags(trade.flags); let sell_token_index = usize::try_from(trade.sellTokenIndex) .expect("SC was able to look up this index"); let buy_token_index = usize::try_from(trade.buyTokenIndex) @@ -210,7 +208,7 @@ fn is_settlement_trace(trace: ð::CallFrame, settlement_contract: eth::Address async fn find_solver_address( authenticator: &impl Authenticator, callers: Vec, - block: BlockId, + block: BlockNumber, ) -> Result, Error> { let mut checked_callers = HashSet::new(); for caller in &callers { diff --git a/crates/autopilot/src/domain/settlement/transaction/tokenized.rs b/crates/autopilot/src/domain/settlement/transaction/tokenized.rs index d2774125c7..fcaa72893f 100644 --- a/crates/autopilot/src/domain/settlement/transaction/tokenized.rs +++ b/crates/autopilot/src/domain/settlement/transaction/tokenized.rs @@ -3,9 +3,9 @@ use { boundary, domain::{self, auction::order, eth}, }, + alloy::primitives::U256, app_data::AppDataHash, contracts::alloy::GPv2Settlement, - ethcontract::U256, ethrpc::alloy::conversions::IntoLegacy, }; @@ -15,7 +15,7 @@ pub fn order_uid( tokens: &[alloy::primitives::Address], domain_separator: ð::DomainSeparator, ) -> Result { - let flags = TradeFlags(trade.flags.into_legacy()); + let flags = TradeFlags(trade.flags); let signature = crate::boundary::Signature::from_bytes(flags.signing_scheme(), &trade.signature.0) .map_err(error::Uid::Signature)?; diff --git a/crates/autopilot/src/infra/solvers/mod.rs b/crates/autopilot/src/infra/solvers/mod.rs index ae75016437..4620625e36 100644 --- a/crates/autopilot/src/infra/solvers/mod.rs +++ b/crates/autopilot/src/infra/solvers/mod.rs @@ -1,9 +1,9 @@ use { self::dto::{reveal, settle, solve}, crate::{arguments::Account, domain::eth, infra::solvers::dto::notify, util}, + alloy::signers::{Signer, aws::AwsSigner}, anyhow::{Context, Result, anyhow}, chrono::{DateTime, Utc}, - ethrpc::alloy::conversions::IntoAlloy, observe::tracing::tracing_headers, reqwest::{Client, StatusCode}, std::{sync::Arc, time::Duration}, @@ -48,15 +48,15 @@ impl Driver { ) -> Result { let submission_address = match submission_account { Account::Kms(key_id) => { - let config = ethcontract::aws_config::load_from_env().await; - let account = - ethcontract::transaction::kms::Account::new((&config).into(), &key_id.0) - .await - .map_err(|_| { - tracing::error!(?name, ?key_id, "Unable to load KMS account"); - Error::UnableToLoadKmsAccount - })?; - account.public_address().into_alloy() + let config = alloy::signers::aws::aws_config::load_from_env().await; + let client = alloy::signers::aws::aws_sdk_kms::Client::new(&config); + let account = AwsSigner::new(client, key_id.0.clone(), None) + .await + .map_err(|_| { + tracing::error!(?name, ?key_id, "Unable to load KMS account"); + Error::UnableToLoadKmsAccount + })?; + account.address() } Account::Address(address) => address, }; diff --git a/crates/autopilot/src/run.rs b/crates/autopilot/src/run.rs index daea7346b5..03b857e817 100644 --- a/crates/autopilot/src/run.rs +++ b/crates/autopilot/src/run.rs @@ -607,7 +607,7 @@ pub async fn run(args: Arguments, shutdown_controller: ShutdownController) { quoter.clone(), Box::new(custom_ethflow_order_parser), DomainSeparator::new(chain_id, *eth.contracts().settlement().address()), - eth.contracts().settlement().address().into_legacy(), + *eth.contracts().settlement().address(), eth.contracts().trampoline().clone(), ); From d8794f5599c6a713007ccf0ec9e08a9fd3fcaab4 Mon Sep 17 00:00:00 2001 From: Marcin Szymczak Date: Fri, 12 Dec 2025 15:28:54 +0100 Subject: [PATCH 3/6] Address comments BlockNumber -> BlockId --- crates/autopilot/src/domain/settlement/mod.rs | 4 ++-- .../src/domain/settlement/transaction/mod.rs | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/autopilot/src/domain/settlement/mod.rs b/crates/autopilot/src/domain/settlement/mod.rs index f07a2b103b..b433dd434c 100644 --- a/crates/autopilot/src/domain/settlement/mod.rs +++ b/crates/autopilot/src/domain/settlement/mod.rs @@ -357,7 +357,7 @@ mod tests { eth, settlement::{OrderMatchKey, trade_to_key}, }, - alloy::primitives::{BlockNumber, address}, + alloy::{eips::BlockId, primitives::address}, hex_literal::hex, std::collections::{HashMap, HashSet}, }; @@ -370,7 +370,7 @@ mod tests { async fn is_valid_solver( &self, _prospective_solver: eth::Address, - _block: BlockNumber, + _block: BlockId, ) -> Result { return Ok(true); } diff --git a/crates/autopilot/src/domain/settlement/transaction/mod.rs b/crates/autopilot/src/domain/settlement/transaction/mod.rs index 27fb19c4ba..1065152de4 100644 --- a/crates/autopilot/src/domain/settlement/transaction/mod.rs +++ b/crates/autopilot/src/domain/settlement/transaction/mod.rs @@ -3,7 +3,7 @@ use { boundary, domain::{self, auction::order, eth}, }, - alloy::{primitives::BlockNumber, sol_types::SolCall}, + alloy::{eips::BlockId, sol_types::SolCall}, contracts::alloy::{GPv2AllowListAuthentication, GPv2Settlement}, std::collections::HashSet, }; @@ -18,7 +18,7 @@ pub trait Authenticator { async fn is_valid_solver( &self, prospective_solver: eth::Address, - block: BlockNumber, + block: BlockId, ) -> Result; } @@ -27,7 +27,7 @@ impl Authenticator for GPv2AllowListAuthentication::Instance { async fn is_valid_solver( &self, prospective_solver: eth::Address, - block: BlockNumber, + block: BlockId, ) -> Result { // It's technically possible that some time passes between the transaction // happening and us indexing it. If the transaction was malicious and @@ -36,7 +36,7 @@ impl Authenticator for GPv2AllowListAuthentication::Instance { // underlying call needs to happen on the same block the transaction happened. Ok(self .isSolver(prospective_solver) - .block(block.into()) + .block(block) .call() .await .map_err(Error::Authentication)?) @@ -82,7 +82,7 @@ impl Transaction { // In cases of solvers using EOA to submit solutions, the address is the sender // of the transaction. In cases of solvers using a smart contract to // submit solutions, the address is deduced from the calldata. - let block = BlockNumber::from(transaction.block.0); + let block = BlockId::from(transaction.block.0); let solver = find_solver_address(authenticator, callers, block).await?; /// Number of bytes that may be appended to the calldata to store an @@ -208,7 +208,7 @@ fn is_settlement_trace(trace: ð::CallFrame, settlement_contract: eth::Address async fn find_solver_address( authenticator: &impl Authenticator, callers: Vec, - block: BlockNumber, + block: BlockId, ) -> Result, Error> { let mut checked_callers = HashSet::new(); for caller in &callers { From dc66b2b419331cfabac1616752c78ebf8c74f74c Mon Sep 17 00:00:00 2001 From: Marcin Szymczak Date: Mon, 15 Dec 2025 11:42:12 +0100 Subject: [PATCH 4/6] Clippy fix --- crates/autopilot/src/domain/settlement/transaction/tokenized.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/autopilot/src/domain/settlement/transaction/tokenized.rs b/crates/autopilot/src/domain/settlement/transaction/tokenized.rs index 6b4dc75872..c66787b32c 100644 --- a/crates/autopilot/src/domain/settlement/transaction/tokenized.rs +++ b/crates/autopilot/src/domain/settlement/transaction/tokenized.rs @@ -6,7 +6,6 @@ use { alloy::primitives::U256, app_data::AppDataHash, contracts::alloy::GPv2Settlement, - ethrpc::alloy::conversions::IntoLegacy, }; /// Recover order uid from order data and signature From bfb6e57af1308d861afe74089698cae47b438093 Mon Sep 17 00:00:00 2001 From: Marcin Szymczak Date: Mon, 15 Dec 2025 11:48:43 +0100 Subject: [PATCH 5/6] Clippy on latest Rust ver --- crates/autopilot/src/run.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/crates/autopilot/src/run.rs b/crates/autopilot/src/run.rs index c982d7684e..0b46a418a4 100644 --- a/crates/autopilot/src/run.rs +++ b/crates/autopilot/src/run.rs @@ -8,8 +8,7 @@ use { onchain_order_events::{ OnchainOrderParser, ethflow_events::{ - EthFlowOnchainOrderParser, - determine_ethflow_indexing_start, + EthFlowOnchainOrderParser, determine_ethflow_indexing_start, determine_ethflow_refund_indexing_start, }, event_retriever::CoWSwapOnchainOrdersContract, @@ -28,11 +27,7 @@ use { chain::Chain, clap::Parser, contracts::alloy::{BalancerV2Vault, GPv2Settlement, IUniswapV3Factory, WETH9}, - ethrpc::{ - Web3, - alloy::conversions::IntoLegacy, - block_stream::block_number_to_block_number_hash, - }, + ethrpc::{Web3, block_stream::block_number_to_block_number_hash}, futures::StreamExt, model::DomainSeparator, num::ToPrimitive, From c6d8636e1cb16635cc2c22a7f6bd9a9f658d2523 Mon Sep 17 00:00:00 2001 From: Marcin Szymczak Date: Mon, 15 Dec 2025 12:05:45 +0100 Subject: [PATCH 6/6] fmt --- crates/autopilot/src/run.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/autopilot/src/run.rs b/crates/autopilot/src/run.rs index 0b46a418a4..be521e3a9d 100644 --- a/crates/autopilot/src/run.rs +++ b/crates/autopilot/src/run.rs @@ -8,7 +8,8 @@ use { onchain_order_events::{ OnchainOrderParser, ethflow_events::{ - EthFlowOnchainOrderParser, determine_ethflow_indexing_start, + EthFlowOnchainOrderParser, + determine_ethflow_indexing_start, determine_ethflow_refund_indexing_start, }, event_retriever::CoWSwapOnchainOrdersContract,