npm installnpx hardhat compilenpx hardhat testThe contracts inside contracts/verifiers can be used for performing proof verification via zkVerify.
A smart contract that needs to perform proof verification should inherit from the relevant smart contract inside contracts/verifiers.
The constructor of these contracts requires as input the address of the zkVerifyAggregation contract instance deployed on a supported EVM. The list of the supported chains, and the relevant addresses can be found here.
Each of the contracts inside contracts/verifiers features a verify method, which takes as arguments:
- the vk hash,
- the verifier version (for versioned verifiers only),
- the public inputs of the proof,
- the domain id (should be retrieved from zkVerify),
- the aggregation id (should be retrieved from zkVerify),
- the merkle path of the statement (should be retrieved from zkVerify),
- the leaf count of the merkle tree (should be retrieved from zkVerify),
- the index of the statement inside the merkle tree (should be retrieved from zkVerify)