Your first smart contract
Tip
Check our example walkthrough for more!
Step 1: Clone a template
We support several proving schemes:
Proving scheme | Verifier | Program ID | Language | Template |
---|---|---|---|---|
Noir | noir | Verification key. | Noir | |
Risc0 | risc0 | Image ID without a prefix. ex. 0x123 becomes 123. | Rust | Template |
SP1 | sp1 | Verification key. | Rust | Template |
Clone the template or, for proving schemes without templates, use the templates as inspiration for writing your contract. You can also check our smart contract concept page for more information!
Step 2: Edit your contract
Navigate to the contract/
folder and edit your contract as necessary.
In our templates, the application backend that generates the proof is a CLI. You can change this to your favorite architecture, for instance an http server.
Use any architecture you like for your proof generation and submission: the only thing we need is a valid HyleOutput
.
Step 3: Register your contract
On the devnet, register your contract by running: