Using Proven Data in your Smart Contract
Explaining how to use data that is proven by Axiom in a smart contract.
Generally, when using the data proven by Axiom in a smart contract, you'll want to follow two steps:
Verify user inputs against proven data in
AxiomV1Query
Check application logic with the data in your contract
Additionally, it can be helpful to create a struct that holds all of the data
Verify user inputs against proven data in AxiomV1Query
Using the appropriate AxiomV1Contract address (use the proxy address), send all of the data to areResponsesValid
:
Check application logic with the data in your contract
Now that you've checked the data was validly read from the history of Ethereum by verifying it against AxiomV1Query
, you will want to check that it passes your application logic.
A full example can be found here: https://github.com/axiom-crypto/examples/blob/main/age-gate-mint/contracts/src/Distributor.sol
Last updated