- A zkVM guest program,
is-even - A smart contract,
EvenNumber.sol - An example starter application which:
- uploads the zkVM guest to IPFS (optional)
- submits a request to the market for a proof that “4” is an even number
- waits for the request to be fulfilled and receives the proof from the Boundless market
- submits the received proof to the
EvenNumbercontract for verification.
Install RISC Zero
Terminal
Clone the repository
Using Foundry
You can either clone the repo usinggit, but we recommend using forge init (you’ll need to install Foundry):
Terminal
Using Git
Terminal
Set up your environment variables
Export your Sepolia wallet private key as an environment variable (making sure it has enough funds), and export a valid RPC URL (you can use the public one provided):EvenNumber.sol contract, please run:
cargo build && forge script contracts/scripts/Deploy.s.sol --rpc-url ${RPC_URL:?} --broadcast -vv
after which you can export your deployed contract address to EVEN_NUMBER_ADDRESS.
:::
Run the example app
The example app will submit a request to the market for a proof that “4” is an even number, wait for the request to be fulfilled, and then submit that proof to the EvenNumber contract, setting the public number variable to “4”. To run the example using the pre-uploaded zkVM guest:Terminal
Terminal
set function with the proof as calldata:
Terminal