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>;
}
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.
Implementations on Foreign Types§
§impl StorageRootProvider for StateProviderTest
impl StorageRootProvider for StateProviderTest
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>
§impl<'a, N> StorageRootProvider for MemoryOverlayStateProviderRef<'a, N>where
N: NodePrimitives,
impl<'a, N> StorageRootProvider for MemoryOverlayStateProviderRef<'a, N>where
N: NodePrimitives,
fn storage_root( &self, address: Address, storage: HashedStorage, ) -> Result<FixedBytes<32>, ProviderError>
fn storage_proof( &self, address: Address, slot: FixedBytes<32>, storage: HashedStorage, ) -> Result<StorageProof, ProviderError>
§impl<'a, T> StorageRootProvider for &'a T
impl<'a, T> StorageRootProvider for &'a T
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>
§impl<N> StorageRootProvider for MemoryOverlayStateProvider<N>where
N: NodePrimitives,
impl<N> StorageRootProvider for MemoryOverlayStateProvider<N>where
N: NodePrimitives,
fn storage_root( &self, address: Address, storage: HashedStorage, ) -> Result<FixedBytes<32>, ProviderError>
fn storage_proof( &self, address: Address, slot: FixedBytes<32>, storage: HashedStorage, ) -> Result<StorageProof, ProviderError>
§impl<T> StorageRootProvider for Box<T>
impl<T> StorageRootProvider for Box<T>
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>
§impl<T> StorageRootProvider for Arc<T>
impl<T> StorageRootProvider for Arc<T>
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>
Implementors§
impl StorageRootProvider for MockEthProvider
Available on crate feature
test-utils
only.impl StorageRootProvider for NoopProvider
Available on crate feature
test-utils
only.