Trait StorageRootProvider
pub trait StorageRootProvider: Send + Sync {
// Required methods
fn storage_root(
&self,
address: Address,
hashed_storage: HashedStorage,
) -> Result<FixedBytes<32>, ProviderError>;
fn storage_proof(
&self,
address: Address,
slot: FixedBytes<32>,
hashed_storage: HashedStorage,
) -> Result<StorageProof, ProviderError>;
fn storage_multiproof(
&self,
address: Address,
slots: &[FixedBytes<32>],
hashed_storage: HashedStorage,
) -> Result<StorageMultiProof, ProviderError>;
}
Expand description
A type that can compute the storage root for a given account.
Required Methods§
fn storage_root(
&self,
address: Address,
hashed_storage: HashedStorage,
) -> Result<FixedBytes<32>, ProviderError>
fn storage_root( &self, address: Address, hashed_storage: HashedStorage, ) -> Result<FixedBytes<32>, ProviderError>
Returns the storage root of the HashedStorage
for target address on top of the current
state.
fn storage_proof(
&self,
address: Address,
slot: FixedBytes<32>,
hashed_storage: HashedStorage,
) -> Result<StorageProof, ProviderError>
fn storage_proof( &self, address: Address, slot: FixedBytes<32>, hashed_storage: HashedStorage, ) -> Result<StorageProof, ProviderError>
Returns the storage proof of the HashedStorage
for target slot on top of the current
state.
fn storage_multiproof(
&self,
address: Address,
slots: &[FixedBytes<32>],
hashed_storage: HashedStorage,
) -> Result<StorageMultiProof, ProviderError>
fn storage_multiproof( &self, address: Address, slots: &[FixedBytes<32>], hashed_storage: HashedStorage, ) -> Result<StorageMultiProof, ProviderError>
Returns the storage multiproof for target slots.