pub trait StorageReader: Send + Sync {
// Required methods
fn plain_state_storages(
&self,
addresses_with_keys: impl IntoIterator<Item = (Address, impl IntoIterator<Item = B256>)>,
) -> ProviderResult<Vec<(Address, Vec<StorageEntry>)>>;
fn changed_storages_with_range(
&self,
range: RangeInclusive<BlockNumber>,
) -> ProviderResult<BTreeMap<Address, BTreeSet<B256>>>;
fn changed_storages_and_blocks_with_range(
&self,
range: RangeInclusive<BlockNumber>,
) -> ProviderResult<BTreeMap<(Address, B256), Vec<u64>>>;
}
Expand description
Storage reader
Required Methods§
Sourcefn plain_state_storages(
&self,
addresses_with_keys: impl IntoIterator<Item = (Address, impl IntoIterator<Item = B256>)>,
) -> ProviderResult<Vec<(Address, Vec<StorageEntry>)>>
fn plain_state_storages( &self, addresses_with_keys: impl IntoIterator<Item = (Address, impl IntoIterator<Item = B256>)>, ) -> ProviderResult<Vec<(Address, Vec<StorageEntry>)>>
Get plainstate storages for addresses and storage keys.
Sourcefn changed_storages_with_range(
&self,
range: RangeInclusive<BlockNumber>,
) -> ProviderResult<BTreeMap<Address, BTreeSet<B256>>>
fn changed_storages_with_range( &self, range: RangeInclusive<BlockNumber>, ) -> ProviderResult<BTreeMap<Address, BTreeSet<B256>>>
Iterate over storage changesets and return all storage slots that were changed.
Sourcefn changed_storages_and_blocks_with_range(
&self,
range: RangeInclusive<BlockNumber>,
) -> ProviderResult<BTreeMap<(Address, B256), Vec<u64>>>
fn changed_storages_and_blocks_with_range( &self, range: RangeInclusive<BlockNumber>, ) -> ProviderResult<BTreeMap<(Address, B256), Vec<u64>>>
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", so this trait is not object safe.