Skip to main content

StorageReader

Trait StorageReader 

Source
pub trait StorageReader: Send {
    // Required methods
    fn plain_state_storages(
        &self,
        addresses_with_keys: impl IntoIterator<Item = (Address, impl IntoIterator<Item = FixedBytes<32>>)>,
    ) -> Result<Vec<(Address, Vec<StorageEntry>)>, ProviderError>;
    fn changed_storages_with_range(
        &self,
        range: RangeInclusive<u64>,
    ) -> Result<BTreeMap<Address, BTreeSet<FixedBytes<32>>>, ProviderError>;
    fn changed_storages_and_blocks_with_range(
        &self,
        range: RangeInclusive<u64>,
    ) -> Result<BTreeMap<(Address, FixedBytes<32>), Vec<u64>>, ProviderError>;
}
Expand description

Storage reader

Required Methods§

Source

fn plain_state_storages( &self, addresses_with_keys: impl IntoIterator<Item = (Address, impl IntoIterator<Item = FixedBytes<32>>)>, ) -> Result<Vec<(Address, Vec<StorageEntry>)>, ProviderError>

Get plainstate storages for addresses and storage keys.

Source

fn changed_storages_with_range( &self, range: RangeInclusive<u64>, ) -> Result<BTreeMap<Address, BTreeSet<FixedBytes<32>>>, ProviderError>

Iterate over storage changesets and return all storage slots that were changed.

Source

fn changed_storages_and_blocks_with_range( &self, range: RangeInclusive<u64>, ) -> Result<BTreeMap<(Address, FixedBytes<32>), Vec<u64>>, ProviderError>

Iterate over storage changesets and return all storage slots that were changed alongside each specific set of blocks.

NOTE: Get inclusive range of blocks.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

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

Source§

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

Source§

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

Implementors§

Source§

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