Skip to main content

HistoryReader

Trait HistoryReader 

Source
pub trait HistoryReader: Send {
    // Required methods
    fn account_history_info(
        &self,
        address: Address,
        block_number: u64,
        lowest_available_block_number: Option<u64>,
    ) -> Result<HistoryInfo, ProviderError>;
    fn storage_history_info(
        &self,
        address: Address,
        storage_key: FixedBytes<32>,
        block_number: u64,
        lowest_available_block_number: Option<u64>,
    ) -> Result<HistoryInfo, ProviderError>;
}
Expand description

Reads account and storage history indices.

Required Methods§

Source

fn account_history_info( &self, address: Address, block_number: u64, lowest_available_block_number: Option<u64>, ) -> Result<HistoryInfo, ProviderError>

Looks up an account’s historical storage location.

Source

fn storage_history_info( &self, address: Address, storage_key: FixedBytes<32>, block_number: u64, lowest_available_block_number: Option<u64>, ) -> Result<HistoryInfo, ProviderError>

Looks up a storage slot’s historical storage location.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

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

Source§

fn account_history_info( &self, address: Address, block_number: u64, lowest_available_block_number: Option<u64>, ) -> Result<HistoryInfo, ProviderError>

Source§

fn storage_history_info( &self, address: Address, storage_key: FixedBytes<32>, block_number: u64, lowest_available_block_number: Option<u64>, ) -> Result<HistoryInfo, ProviderError>

Source§

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

Source§

fn account_history_info( &self, address: Address, block_number: u64, lowest_available_block_number: Option<u64>, ) -> Result<HistoryInfo, ProviderError>

Source§

fn storage_history_info( &self, address: Address, storage_key: FixedBytes<32>, block_number: u64, lowest_available_block_number: Option<u64>, ) -> Result<HistoryInfo, ProviderError>

Source§

impl<T> HistoryReader for Box<T>
where T: HistoryReader + ?Sized, Box<T>: Send,

Source§

fn account_history_info( &self, address: Address, block_number: u64, lowest_available_block_number: Option<u64>, ) -> Result<HistoryInfo, ProviderError>

Source§

fn storage_history_info( &self, address: Address, storage_key: FixedBytes<32>, block_number: u64, lowest_available_block_number: Option<u64>, ) -> Result<HistoryInfo, ProviderError>

Implementors§

Source§

impl<C, N> HistoryReader for NoopProvider<C, N>
where C: Send + Sync, N: NodePrimitives,

Available on crate feature db-api only.
Source§

impl<T: NodePrimitives, ChainSpec: EthChainSpec + 'static> HistoryReader for MockEthProvider<T, ChainSpec>

Available on crate features test-utils only.
Source§

impl<TX: DbTx + 'static, N: NodeTypes> HistoryReader for DatabaseProvider<TX, N>