reth_provider

Trait WithdrawalsProvider

pub trait WithdrawalsProvider: Send + Sync {
    // Required methods
    fn withdrawals_by_block(
        &self,
        id: HashOrNumber,
        timestamp: u64,
    ) -> Result<Option<Withdrawals>, ProviderError>;
    fn latest_withdrawal(&self) -> Result<Option<Withdrawal>, ProviderError>;
}
Expand description

Client trait for fetching [Withdrawal] related data.

Required Methods§

fn withdrawals_by_block( &self, id: HashOrNumber, timestamp: u64, ) -> Result<Option<Withdrawals>, ProviderError>

Get withdrawals by block id.

fn latest_withdrawal(&self) -> Result<Option<Withdrawal>, ProviderError>

Get latest withdrawal from this block or earlier .

Implementations on Foreign Types§

§

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

§

fn withdrawals_by_block( &self, id: HashOrNumber, timestamp: u64, ) -> Result<Option<Withdrawals>, ProviderError>

§

fn latest_withdrawal(&self) -> Result<Option<Withdrawal>, ProviderError>

§

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

§

fn withdrawals_by_block( &self, id: HashOrNumber, timestamp: u64, ) -> Result<Option<Withdrawals>, ProviderError>

§

fn latest_withdrawal(&self) -> Result<Option<Withdrawal>, ProviderError>

Implementors§