Trait reth::core::rpc::api::clients::OtterscanClient

source ·
pub trait OtterscanClient: ClientT {
Show 13 methods // Provided methods fn get_header_by_number<'life0, 'async_trait>( &'life0 self, block_number: u64, ) -> Pin<Box<dyn Future<Output = Result<Option<Header>, Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: Sync + 'async_trait { ... } fn has_code<'life0, 'async_trait>( &'life0 self, address: Address, block_number: Option<BlockId>, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: Sync + 'async_trait { ... } fn get_api_level<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: Sync + 'async_trait { ... } fn get_internal_operations<'life0, 'async_trait>( &'life0 self, tx_hash: FixedBytes<32>, ) -> Pin<Box<dyn Future<Output = Result<Vec<InternalOperation>, Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: Sync + 'async_trait { ... } fn get_transaction_error<'life0, 'async_trait>( &'life0 self, tx_hash: FixedBytes<32>, ) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: Sync + 'async_trait { ... } fn trace_transaction<'life0, 'async_trait>( &'life0 self, tx_hash: FixedBytes<32>, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TraceEntry>>, Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: Sync + 'async_trait { ... } fn get_block_details<'life0, 'async_trait>( &'life0 self, block_number: u64, ) -> Pin<Box<dyn Future<Output = Result<Option<BlockDetails>, Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: Sync + 'async_trait { ... } fn get_block_details_by_hash<'life0, 'async_trait>( &'life0 self, block_hash: FixedBytes<32>, ) -> Pin<Box<dyn Future<Output = Result<Option<BlockDetails>, Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: Sync + 'async_trait { ... } fn get_block_transactions<'life0, 'async_trait>( &'life0 self, block_number: u64, page_number: usize, page_size: usize, ) -> Pin<Box<dyn Future<Output = Result<OtsBlockTransactions, Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: Sync + 'async_trait { ... } fn search_transactions_before<'life0, 'async_trait>( &'life0 self, address: Address, block_number: u64, page_size: usize, ) -> Pin<Box<dyn Future<Output = Result<TransactionsWithReceipts, Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: Sync + 'async_trait { ... } fn search_transactions_after<'life0, 'async_trait>( &'life0 self, address: Address, block_number: u64, page_size: usize, ) -> Pin<Box<dyn Future<Output = Result<TransactionsWithReceipts, Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: Sync + 'async_trait { ... } fn get_transaction_by_sender_and_nonce<'life0, 'async_trait>( &'life0 self, sender: Address, nonce: u64, ) -> Pin<Box<dyn Future<Output = Result<Option<FixedBytes<32>>, Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: Sync + 'async_trait { ... } fn get_contract_creator<'life0, 'async_trait>( &'life0 self, address: Address, ) -> Pin<Box<dyn Future<Output = Result<Option<ContractCreator>, Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: Sync + 'async_trait { ... }
}
Available on crate feature client only.
Expand description

Client implementation for the Otterscan RPC API.

Provided Methods§

source

fn get_header_by_number<'life0, 'async_trait>( &'life0 self, block_number: u64, ) -> Pin<Box<dyn Future<Output = Result<Option<Header>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Sync + 'async_trait,

Get the block header by block number, required by otterscan. Otterscan currently requires this endpoint, used as:

  1. check if the node is Erigon or not
  2. get block header instead of the full block

Ref: https://github.com/otterscan/otterscan/blob/071d8c55202badf01804f6f8d53ef9311d4a9e47/src/useProvider.ts#L71

source

fn has_code<'life0, 'async_trait>( &'life0 self, address: Address, block_number: Option<BlockId>, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Sync + 'async_trait,

Check if a certain address contains a deployed code.

source

fn get_api_level<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Sync + 'async_trait,

Very simple API versioning scheme. Every time we add a new capability, the number is incremented. This allows for Otterscan to check if the node contains all API it needs.

source

fn get_internal_operations<'life0, 'async_trait>( &'life0 self, tx_hash: FixedBytes<32>, ) -> Pin<Box<dyn Future<Output = Result<Vec<InternalOperation>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Sync + 'async_trait,

Return the internal ETH transfers inside a transaction.

source

fn get_transaction_error<'life0, 'async_trait>( &'life0 self, tx_hash: FixedBytes<32>, ) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Sync + 'async_trait,

Given a transaction hash, returns its raw revert reason.

source

fn trace_transaction<'life0, 'async_trait>( &'life0 self, tx_hash: FixedBytes<32>, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TraceEntry>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Sync + 'async_trait,

Extract all variations of calls, contract creation and self-destructs and returns a call tree.

source

fn get_block_details<'life0, 'async_trait>( &'life0 self, block_number: u64, ) -> Pin<Box<dyn Future<Output = Result<Option<BlockDetails>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Sync + 'async_trait,

Tailor-made and expanded version of eth_getBlockByNumber for block details page in Otterscan.

source

fn get_block_details_by_hash<'life0, 'async_trait>( &'life0 self, block_hash: FixedBytes<32>, ) -> Pin<Box<dyn Future<Output = Result<Option<BlockDetails>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Sync + 'async_trait,

Tailor-made and expanded version of eth_getBlockByHash for block details page in Otterscan.

source

fn get_block_transactions<'life0, 'async_trait>( &'life0 self, block_number: u64, page_number: usize, page_size: usize, ) -> Pin<Box<dyn Future<Output = Result<OtsBlockTransactions, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Sync + 'async_trait,

Get paginated transactions for a certain block. Also remove some verbose fields like logs.

source

fn search_transactions_before<'life0, 'async_trait>( &'life0 self, address: Address, block_number: u64, page_size: usize, ) -> Pin<Box<dyn Future<Output = Result<TransactionsWithReceipts, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Sync + 'async_trait,

Gets paginated inbound/outbound transaction calls for a certain address.

source

fn search_transactions_after<'life0, 'async_trait>( &'life0 self, address: Address, block_number: u64, page_size: usize, ) -> Pin<Box<dyn Future<Output = Result<TransactionsWithReceipts, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Sync + 'async_trait,

Gets paginated inbound/outbound transaction calls for a certain address.

source

fn get_transaction_by_sender_and_nonce<'life0, 'async_trait>( &'life0 self, sender: Address, nonce: u64, ) -> Pin<Box<dyn Future<Output = Result<Option<FixedBytes<32>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Sync + 'async_trait,

Gets the transaction hash for a certain sender address, given its nonce.

source

fn get_contract_creator<'life0, 'async_trait>( &'life0 self, address: Address, ) -> Pin<Box<dyn Future<Output = Result<Option<ContractCreator>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Sync + 'async_trait,

Gets the transaction hash and the address who created a contract.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<TypeJsonRpseeInteral> OtterscanClient for TypeJsonRpseeInteral
where TypeJsonRpseeInteral: ClientT,