mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-11 07:25:09 -05:00
20 lines
586 B
Rust
20 lines
586 B
Rust
use alloy_eips::{
|
|
eip4895::{Withdrawal, Withdrawals},
|
|
BlockHashOrNumber,
|
|
};
|
|
use reth_storage_errors::provider::ProviderResult;
|
|
|
|
/// Client trait for fetching [Withdrawal] related data.
|
|
#[auto_impl::auto_impl(&, Arc)]
|
|
pub trait WithdrawalsProvider: Send + Sync {
|
|
/// Get withdrawals by block id.
|
|
fn withdrawals_by_block(
|
|
&self,
|
|
id: BlockHashOrNumber,
|
|
timestamp: u64,
|
|
) -> ProviderResult<Option<Withdrawals>>;
|
|
|
|
/// Get latest withdrawal from this block or earlier .
|
|
fn latest_withdrawal(&self) -> ProviderResult<Option<Withdrawal>>;
|
|
}
|