Verifying storage proofs
How to interact with the `AxiomV0StoragePf` contract
To verify historic storage slots, users and applications can use
attestSlotsfunction, which has the following signature:
IAxiomV0.BlockHashWitness calldata blockData,
bytes calldata proof)
This takes in a block hash witness and a ZK proof with public inputs
blockHash: The claimed block hash in the attestation.
blockNumber: The claimed block number in the attestation.
addr: The claimed address in the attestation.
slotArray: An array of claimed
(slot, slotValue)pairs in the account storage of
The function body checks that
blockDatais a valid Merkle inclusion proof into the block hash cache
proofverifies correctly against our SNARK verifier
- the public inputs of
proofare as claimed.
If all of these checks pass,
SlotAttestationEvent(uint32 blockNumber, address addr, uint256 slot, uint256 slotValue)
and sets the value of
keccak(blockNumber || addr || slot || slotValue)to
truein the mapping
mapping(bytes32 => bool) public slotAttestations;
Last modified 1mo ago