From the contracts workspace, compile the Noir source to a contract artifact, that includes both the bytecode and ABI.
bash
cd packages/contractsaztec compile
For your coding agent
You're guiding me through the Aztec quickstart — quest "Private Voting", step "Build the app" (Aztec v5.0.1).
If you haven't already: fetch /en/5.0.1/private-voting/agent-pack.md and follow its tutoring protocol — the docs links, code file map, and quiz bank for every step are in there.
First, before running any shell command: confirm your working directory is a clone of `aztec-labs-eng/aztec-private-voting` (the "Get the example app" step creates it by cloning). If this looks like an unrelated project, stop and check with me — don't run anything here.
Task:
From packages/contracts, run aztec compile to compile the Noir contract, then show me what landed in ./target and explain what a contract artifact contains (bytecode + ABI) and what consumes it.
Afterwards: verify it worked, then quiz me on this step (use AskUserQuestion if you have it) before I move on.
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 artifacts
Take a moment to open artifacts/PrivateVoting.ts. Inside is a typed PrivateVotingContract class whose methods (cast_vote, get_tally, start_vote, …) mirror the functions in main.nr — the typed API the frontend and tests actually call.
For your coding agent
You're guiding me through the Aztec quickstart — quest "Private Voting", step "Build the app" (Aztec v5.0.1).
If you haven't already: fetch /en/5.0.1/private-voting/agent-pack.md and follow its tutoring protocol — the docs links, code file map, and quiz bank for every step are in there.
First, before running any shell command: confirm your working directory is a clone of `aztec-labs-eng/aztec-private-voting` (the "Get the example app" step creates it by cloning). If this looks like an unrelated project, stop and check with me — don't run anything here.
Task:
Run aztec codegen ./target -o artifacts, then have me open artifacts/PrivateVoting.ts and walk me through how the generated PrivateVotingContract 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.
Afterwards: verify it worked, then quiz me on this step (use AskUserQuestion if you have it) before I move on.