This repository contains smart contracts for the Lagrange ZK Prover Network. These contracts are designed to manage queries, responses, and client interactions within the LPN ecosystem.
You can find the user documentation here
just --list
just install
just build
just test
This requires docker, aderyn, glow
just slither
just aderyn
This requires bun & lintspec
just lint
just lintspec
- Private key and Etherscan API key must be supplied as environment variables.
- Set the appropriate
ENV
var: prod, test, or dev-X - Only 9/10 contracts will verify because the Deployer contract self-destructs.
- Ensure the RPC is configured for the chain you want to deploy to in foundry.toml
- Note that md5 is a required system dependency, make sure you have it installed
export PRIVATE_KEY=<...>
export ETHERSCAN_API_KEY=<...>
export ENV=<dev-x/test/prod>
just deploy-v2 [chain]
To update the verifier contract on a dev environment, the command is:
export PRIVATE_KEY=<...>
export ETHERSCAN_API_KEY=<...>
export ENV=<dev-x/test/prod>
just update-v2-executors
See the following design docs:
Credit - Gnark
We would like to thank and recognize Consensys and the gnark team for their work, which we use to generate a Solidity verifier for onchain verification of our proofs.