Verifying storage proofs
How to interact with the `AxiomV0StoragePf` contract
To verify historic storage slots, users and applications can use AxiomV0StoragePf
and the attestSlots
function, which has the following signature:
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 ofaddr
.
The function body checks that
blockData
is a valid Merkle inclusion proof into the block hash cacheproof
verifies correctly against our SNARK verifierthe public inputs of
proof
are as claimed.
If all of these checks pass, attestSlots
emits:
and sets the value of keccak(blockNumber || addr || slot || slotValue)
to true
in the mapping
Last updated