Skip to main content

DatabaseProof

Trait DatabaseProof 

Source
pub trait DatabaseProof<'a> {
    type Tx;

    // Required methods
    fn from_tx(tx: &'a Self::Tx) -> Self;
    fn overlay_account_proof(
        &self,
        input: TrieInput,
        address: Address,
        slots: &[FixedBytes<32>],
    ) -> Result<AccountProof, StateProofError>;
    fn overlay_multiproof(
        &self,
        input: TrieInput,
        targets: MultiProofTargets,
    ) -> Result<MultiProof, StateProofError>;
    fn overlay_multiproof_v2(
        &self,
        input: TrieInput,
        targets: MultiProofTargetsV2,
    ) -> Result<DecodedMultiProofV2, StateProofError>;
}
Available on crate features trie-db and trie only.
Expand description

Extends Proof with operations specific for working with a database transaction.

Required Associated Types§

Source

type Tx

Associated type for the database transaction.

Required Methods§

Source

fn from_tx(tx: &'a Self::Tx) -> Self

Create a new Proof instance from database transaction.

Source

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

Generates the state proof for target account based on TrieInput.

Source

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

Generates the state MultiProof for target hashed account and storage keys.

Source

fn overlay_multiproof_v2( &self, input: TrieInput, targets: MultiProofTargetsV2, ) -> Result<DecodedMultiProofV2, StateProofError>

Generates a V2 decoded state multiproof for target hashed accounts and storage keys.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§