From daf4d11939e2391d934e1022f5960b92063484cc Mon Sep 17 00:00:00 2001 From: Filipe Azevedo Date: Mon, 10 Jun 2024 09:47:24 +0100 Subject: [PATCH] rebase clean --- chain/ethereum/src/ethereum_adapter.rs | 37 -------------------------- 1 file changed, 37 deletions(-) diff --git a/chain/ethereum/src/ethereum_adapter.rs b/chain/ethereum/src/ethereum_adapter.rs index f57855c0c06..30df666daaf 100644 --- a/chain/ethereum/src/ethereum_adapter.rs +++ b/chain/ethereum/src/ethereum_adapter.rs @@ -129,43 +129,6 @@ impl EthereumAdapter { } } - pub async fn check_block_receipt_support( - web3: Arc>, - provider: &str, - supports_eip_1898: bool, - call_only: bool, - logger: &Logger, - ) -> Result<(), Error> { - if call_only { - warn!(logger, "Call only providers not supported"; "provider" => provider); - return Err(anyhow!("Call only providers not supported")); - } - - if !supports_eip_1898 { - warn!(logger, "EIP-1898 not supported"; "provider" => provider); - return Err(anyhow!("EIP-1898 not supported")); - } - - // Fetch block receipts from the provider for the latest block. - let block_receipts_result = web3 - .eth() - .block_receipts(BlockId::Number(Web3BlockNumber::Latest)) - .await; - - // Determine if the provider supports block receipts based on the fetched result. - match block_receipts_result { - Ok(Some(receipts)) if !receipts.is_empty() => Ok(()), - Ok(_) => { - warn!(logger, "Block receipts are empty"; "provider" => provider); - Err(anyhow!("Block receipts are empty")) - } - Err(err) => { - warn!(logger, "Failed to fetch block receipts"; "provider" => provider, "error" => err.to_string()); - Err(anyhow!("Failed to fetch block receipts: {}", err)) - } - } - } - async fn traces( self, logger: Logger,