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>;
}
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.

Implementations on Foreign Types§

§

impl StorageRootProvider for MemoryOverlayStateProvider

§

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> StorageRootProvider for MemoryOverlayStateProviderRef<'a>

§

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
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>

§

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>

§

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>

Implementors§