Build the app
Building the contract is two distinct steps. The app wraps both in npm run build:contracts, but run them by hand once so you know what each does.
Compile the contract#
From the contracts workspace, compile the Noir source to a contract artifact, that includes both the bytecode and ABI.
bash
cd packages/contracts
aztec compileCopy into your AI assistant
code
From packages/contracts, run `aztec compile` to compile the Noir contract to an artifact.Generate the TypeScript interface#
Now turn that compiled artifact into a typed PrivateVoting class the frontend and tests import — aztec codegen reads ./target and writes ./artifacts/PrivateVoting.ts:
bash
aztec codegen ./target -o artifactsCopy into your AI assistant
code
Run `aztec codegen ./target -o artifacts` and explain how the generated TypeScript
class maps to the Noir functions (e.g. cast_vote, get_tally), and why the artifact
must be regenerated whenever the contract or toolchain version changes.