pub trait StateProofProvider: Send + Sync {
// Required methods
fn proof(
&self,
input: TrieInput,
address: Address,
slots: &[B256],
) -> ProviderResult<AccountProof>;
fn multiproof(
&self,
input: TrieInput,
targets: MultiProofTargets,
) -> ProviderResult<MultiProof>;
fn witness(
&self,
input: TrieInput,
target: HashedPostState,
) -> ProviderResult<B256HashMap<Bytes>>;
}
Expand description
A type that can generate state proof on top of a given post state.
Required Methods§
Sourcefn proof(
&self,
input: TrieInput,
address: Address,
slots: &[B256],
) -> ProviderResult<AccountProof>
fn proof( &self, input: TrieInput, address: Address, slots: &[B256], ) -> ProviderResult<AccountProof>
Get account and storage proofs of target keys in the HashedPostState
on top of the current state.
Sourcefn multiproof(
&self,
input: TrieInput,
targets: MultiProofTargets,
) -> ProviderResult<MultiProof>
fn multiproof( &self, input: TrieInput, targets: MultiProofTargets, ) -> ProviderResult<MultiProof>
Generate [MultiProof
] for target hashed account and corresponding
hashed storage slot keys.