diff --git a/auction-server/src/auction.rs b/auction-server/src/auction.rs index 82f98b4c..3f35324c 100644 --- a/auction-server/src/auction.rs +++ b/auction-server/src/auction.rs @@ -49,6 +49,7 @@ use { Bytes, TransactionReceipt, TransactionRequest, + H160, U256, }, }, @@ -90,6 +91,16 @@ impl TryFrom for Provider { } } +impl From<(H160, Bytes, U256)> for MulticallData { + fn from(x: (H160, Bytes, U256)) -> Self { + MulticallData { + target_contract: x.0, + target_calldata: x.1, + bid_amount: x.2, + } + } +} + pub fn get_simulation_call( relayer: Address, provider: Provider, @@ -232,7 +243,7 @@ pub async fn run_submission_loop(store: Arc) -> Result<()> { chain_store.config.clone(), chain_store.network_id, permission_key.clone(), - winner_bids.iter().map(|b| MulticallData{target_contract: b.target_contract, target_calldata: b.target_calldata.clone(), bid_amount: b.bid_amount }).collect() + winner_bids.iter().map(|b| MulticallData::from((b.target_contract, b.target_calldata.clone(), b.bid_amount))).collect() ) .await; match submission { @@ -298,11 +309,11 @@ pub async fn handle_bid(store: Arc, bid: Bid) -> result::Result