Skip to content

Commit d999a83

Browse files
authored
Merge pull request #232 from AztecProtocol/jc/devnet.20251212
update to devnet 20251212
2 parents 17b1d92 + 6743758 commit d999a83

21 files changed

+438
-382
lines changed

β€Ž.env.exampleβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
POD_RACING_CONTRACT_ADDRESS="0x2320c9938b3e87feb4e475413456d028572f3367e18d61e7d198d342b557f297"
22
SECRET="0x29aa7f43021f964fe46527ff4df0e9211de94274f54eff12ec81070ee3e16300"
33
SALT="0x23c46f2dd4450fb881f0b0e70c3974f84dfa9d199493001b3fe8eb136dc612cd"
4-
AZTEC_ENV=sandbox
4+
AZTEC_ENV=local-network
55
CONTRACT_SALT="0x2d7e8a973f9039f0e2c7771376e131f8ca1c18bd337ee8fa5c6d89db0198645e"
66
CONTRACT_DEPLOYER="0x2e34557bae428d3c489f67e9aa326b41a09faf03f619969b883e413cbec7bc1c"
77
CONTRACT_PK_NULLIFIER="0x01498945581e0eb9f8427ad6021184c700ef091d570892c437d12c7d90364bbd170ae506787c5c43d6ca9255d571c10fa9ffa9d141666e290c347c5c9ab7e344"
Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Sandbox Tests
1+
name: Local Network Tests
22

33
on:
44
push:
@@ -12,12 +12,12 @@ on:
1212
workflow_dispatch:
1313

1414
jobs:
15-
sandbox-tests:
16-
name: Sandbox Tests
15+
local-network-tests:
16+
name: Local Network Tests
1717
runs-on: ubuntu-latest
1818
env:
19-
AZTEC_ENV: sandbox
20-
VERSION: 3.0.0-devnet.5
19+
AZTEC_ENV: local-network
20+
AZTEC_VERSION: 3.0.0-devnet.20251212
2121

2222
steps:
2323
- name: Checkout repository
@@ -40,17 +40,24 @@ jobs:
4040
- name: Update path
4141
run: echo "/home/runner/.aztec/bin" >> $GITHUB_PATH
4242

43-
- name: Set Aztec version and start sandbox
43+
- name: Set Aztec version
4444
run: |
45-
VERSION=${{ env.VERSION }} aztec-up
46-
aztec start --sandbox &
45+
VERSION=${{ env.AZTEC_VERSION }} aztec-up
4746
48-
- name: Wait for sandbox to be ready
47+
# This is a temporary hack to fix a problem with v3 releases.
48+
- name: Manually tag the aztec version as `latest`
4949
run: |
50-
echo "Waiting for sandbox to start..."
50+
docker tag aztecprotocol/aztec:${{ env.AZTEC_VERSION }} aztecprotocol/aztec:latest
51+
52+
- name: Start local Aztec network
53+
run: aztec start --local-network &
54+
55+
- name: Wait for local network to be ready
56+
run: |
57+
echo "Waiting for local network to start..."
5158
for i in {1..30}; do
5259
if curl -s http://localhost:8080/status >/dev/null 2>&1; then
53-
echo "βœ… Sandbox is ready!"
60+
echo "βœ… Local network is ready!"
5461
break
5562
fi
5663
echo "Waiting... ($i/30)"
@@ -61,7 +68,7 @@ jobs:
6168
run: yarn
6269

6370
- name: Compile contracts
64-
run: script -e -c "${AZTEC_NARGO:-aztec-nargo} compile && aztec-postprocess-contract"
71+
run: script -e -c "aztec compile"
6572

6673
- name: Generate contract artifacts
6774
run: script -e -c "aztec codegen target --outdir src/artifacts"
@@ -180,7 +187,7 @@ jobs:
180187
echo "πŸ“‹ Saved constructor args to .env file"
181188
fi
182189
183-
- name: Run sandbox scripts
190+
- name: Run local network scripts
184191
run: |
185192
script -e -c "yarn fees"
186193
script -e -c "yarn multiple-wallet"

β€ŽAGENTS.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Repository guidelines for Codex agents
22

3-
This repository contains TypeScript scripts and Noir contracts for the Aztec sandbox.
3+
This repository contains TypeScript scripts and Noir contracts for the Aztec local network.
44
Follow these guidelines when contributing:
55

66
## Setup
77
- Use **Node.js v22** with Yarn.
88
- Install dependencies with `yarn install`.
9-
- Start the Aztec sandbox using `aztec start --sandbox` before running tests or scripts.
9+
- Start the Aztec local network using `aztec start --local-network` before running tests or scripts.
1010

1111
## Development
1212
- Compile contracts with `yarn compile` and generate TypeScript artifacts with `yarn codegen`.

β€ŽNargo.tomlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ authors = [ "" ]
55
compiler_version = ">=0.18.0"
66

77
[dependencies]
8-
aztec = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-devnet.5", directory = "noir-projects/aztec-nr/aztec" }
8+
aztec = { git = "https://github.com/AztecProtocol/aztec-nr/", tag = "v3.0.0-devnet.20251212", directory = "aztec" }

β€ŽREADME.mdβ€Ž

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66

77
# Aztec Starter
88

9-
## Sandbox
9+
## Local Network
1010

11-
This repo is meant to be a starting point for learning to write Aztec contracts and tests on the Aztec sandbox (local development environment). It includes an example contract, useful commands in `package.json` and helpful scripts in `./scripts`.
11+
This repo is meant to be a starting point for learning to write Aztec contracts and tests on the Aztec local network (local development environment). It includes an example contract, useful commands in `package.json` and helpful scripts in `./scripts`.
1212

1313
You can find the **Pod Racing Game contract** in `./src/main.nr`. A simple integration test is in `./src/test/e2e/index.test.ts`.
1414

1515
The Pod Racing contract is a two-player competitive game where players allocate points across 5 tracks over multiple rounds. The game demonstrates Aztec's private state capabilities - round choices remain private until players reveal their final scores.
1616

1717
## Devnet
1818

19-
This repo connects to a locally running Aztec Sandbox by default, but can be configured to connect to the devnet by specifying `AZTEC_ENV=devnet` in a `.env` file or by prefixing a command e.g. `AZTEC_ENV=devnet yarn deploy`.
19+
This repo connects to a locally running Aztec local network by default, but can be configured to connect to the devnet by specifying `AZTEC_ENV=devnet` in a `.env` file or by prefixing a command e.g. `AZTEC_ENV=devnet yarn deploy`.
2020

2121
<div align="center">
2222

@@ -38,7 +38,7 @@ Use **Node.js version 22.15.0**.
3838

3939
[Start your codespace from the codespace dropdown](https://docs.github.com/en/codespaces/getting-started/quickstart).
4040

41-
Get the **sandbox, aztec-cli, and other tooling** with this command:
41+
Get the **local network, aztec-cli, and other tooling** with this command:
4242

4343
```bash
4444
bash -i <(curl -s https://install.aztec.network)
@@ -47,35 +47,35 @@ bash -i <(curl -s https://install.aztec.network)
4747
Install the correct version of the toolkit with:
4848

4949
```bash
50-
export VERSION=3.0.0-devnet.5
50+
export VERSION=3.0.0-devnet.20251212
5151
aztec-up && docker pull aztecprotocol/aztec:$VERSION && docker tag aztecprotocol/aztec:$VERSION aztecprotocol/aztec:latest
5252
```
5353

5454
### Environment Configuration
5555

5656
This project uses JSON configuration files to manage environment-specific settings:
5757

58-
- `config/sandbox.json` - Configuration for local sandbox development
58+
- `config/local-network.json` - Configuration for local network development
5959
- `config/devnet.json` - Configuration for devnet deployment
6060

61-
The system automatically loads the appropriate configuration file based on the `ENV` environment variable. If `ENV` is not set, it defaults to `sandbox`.
61+
The system automatically loads the appropriate configuration file based on the `ENV` environment variable. If `ENV` is not set, it defaults to `local-network`.
6262

6363
The configuration files contain network URLs, timeouts, and environment-specific settings. You can modify these files to customize your development environment.
6464

65-
### Running on Sandbox (Local Development)
65+
### Running on Local Network (Local Development)
6666

67-
Start the sandbox with:
67+
Start the local network with:
6868

6969
```bash
70-
aztec start --sandbox
70+
aztec start --local-network
7171
```
7272

73-
Run scripts and tests with default sandbox configuration:
73+
Run scripts and tests with default local network configuration:
7474

7575
```bash
7676
yarn compile && yarn codegen # Compile contract and generate TS
77-
yarn deploy # Deploy to sandbox
78-
yarn test # Run tests on sandbox
77+
yarn deploy # Deploy to local network
78+
yarn test # Run tests on local network
7979
```
8080

8181
### Running on Devnet
@@ -104,7 +104,7 @@ yarn install
104104
## πŸ— **Compile**
105105

106106
```bash
107-
aztec-nargo compile
107+
aztec compile
108108
```
109109

110110
or
@@ -125,14 +125,14 @@ yarn codegen
125125

126126
---
127127

128-
:warning: Tests and scripts set up and run the Private Execution Environment (PXE) and store PXE data in the `./store` directory. If you restart the sandbox, you will need to delete the `./store` directory to avoid errors.
128+
:warning: Tests and scripts set up and run the Private Execution Environment (PXE) and store PXE data in the `./store` directory. If you restart the local network, you will need to delete the `./store` directory to avoid errors.
129129

130130
## Transaction Profiling
131131

132-
**Make sure the sandbox is running before profiling.**
132+
**Make sure the local network is running before profiling.**
133133

134134
```bash
135-
aztec start --sandbox
135+
aztec start --local-network
136136
```
137137

138138
Then run an example contract deployment profile with:
@@ -151,10 +151,10 @@ See the [demo-wallet for an example](https://github.com/AztecProtocol/demo-walle
151151

152152
## πŸ§ͺ **Test**
153153

154-
**Make sure the sandbox is running before running tests.**
154+
**Make sure the local network is running before running tests.**
155155

156156
```bash
157-
aztec start --sandbox
157+
aztec start --local-network
158158
```
159159

160160
Then test with:
@@ -165,7 +165,7 @@ yarn test
165165

166166
Testing will run the **TypeScript tests** defined in `index.test.ts` inside `./src/test/e2e`, as well as the [Aztec Testing eXecution Environment (TXE)](https://docs.aztec.network/developers/guides/smart_contracts/testing) tests defined in [`first.nr`](./src/test/first.nr) (imported in the contract file with `mod test;`).
167167

168-
Note: The Typescript tests spawn an instance of the sandbox to test against, and close it once the TS tests are complete.
168+
Note: The Typescript tests spawn an instance of the local network to test against, and close it once the TS tests are complete.
169169

170170
---
171171

@@ -193,7 +193,7 @@ The `./src/utils/` folder contains utility functions:
193193

194194
## ❗ **Error Resolution**
195195

196-
:warning: Tests and scripts set up and run the Private Execution Environment (PXE) and store PXE data in the `./store` directory. If you restart the sandbox, you will need to delete the `./store` directory to avoid errors.
196+
:warning: Tests and scripts set up and run the Private Execution Environment (PXE) and store PXE data in the `./store` directory. If you restart the local network, you will need to delete the `./store` directory to avoid errors.
197197

198198
### πŸ”„ **Update Node.js and Noir Dependencies**
199199

β€Žconfig/config.tsβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface EnvironmentConfig {
2222
environment: 'local' | 'testnet' | 'devnet' | 'mainnet';
2323
network: NetworkConfig;
2424
settings: {
25-
skipSandbox: boolean;
25+
skipLocalNetwork: boolean;
2626
version: string;
2727
};
2828
timeouts?: TimeoutConfig;
@@ -34,7 +34,7 @@ export class ConfigManager {
3434
private configPath: string;
3535

3636
private constructor() {
37-
const env = process.env.AZTEC_ENV || 'sandbox';
37+
const env = process.env.AZTEC_ENV || 'local-network';
3838
this.configPath = path.resolve(process.cwd(), `config/${env}.json`);
3939
this.loadConfig();
4040
console.log(`Loaded configuration: ${this.config.name} environment`);
@@ -69,7 +69,7 @@ export class ConfigManager {
6969
return this.config.environment === 'devnet';
7070
}
7171

72-
public isSandbox(): boolean {
72+
public isLocalNetwork(): boolean {
7373
return this.config.environment === 'local';
7474
}
7575

β€Žconfig/devnet.jsonβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
"name": "devnet",
33
"environment": "devnet",
44
"network": {
5-
"nodeUrl": "https://devnet.aztec-labs.com/",
5+
"nodeUrl": "https://next.devnet.aztec-labs.com",
66
"l1RpcUrl": "https://ethereum-sepolia-rpc.publicnode.com",
77
"l1ChainId": 11155111
88
},
99
"settings": {
10-
"skipSandbox": true,
11-
"version": "3.0.0-devnet.5"
10+
"skipLocalNetwork": true,
11+
"version": "3.0.0-devnet.20251212"
1212
},
1313
"timeouts": {
1414
"deployTimeout": 1200000,
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
2-
"name": "sandbox",
2+
"name": "local-network",
33
"environment": "local",
44
"network": {
55
"nodeUrl": "http://localhost:8080",
66
"l1RpcUrl": "http://localhost:8545",
77
"l1ChainId": 31337
88
},
99
"settings": {
10-
"skipSandbox": false,
11-
"version": "3.0.0-devnet.5"
10+
"skipLocalNetwork": false,
11+
"version": "3.0.0-devnet.20251212"
1212
},
1313
"timeouts": {
1414
"deployTimeout": 120000,
1515
"txTimeout": 60000,
1616
"waitTimeout": 30000
1717
}
18-
}
18+
}

β€Žpackage.jsonβ€Ž

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"clean": "rm -rf ./src/artifacts ./target",
1414
"clear-store": "rm -rf ./store",
1515
"codegen": "aztec codegen target --outdir src/artifacts",
16-
"compile": "${AZTEC_NARGO:-aztec-nargo} compile && aztec-postprocess-contract",
16+
"compile": "aztec compile",
1717
"deploy": "NODE_NO_WARNINGS=1 node --loader ts-node/esm scripts/deploy_contract.ts",
1818
"deploy::devnet": "NODE_NO_WARNINGS=1 AZTEC_ENV=devnet node --loader ts-node/esm scripts/deploy_contract.ts",
1919
"deploy-account": "NODE_NO_WARNINGS=1 node --loader ts-node/esm scripts/deploy_account.ts",
@@ -30,17 +30,16 @@
3030
"test::devnet": "AZTEC_ENV=devnet yarn test:js",
3131
"test:js": "rm -rf store/pxe && NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --runInBand --config jest.integration.config.json",
3232
"test:nr": "aztec test",
33-
"update": "./.github/scripts/update_contract.sh $(grep -oP 'tag\\s*=\\s*\"\\K[^\"]+' \"Nargo.toml\" | head -1) && yarn && yarn update-readme-version",
3433
"update-readme-version": "node ./.github/scripts/update-readme-version.js"
3534
},
3635
"dependencies": {
37-
"@aztec/accounts": "3.0.0-devnet.5",
38-
"@aztec/aztec.js": "3.0.0-devnet.5",
39-
"@aztec/noir-contracts.js": "3.0.0-devnet.5",
40-
"@aztec/protocol-contracts": "3.0.0-devnet.5",
41-
"@aztec/pxe": "3.0.0-devnet.5",
42-
"@aztec/stdlib": "3.0.0-devnet.5",
43-
"@aztec/test-wallet": "3.0.0-devnet.5",
36+
"@aztec/accounts": "3.0.0-devnet.20251212",
37+
"@aztec/aztec.js": "3.0.0-devnet.20251212",
38+
"@aztec/noir-contracts.js": "3.0.0-devnet.20251212",
39+
"@aztec/protocol-contracts": "3.0.0-devnet.20251212",
40+
"@aztec/pxe": "3.0.0-devnet.20251212",
41+
"@aztec/stdlib": "3.0.0-devnet.20251212",
42+
"@aztec/test-wallet": "3.0.0-devnet.20251212",
4443
"dotenv": "^17.2.2"
4544
},
4645
"devDependencies": {

β€Žscripts/deploy_contract.tsβ€Ž

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { PodRacingContract } from "../src/artifacts/PodRacing.js"
22
import { Logger, createLogger } from "@aztec/aztec.js/log";
33
import { SponsoredFeePaymentMethod } from "@aztec/aztec.js/fee/testing";
4-
import { Fr } from "@aztec/aztec.js/fields";
5-
import { TokenContract } from "@aztec/noir-contracts.js/Token"
64
import { setupWallet } from "../src/utils/setup_wallet.js";
75
import { getSponsoredFPCInstance } from "../src/utils/sponsored_fpc.js";
86
import { SponsoredFPCContract } from "@aztec/noir-contracts.js/SponsoredFPC";
@@ -28,7 +26,7 @@ async function main() {
2826
logger.info(`πŸ’° Sponsored FPC instance obtained at: ${sponsoredFPC.address}`);
2927

3028
logger.info('πŸ“ Registering sponsored FPC contract with wallet...');
31-
await wallet.registerContract({ instance: sponsoredFPC, artifact: SponsoredFPCContract.artifact });
29+
await wallet.registerContract(sponsoredFPC, SponsoredFPCContract.artifact);
3230
const sponsoredPaymentMethod = new SponsoredFeePaymentMethod(sponsoredFPC.address);
3331
logger.info('βœ… Sponsored fee payment method configured');
3432

@@ -42,13 +40,13 @@ async function main() {
4240
logger.info('🏎️ Starting pod racing contract deployment...');
4341
logger.info(`πŸ“‹ Admin address for pod racing contract: ${address}`);
4442

45-
const deployTx = PodRacingContract.deploy(wallet, address).send({
43+
const deployMethod = PodRacingContract.deploy(wallet, address).send({
4644
from: address,
4745
fee: { paymentMethod: sponsoredPaymentMethod }
4846
});
4947

5048
logger.info('⏳ Waiting for deployment transaction to be mined...');
51-
const podRacingContract = await deployTx.deployed({ timeout: timeouts.deployTimeout });
49+
const podRacingContract = await deployMethod.deployed({ timeout: timeouts.deployTimeout });
5250

5351
logger.info(`πŸŽ‰ Pod Racing Contract deployed successfully!`);
5452
logger.info(`πŸ“ Contract address: ${podRacingContract.address}`);
@@ -59,7 +57,7 @@ async function main() {
5957
logger.info('βœ… Contract deployed and ready for game creation');
6058

6159
// Get contract instance for instantiation data
62-
const instance = podRacingContract.instance;
60+
const instance = await deployMethod.getInstance();
6361
if (instance) {
6462
logger.info('πŸ“¦ Contract instantiation data:');
6563
logger.info(`Salt: ${instance.salt}`);
@@ -72,7 +70,6 @@ async function main() {
7270
}
7371
logger.info(`Constructor args: ${JSON.stringify([address.toString()])}`);
7472
}
75-
7673
logger.info('🏁 Deployment process completed successfully!');
7774
logger.info(`πŸ“‹ Summary:`);
7875
logger.info(` - Contract Address: ${podRacingContract.address}`);

0 commit comments

Comments
Β (0)