Skip to main content

StateProofProvider

Trait StateProofProvider 

Source
pub trait StateProofProvider {
    // Required methods
    fn proof(
        &self,
        input: TrieInput,
        address: Address,
        slots: &[FixedBytes<32>],
    ) -> Result<AccountProof, ProviderError>;
    fn multiproof(
        &self,
        input: TrieInput,
        targets: MultiProofTargets,
    ) -> Result<MultiProof, ProviderError>;
    fn witness(
        &self,
        input: TrieInput,
        target: HashedPostState,
        mode: ExecutionWitnessMode,
    ) -> Result<Vec<Bytes>, ProviderError>;
}
Available on crate feature storage-api only.
Expand description

A type that can generate state proof on top of a given post state.

Required Methods§

Source

fn proof( &self, input: TrieInput, address: Address, slots: &[FixedBytes<32>], ) -> Result<AccountProof, ProviderError>

Get account and storage proofs of target keys in the HashedPostState on top of the current state.

Source

fn multiproof( &self, input: TrieInput, targets: MultiProofTargets, ) -> Result<MultiProof, ProviderError>

Generate MultiProof for target hashed account and corresponding hashed storage slot keys.

Source

fn witness( &self, input: TrieInput, target: HashedPostState, mode: ExecutionWitnessMode, ) -> Result<Vec<Bytes>, ProviderError>

Get trie witness for provided state using the given witness generation mode.

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> StateProofProvider for MemoryOverlayStateProvider<N>
where N: NodePrimitives,

Source§

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

Source§

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

Source§

impl<S> StateProofProvider for CachedStateProvider<S>

Source§

impl<S> StateProofProvider for InstrumentedStateProvider<S>

Source§

impl<T> StateProofProvider for Arc<T>

Source§

impl<T> StateProofProvider for Box<T>

Implementors§