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§

Source§

impl WithdrawalsProvider for MockEthProvider

Available on crate feature test-utils only.
Source§

impl WithdrawalsProvider for NoopProvider

Available on crate feature test-utils only.
Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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