This repository contains TypeScript scripts and Noir contracts for the Aztec network. Follow these guidelines when contributing:
- Use Node.js v22 with Yarn.
- Install dependencies with
yarn install. - The Aztec CLI (
aztec) must be installed at the version matchingNargo.tomlandpackage.json. - Start the Aztec local network with
aztec start --local-networkbefore running E2E tests or scripts. This is not needed for compilation or Noir unit tests. - After restarting the local network, always run
rm -rf ./storeto clear stale PXE data.
- This is an ESM project (
"type": "module"inpackage.json). - Compile contracts with
yarn compileand generate TypeScript artifacts withyarn codegen. - Use four spaces for indentation in TypeScript and scripts.
- Do not commit generated artifacts (
src/artifacts,target, orstorefolders). - Never edit
src/artifacts/PodRacing.tsdirectly; it is generated byyarn codegen. - To target devnet instead of local network, set
AZTEC_ENV=devnet(e.g.AZTEC_ENV=devnet yarn deploy).
There are two independent test systems:
- Noir TXE tests (
yarn test:nr): Run in the TXE simulator, no network required. - TypeScript E2E tests (
yarn test:js): Require a running local network. yarn testruns both. Ensure tests pass before committing.
- Use clear commit messages and provide a concise description in the PR body about the change.
- Mention which tests were executed.