reth_provider

Trait ReceiptProvider

pub trait ReceiptProvider: Send + Sync {
    // Required methods
    fn receipt(&self, id: u64) -> Result<Option<Receipt>, ProviderError>;
    fn receipt_by_hash(
        &self,
        hash: FixedBytes<32>,
    ) -> Result<Option<Receipt>, ProviderError>;
    fn receipts_by_block(
        &self,
        block: HashOrNumber,
    ) -> Result<Option<Vec<Receipt>>, ProviderError>;
    fn receipts_by_tx_range(
        &self,
        range: impl RangeBounds<u64>,
    ) -> Result<Vec<Receipt>, ProviderError>;
}
Expand description

Client trait for fetching [Receipt] data .

Required Methods§

fn receipt(&self, id: u64) -> Result<Option<Receipt>, ProviderError>

Get receipt by transaction number

Returns None if the transaction is not found.

fn receipt_by_hash( &self, hash: FixedBytes<32>, ) -> Result<Option<Receipt>, ProviderError>

Get receipt by transaction hash.

Returns None if the transaction is not found.

fn receipts_by_block( &self, block: HashOrNumber, ) -> Result<Option<Vec<Receipt>>, ProviderError>

Get receipts by block num or hash.

Returns None if the block is not found.

fn receipts_by_tx_range( &self, range: impl RangeBounds<u64>, ) -> Result<Vec<Receipt>, ProviderError>

Get receipts by tx range.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl<'a, T> ReceiptProvider for &'a T
where T: 'a + ReceiptProvider + ?Sized, &'a T: Send + Sync,

§

fn receipt(&self, id: u64) -> Result<Option<Receipt>, ProviderError>

§

fn receipt_by_hash( &self, hash: FixedBytes<32>, ) -> Result<Option<Receipt>, ProviderError>

§

fn receipts_by_block( &self, block: HashOrNumber, ) -> Result<Option<Vec<Receipt>>, ProviderError>

§

fn receipts_by_tx_range( &self, range: impl RangeBounds<u64>, ) -> Result<Vec<Receipt>, ProviderError>

§

impl<T> ReceiptProvider for Arc<T>
where T: ReceiptProvider + ?Sized, Arc<T>: Send + Sync,

§

fn receipt(&self, id: u64) -> Result<Option<Receipt>, ProviderError>

§

fn receipt_by_hash( &self, hash: FixedBytes<32>, ) -> Result<Option<Receipt>, ProviderError>

§

fn receipts_by_block( &self, block: HashOrNumber, ) -> Result<Option<Vec<Receipt>>, ProviderError>

§

fn receipts_by_tx_range( &self, range: impl RangeBounds<u64>, ) -> Result<Vec<Receipt>, ProviderError>

Implementors§

Source§

impl ReceiptProvider for MockEthProvider

Available on crate feature test-utils only.
Source§

impl ReceiptProvider for NoopProvider

Available on crate feature test-utils only.
Source§

impl<N: ProviderNodeTypes> ReceiptProvider for BlockchainProvider2<N>

Source§

impl<N: ProviderNodeTypes> ReceiptProvider for BlockchainProvider<N>

Source§

impl<N: ProviderNodeTypes> ReceiptProvider for ConsistentProvider<N>

Source§

impl<N: ProviderNodeTypes> ReceiptProvider for ProviderFactory<N>

Source§

impl<N: NodePrimitives> ReceiptProvider for StaticFileJarProvider<'_, N>

Source§

impl<N: NodePrimitives> ReceiptProvider for StaticFileProvider<N>

Source§

impl<TX: DbTx + 'static, N: NodeTypes<ChainSpec: EthereumHardforks>> ReceiptProvider for DatabaseProvider<TX, N>