reth_storage_api/withdrawals.rs
1use alloy_eips::{eip4895::Withdrawals, BlockHashOrNumber};
2use reth_storage_errors::provider::ProviderResult;
3
4/// Client trait for fetching [`alloy_eips::eip4895::Withdrawal`] related data.
5#[auto_impl::auto_impl(&, Arc)]
6pub trait WithdrawalsProvider: Send + Sync {
7 /// Get withdrawals by block id.
8 fn withdrawals_by_block(
9 &self,
10 id: BlockHashOrNumber,
11 timestamp: u64,
12 ) -> ProviderResult<Option<Withdrawals>>;
13}