Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ FROM --platform=linux/amd64 ubuntu:24.04
SHELL ["/bin/bash", "-c"]

ENV NVM_DIR=/root/.nvm
ENV NODE_VERSION=22.15.0
ARG AZTEC_VERSION=4.0.0-devnet.2-patch.1
ENV NODE_VERSION=24.12.0
ARG AZTEC_VERSION=4.2.0-aztecnr-rc.2
ENV AZTEC_VERSION=$AZTEC_VERSION
ENV NON_INTERACTIVE=1
ENV BIN_PATH=/usr/local/bin
Expand Down
36 changes: 0 additions & 36 deletions .github/workflows/devnet.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/local-network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
env:
AZTEC_ENV: local-network
AZTEC_VERSION: 4.0.0-devnet.2-patch.1
AZTEC_VERSION: 4.2.0-aztecnr-rc.2

steps:
- name: Checkout repository
Expand All @@ -26,7 +26,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
node-version: "24"
cache: "yarn"

- name: Install Foundry
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/testnet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Testnet Tests

on:
push:
branches:
- testnet
pull_request:
branches:
- testnet
workflow_dispatch:

concurrency:
group: testnet-deploy
cancel-in-progress: true

jobs:
testnet-deploy-account:
name: Deploy Account to Testnet
runs-on: ubuntu-latest
env:
AZTEC_ENV: testnet
L1_PRIVATE_KEY: ${{ secrets.L1_PRIVATE_KEY }}

steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Read Aztec version from config
run: echo "AZTEC_VERSION=$(jq -r '.settings.version' config/testnet.json)" >> $GITHUB_ENV

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
cache: "yarn"

- name: Install project dependencies
run: yarn

- name: Deploy account to testnet
run: yarn deploy-account::testnet
2 changes: 1 addition & 1 deletion .remarkrc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { remarkIncludeCode } from 'include_code';
export default {
plugins: [
[remarkIncludeCode, {
codeDir: './src',
codeDir: '.',
repository: { owner: 'AztecProtocol', name: 'aztec-starter' },
commitTag: 'main',
validation: 'error',
Expand Down
20 changes: 9 additions & 11 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

Aztec Starter — a Pod Racing game contract built with Noir on the Aztec network. Two players allocate points across 5 tracks over 3 rounds with private state; scores are revealed at the end (commit-reveal pattern). The player who wins more tracks (best of 5) wins.

**Aztec version: `4.0.0-devnet.2-patch.1`** — pinned across `Nargo.toml`, `package.json`, `config/*.json`, and README. All must stay in sync when updating.
**Aztec version: `4.2.0-aztecnr-rc.2`** — pinned across `Nargo.toml`, `package.json`, `config/*.json`, and README. All must stay in sync when updating.

## Build & Development Commands

Expand Down Expand Up @@ -47,33 +47,31 @@ NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --

## Deployment & Scripts

All scripts support `::devnet` and `::testnet` suffixes for remote network targeting:
All scripts support `::testnet` suffixes for remote network targeting:

```bash
yarn deploy # Deploy contract to local network
yarn deploy::devnet # Deploy contract to devnet
yarn deploy::testnet # Deploy contract to testnet
yarn deploy-account # Deploy a Schnorr account
yarn multiple-wallet # Deploy from one wallet, interact from another
yarn profile # Profile a transaction deployment
yarn read-logs # Demo utility function for client-side debug logging
yarn read-logs::devnet # Same on devnet
yarn read-logs::testnet # Same on testnet
```

## Environment Configuration

- `AZTEC_ENV` variable selects config: `local-network` (default), `devnet`, or `testnet`
- Config files: `config/local-network.json`, `config/devnet.json`, `config/testnet.json`
- `AZTEC_ENV` variable selects config: `local-network` (default) or `testnet`
- Config files: `config/local-network.json`, `config/testnet.json`
- `config/config.ts` — singleton `ConfigManager` loads the appropriate JSON based on `AZTEC_ENV`
- `.env` stores secrets (SECRET, SIGNING_KEY, SALT, contract keys) — never commit

## Branch Model

- **`next` branch** — default branch; used for local network and devnet development
- **`next` branch** — default branch; used for local network development
- **`testnet` branch** — used for testnet development; may run a different Aztec version

Devnet PRs target `next`. Testnet PRs target `testnet`. Each branch pins its own Aztec version independently.
PRs target `next`. Testnet PRs target `testnet`. Each branch pins its own Aztec version independently.

## Project Structure

Expand All @@ -98,7 +96,7 @@ Devnet PRs target `next`. Testnet PRs target `testnet`. Each branch pins its own

**TypeScript utilities:**

- `src/utils/setup_wallet.ts` — creates `EmbeddedWallet` with environment-aware config (prover enabled on devnet)
- `src/utils/setup_wallet.ts` — creates `EmbeddedWallet` with environment-aware config
- `src/utils/create_account_from_env.ts` — Schnorr account from env vars
- `src/utils/deploy_account.ts` — account deployment with sponsored fees
- `src/utils/sponsored_fpc.ts` — SponsoredFPC (Fee Payment Contract) setup
Expand All @@ -113,7 +111,7 @@ Devnet PRs target `next`. Testnet PRs target `testnet`. Each branch pins its own
- **ESM project**: `"type": "module"` in package.json. All TS scripts run via `node --loader ts-node/esm`.
- **Private-public interaction**: `play_round` is private (creates `GameRoundNote` notes), then enqueues a public call (`validate_and_play_round`) to update round counters. `finish_game` reads private notes, sums them, and enqueues a public call to reveal totals.
- **Fee payment**: All transactions use `SponsoredFeePaymentMethod` via the SponsoredFPC contract.
- **Wallet setup**: `EmbeddedWallet.create()` with `ephemeral: true` for tests; prover is enabled only on devnet.
- **Wallet setup**: `EmbeddedWallet.create()` with `ephemeral: true` for tests.
- **PXE store**: Data persists in `./store`. Must delete after local network restart to avoid stale state errors.

## Simulate Before Send (IMPORTANT)
Expand Down Expand Up @@ -152,7 +150,7 @@ When updating the Aztec version, update all of these locations:

1. `Nargo.toml` — `aztec` dependency tag
2. `package.json` — all `@aztec/*` dependency versions
3. `config/local-network.json`, `config/devnet.json`, and/or `config/testnet.json` — `settings.version` (update the configs relevant to the branch you're on)
3. `config/local-network.json` and/or `config/testnet.json` — `settings.version` (update the configs relevant to the branch you're on)
4. `README.md` — install command version

> **Note:** The `next` and `testnet` branches may pin different Aztec versions. Only update the config files relevant to the branch.
Expand Down
2 changes: 1 addition & 1 deletion Nargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ authors = [ "" ]
compiler_version = ">=0.18.0"

[dependencies]
aztec = { git = "https://github.com/AztecProtocol/aztec-nr/", tag = "v4.0.0-devnet.2-patch.1", directory = "aztec" }
aztec = { git = "https://github.com/AztecProtocol/aztec-nr/", tag = "v4.2.0-aztecnr-rc.2", directory = "aztec" }
Loading
Loading