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>;
    fn storage_multiproof(
        &self,
        address: Address,
        slots: &[B256],
        hashed_storage: HashedStorage,
    ) -> ProviderResult<StorageMultiProof>;
}
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.

Source

fn storage_multiproof( &self, address: Address, slots: &[B256], hashed_storage: HashedStorage, ) -> ProviderResult<StorageMultiProof>

Returns the storage multiproof for target slots.

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§

fn storage_multiproof( &self, address: Address, slots: &[B256], hashed_storage: HashedStorage, ) -> ProviderResult<StorageMultiProof>

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§

fn storage_multiproof( &self, address: Address, slots: &[B256], hashed_storage: HashedStorage, ) -> ProviderResult<StorageMultiProof>

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>

Source§

fn storage_multiproof( &self, address: Address, slots: &[B256], hashed_storage: HashedStorage, ) -> ProviderResult<StorageMultiProof>

Implementors§

Source§

impl<C: Send + Sync, N: NodePrimitives> StorageRootProvider for NoopProvider<C, N>