Trait StorageReader
pub trait StorageReader: Send + Sync {
// 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§
fn plain_state_storages(
&self,
addresses_with_keys: impl IntoIterator<Item = (Address, impl IntoIterator<Item = FixedBytes<32>>)>,
) -> Result<Vec<(Address, Vec<StorageEntry>)>, ProviderError>
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.
fn changed_storages_with_range(
&self,
range: RangeInclusive<u64>,
) -> Result<BTreeMap<Address, BTreeSet<FixedBytes<32>>>, ProviderError>
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.
fn changed_storages_and_blocks_with_range(
&self,
range: RangeInclusive<u64>,
) -> Result<BTreeMap<(Address, FixedBytes<32>), Vec<u64>>, ProviderError>
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", so this trait is not object safe.