Skip to main content

StorageRootProvider

Trait StorageRootProvider 

Source
pub trait StorageRootProvider {
    // 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>;
}
Available on crate feature storage-api only.
Expand description

A type that can compute the storage root for a given account.

Required Methods§

Source

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.

Source

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.

Source

fn storage_multiproof( &self, address: Address, slots: &[FixedBytes<32>], hashed_storage: HashedStorage, ) -> Result<StorageMultiProof, ProviderError>

Returns the storage multiproof for target slots.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<'a, N> StorageRootProvider for MemoryOverlayStateProvider<N>
where N: NodePrimitives,

Source§

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

Source§

fn storage_root( &self, address: Address, hashed_storage: HashedStorage, ) -> Result<FixedBytes<32>, ProviderError>

Source§

fn storage_proof( &self, address: Address, slot: FixedBytes<32>, hashed_storage: HashedStorage, ) -> Result<StorageProof, ProviderError>

Source§

fn storage_multiproof( &self, address: Address, slots: &[FixedBytes<32>], hashed_storage: HashedStorage, ) -> Result<StorageMultiProof, ProviderError>

Source§

impl<N> StorageRootProvider for MemoryOverlayStateProviderRef<'_, N>
where N: NodePrimitives,

Source§

impl<S> StorageRootProvider for CachedStateProvider<S>

Source§

fn storage_root( &self, address: Address, hashed_storage: HashedStorage, ) -> Result<FixedBytes<32>, ProviderError>

Source§

fn storage_proof( &self, address: Address, slot: FixedBytes<32>, hashed_storage: HashedStorage, ) -> Result<StorageProof, ProviderError>

Source§

fn storage_multiproof( &self, address: Address, slots: &[FixedBytes<32>], hashed_storage: HashedStorage, ) -> Result<StorageMultiProof, ProviderError>

Source§

impl<S> StorageRootProvider for InstrumentedStateProvider<S>

Source§

fn storage_root( &self, address: Address, hashed_storage: HashedStorage, ) -> Result<FixedBytes<32>, ProviderError>

Source§

fn storage_proof( &self, address: Address, slot: FixedBytes<32>, hashed_storage: HashedStorage, ) -> Result<StorageProof, ProviderError>

Source§

fn storage_multiproof( &self, address: Address, slots: &[FixedBytes<32>], hashed_storage: HashedStorage, ) -> Result<StorageMultiProof, ProviderError>

Source§

impl<T> StorageRootProvider for Arc<T>

Source§

fn storage_root( &self, address: Address, hashed_storage: HashedStorage, ) -> Result<FixedBytes<32>, ProviderError>

Source§

fn storage_proof( &self, address: Address, slot: FixedBytes<32>, hashed_storage: HashedStorage, ) -> Result<StorageProof, ProviderError>

Source§

fn storage_multiproof( &self, address: Address, slots: &[FixedBytes<32>], hashed_storage: HashedStorage, ) -> Result<StorageMultiProof, ProviderError>

Source§

impl<T> StorageRootProvider for Box<T>

Source§

fn storage_root( &self, address: Address, hashed_storage: HashedStorage, ) -> Result<FixedBytes<32>, ProviderError>

Source§

fn storage_proof( &self, address: Address, slot: FixedBytes<32>, hashed_storage: HashedStorage, ) -> Result<StorageProof, ProviderError>

Source§

fn storage_multiproof( &self, address: Address, slots: &[FixedBytes<32>], hashed_storage: HashedStorage, ) -> Result<StorageMultiProof, ProviderError>

Implementors§