reth_storage_api

Trait StorageRootProvider

Source
pub trait StorageRootProvider: Send + Sync {
    // Required methods
    fn storage_root(
        &self,
        address: Address,
        hashed_storage: HashedStorage,
    ) -> ProviderResult<B256>;
    fn storage_proof(
        &self,
        address: Address,
        slot: B256,
        hashed_storage: HashedStorage,
    ) -> ProviderResult<StorageProof>;
}
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, ) -> ProviderResult<B256>

Returns the storage root of the HashedStorage for target address on top of the current state.

Source

fn storage_proof( &self, address: Address, slot: B256, hashed_storage: HashedStorage, ) -> ProviderResult<StorageProof>

Returns the storage proof of the HashedStorage for target slot on top of the current state.

Implementations on Foreign Types§

Source§

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

Source§

fn storage_root( &self, address: Address, hashed_storage: HashedStorage, ) -> ProviderResult<B256>

Source§

fn storage_proof( &self, address: Address, slot: B256, hashed_storage: HashedStorage, ) -> ProviderResult<StorageProof>

Source§

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

Source§

fn storage_root( &self, address: Address, hashed_storage: HashedStorage, ) -> ProviderResult<B256>

Source§

fn storage_proof( &self, address: Address, slot: B256, hashed_storage: HashedStorage, ) -> ProviderResult<StorageProof>

Source§

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

Source§

fn storage_root( &self, address: Address, hashed_storage: HashedStorage, ) -> ProviderResult<B256>

Source§

fn storage_proof( &self, address: Address, slot: B256, hashed_storage: HashedStorage, ) -> ProviderResult<StorageProof>

Implementors§