reth::providers

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>

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>

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>

Returns the storage multiproof for target slots.

Implementations on Foreign Types§

§

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

§

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>

§

impl<N> StorageRootProvider for MemoryOverlayStateProviderRef<'_, 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>

§

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

§

impl<T> StorageRootProvider for Box<T>
where T: StorageRootProvider + ?Sized, Box<T>: Send + Sync,

§

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>

§

impl<T> StorageRootProvider for Arc<T>
where T: StorageRootProvider + ?Sized, Arc<T>: Send + Sync,

§

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>

Implementors§