chore(deps): bump alloy (#10537)

Co-authored-by: Oliver <onbjerg@users.noreply.github.com>
This commit is contained in:
Arsenii Kulikov
2024-08-29 17:23:04 +04:00
committed by GitHub
parent 019ec727a2
commit ec5ce21965
50 changed files with 530 additions and 580 deletions

View File

@ -47,7 +47,7 @@ pub trait BlockProvider: Send + Sync + 'static {
None => return Ok(B256::default()),
};
let block = self.get_block(previous_block_number).await?;
block.header.hash.ok_or_else(|| eyre::eyre!("previous block does not have hash"))
Ok(block.header.hash)
}
}
}
@ -198,13 +198,13 @@ pub fn block_to_execution_payload_v3(block: Block) -> ExecutionNewPayload {
receipts_root: block.header.receipts_root,
logs_bloom: block.header.logs_bloom,
prev_randao: block.header.mix_hash.unwrap(),
block_number: block.header.number.unwrap(),
block_number: block.header.number,
gas_limit: block.header.gas_limit.try_into().unwrap(),
gas_used: block.header.gas_used.try_into().unwrap(),
timestamp: block.header.timestamp,
extra_data: block.header.extra_data.clone(),
base_fee_per_gas: block.header.base_fee_per_gas.unwrap().try_into().unwrap(),
block_hash: block.header.hash.unwrap(),
block_hash: block.header.hash,
transactions: transactions
.into_iter()
.map(|tx| {

View File

@ -63,7 +63,7 @@ impl BlockProvider for EtherscanBlockProvider {
continue
}
};
let block_number = block.header.number.unwrap();
let block_number = block.header.number;
if Some(block_number) == last_block_number {
continue;
}

View File

@ -33,7 +33,7 @@ impl BlockProvider for RpcBlockProvider {
while let Some(block) = stream.next().await {
let full_block = ws_provider
.get_block_by_hash(block.header.hash.unwrap(), BlockTransactionsKind::Full)
.get_block_by_hash(block.header.hash, BlockTransactionsKind::Full)
.await
.expect("failed to get block")
.expect("block not found");