You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The compatible `nargo` (version 1.0.0-beta.21) is bundled with the Aztec CLI at `~/.aztec/current/bin/aztec-nargo`. As of Aztec v4.3.0, bundled binaries are exposed only under their `aztec-` prefixed names — invoke `aztec-nargo` (a drop-in for `nargo`) rather than the bare name, which is no longer on `PATH`. Ensure `~/.aztec/current/bin` is on your `PATH` (the Aztec installer adds this automatically).
69
+
The compatible `nargo` (version 1.0.0-beta.22) is bundled with the Aztec CLI at `~/.aztec/current/bin/aztec-nargo`. As of Aztec v4.3.0, bundled binaries are exposed only under their `aztec-` prefixed names — invoke `aztec-nargo` (a drop-in for `nargo`) rather than the bare name, which is no longer on `PATH`. Ensure `~/.aztec/current/bin` is on your `PATH` (the Aztec installer adds this automatically).
75
70
76
71
```bash
77
72
# Verify nargo is available
@@ -177,22 +172,6 @@ yarn test
177
172
cd circuit && aztec-nargo test
178
173
```
179
174
180
-
### Starter Token Example
181
-
182
-
```bash
183
-
# Navigate to reference implementation
184
-
cd starter-token/reference
185
-
186
-
# Build the contract
187
-
cd contract && aztec compile &&cd ..
188
-
189
-
# Build and run TypeScript client
190
-
cd ts
191
-
npm install
192
-
npm run build
193
-
npm start
194
-
```
195
-
196
175
## Contract Architecture
197
176
198
177
### Aztec Contract Structure
@@ -216,19 +195,10 @@ The recursive verification example demonstrates:
216
195
217
196
-**Off-chain proof generation**: Noir circuits compiled and executed with Barretenberg
218
197
-**On-chain verification**: Using `bb_proof_verification::verify_honk_proof` in Aztec contracts
219
-
-**UltraHonk proving system**: Generates proofs with 508 field elements, verification keys with 115 fields
198
+
-**UltraHonk proving system**: Generates proofs with 458 field elements, verification keys with 115 fields
220
199
-**VK Hash Storage**: Verification key hash stored in `PublicImmutable` storage, readable from private context
221
200
-**Public state management**: Using `PublicMutable` for per-user counters
222
201
223
-
### Token Pattern (starter-token)
224
-
225
-
The token example showcases:
226
-
227
-
-**Dual balance system**: Public and private token balances
228
-
-**State management**: Using `PublicMutable` and `Map` for storage
229
-
-**Access control**: Owner-based permissions for minting
GitHub Actions workflows automatically test examples on pull requests to `next` (and pushes to `next`). Each tested example has its own workflow under `.github/workflows/`:
295
256
296
-
Steps:
257
+
-`recursive-verification-tests.yml`
258
+
-`prediction-market-tests.yml`
259
+
-`note-send-proof-tests.yml`
260
+
-`test-wallet-webapp-tests.yml`
261
+
-`custom-note-tests.yml`
297
262
298
-
1. Sets up Node.js (v22) and yarn
299
-
2. Installs Aztec CLI
300
-
3. Starts Aztec local network
301
-
4. Compiles circuits and contracts
302
-
5. Generates proof data
303
-
6. Runs integration tests
304
-
7. Uploads test artifacts on failure
263
+
Each workflow installs the pinned Aztec CLI (`AZTEC_VERSION`), starts a local network when the example's tests need one, compiles circuits/contracts, and runs that example's tests (uploading logs on failure). The `custom-note` workflow is contract-only, so it just compiles.
Copy file name to clipboardExpand all lines: README.md
+18-16Lines changed: 18 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ A collection of example Aztec smart contracts and circuits written in Noir, desi
6
6
7
7
## Overview
8
8
9
-
This repository contains practical examples demonstrating various features of Aztec's zero-knowledge smart contract platform, from basic token implementations to advanced proof verification patterns.
9
+
This repository contains practical examples demonstrating various features of Aztec's zero-knowledge smart contract platform, from custom notes to advanced proof verification patterns.
10
10
11
11
You can find additional examples in the Aztec monorepo [docs examples folder](https://github.com/AztecProtocol/aztec-packages/tree/next/docs/examples), including:
12
12
@@ -16,25 +16,27 @@ You can find additional examples in the Aztec monorepo [docs examples folder](ht
Demonstrates how to verify Noir circuit proofs within Aztec smart contracts using the UltraHonk proving system. This example showcases:
23
+
Defining a custom private note type with the `#[note]` macro and inserting it from a contract.
24
24
25
-
- Zero-knowledge proof generation from Noir circuits
26
-
- On-chain proof verification in private smart contracts
27
-
- Private state management using `EasyPrivateUint`
28
-
- Integration between off-chain proving and on-chain verification
25
+
### [note-send-proof](./note-send-proof)
29
26
30
-
**Key features**:
27
+
Creating private notes and proving facts about their note hashes off-chain (with `bb.js` / `noir_js`), then verifying them on-chain. Includes a Vite/React frontend.
31
28
32
-
- Circuit that proves two values are not equal (x ≠ y)
33
-
- Smart contract that verifies proofs and maintains private counters
34
-
- Comprehensive test suite and GitHub Actions CI/CD pipeline
35
-
- TypeScript utilities for proof generation and contract deployment
29
+
### [prediction-market](./prediction-market)
36
30
37
-
[View README](./recursive_verification/README.md)
31
+
A private prediction market built on a constant-sum market maker (CSMM), using `uint_note` partial notes for private deposits, withdrawals, and outcome purchases.
Verifying Noir UltraHonk proofs _inside_ an Aztec contract: off-chain proof generation, on-chain verification with `bb_proof_verification::verify_honk_proof`, VK-hash storage in `PublicImmutable`, and per-user private counters.
36
+
37
+
### [test-wallet-webapp](./test-wallet-webapp)
38
+
39
+
A minimal Vite/React app that connects to an embedded Aztec wallet/PXE, creates an initializerless Schnorr account, deploys a contract, and sends transactions.
38
40
39
41
## Quick Start
40
42
@@ -45,7 +47,7 @@ Demonstrates how to verify Noir circuit proofs within Aztec smart contracts usin
45
47
bash -i <(curl -s https://install.aztec.network)
46
48
47
49
# Set specific Aztec version (if needed)
48
-
aztec-up 4.3.0
50
+
aztec-up 5.0.0-rc.1
49
51
```
50
52
51
53
## Development Workflow
@@ -63,7 +65,7 @@ Each example includes its own test suite:
0 commit comments