pub trait StateProofProvider: Send + Sync {
// Required methods
fn proof(
&self,
input: TrieInput,
address: Address,
slots: &[B256],
) -> ProviderResult<AccountProof>;
fn multiproof(
&self,
input: TrieInput,
targets: HashMap<B256, HashSet<B256>>,
) -> ProviderResult<MultiProof>;
fn witness(
&self,
input: TrieInput,
target: HashedPostState,
) -> ProviderResult<HashMap<B256, 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: HashMap<B256, HashSet<B256>>,
) -> ProviderResult<MultiProof>
fn multiproof( &self, input: TrieInput, targets: HashMap<B256, HashSet<B256>>, ) -> ProviderResult<MultiProof>
Generate [MultiProof
] for target hashed account and corresponding
hashed storage slot keys.