Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SHELL ["/bin/bash", "-c"]

ENV NVM_DIR=/root/.nvm
ENV NODE_VERSION=24.12.0
ARG AZTEC_VERSION=4.3.0
ARG AZTEC_VERSION=5.0.0-rc.1
ENV AZTEC_VERSION=$AZTEC_VERSION
ENV NON_INTERACTIVE=1
ENV BIN_PATH=/usr/local/bin
Expand Down
2 changes: 1 addition & 1 deletion .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.3.0
AZTEC_VERSION: 5.0.0-rc.1

steps:
- name: Checkout repository
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ When answering questions about the Aztec network, protocol, SDK, or tooling, fet

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.3.0`** — pinned across `Nargo.toml`, `package.json`, `config/*.json`, and README. All must stay in sync when updating.
**Aztec version: `5.0.0-rc.1`** — pinned across `Nargo.toml`, `package.json`, `config/*.json`, and README. All must stay in sync when updating.

## Build & Development Commands

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.3.0", directory = "aztec" }
aztec = { git = "https://github.com/AztecProtocol/aztec-nr/", tag = "v5.0.0-rc.1", directory = "aztec" }
6 changes: 3 additions & 3 deletions ONBOARDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This guide takes you from "reading code in a browser" to "deploying contracts"
* **Phases 1-2** need only a browser (read code, compile in a Codespace)
* **Phases 3-6** need local tools (deploy, interact, extend, advanced topics)

**Aztec version pinned in this repo:** `4.3.0` (check `Nargo.toml` and `package.json` for source of truth)
**Aztec version pinned in this repo:** `5.0.0-rc.1` (check `Nargo.toml` and `package.json` for source of truth)

**Links:**

Expand Down Expand Up @@ -522,7 +522,7 @@ The `.devcontainer/` configures:

* **Base image:** Ubuntu 24.04 with Node.js v22.15.0
* **Docker-in-Docker** for running the Aztec local network
* **Aztec CLI** installed via `curl -fsSL "https://install.aztec.network/4.3.0" | VERSION="4.3.0" bash -s`
* **Aztec CLI** installed via `curl -fsSL "https://install.aztec.network/5.0.0-rc.1" | VERSION="5.0.0-rc.1" bash -s`
* **VS Code extension:** `noir-lang.vscode-noir` for Noir syntax highlighting
* **Dependencies:** `yarn install` runs automatically

Expand Down Expand Up @@ -733,7 +733,7 @@ pub unconstrained fn setup() -> (TestEnvironment, AztecAddress, AztecAddress) {
**Aztec toolkit:**

```bash
export VERSION=4.3.0
export VERSION=5.0.0-rc.1
curl -fsSL "https://install.aztec.network/${VERSION}" | VERSION="${VERSION}" bash -s
```

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Use **Node.js version 22.15.0**.
Install the **Aztec toolkit** (local network, CLI, and other tooling) at the correct version:

```bash
export VERSION=4.3.0
export VERSION=5.0.0-rc.1
curl -fsSL "https://install.aztec.network/${VERSION}" | VERSION="${VERSION}" bash -s
```

Expand Down
2 changes: 1 addition & 1 deletion config/local-network.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"settings": {
"skipLocalNetwork": false,
"version": "4.3.0"
"version": "5.0.0-rc.1"
},
"timeouts": {
"deployTimeout": 120000,
Expand Down
6 changes: 3 additions & 3 deletions docs/ONBOARDING.src.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This guide takes you from "reading code in a browser" to "deploying contracts"
- **Phases 1-2** need only a browser (read code, compile in a Codespace)
- **Phases 3-6** need local tools (deploy, interact, extend, advanced topics)

**Aztec version pinned in this repo:** `4.3.0` (check `Nargo.toml` and `package.json` for source of truth)
**Aztec version pinned in this repo:** `5.0.0-rc.1` (check `Nargo.toml` and `package.json` for source of truth)

**Links:**

Expand Down Expand Up @@ -262,7 +262,7 @@ The `.devcontainer/` configures:

- **Base image:** Ubuntu 24.04 with Node.js v22.15.0
- **Docker-in-Docker** for running the Aztec local network
- **Aztec CLI** installed via `curl -fsSL "https://install.aztec.network/4.3.0" | VERSION="4.3.0" bash -s`
- **Aztec CLI** installed via `curl -fsSL "https://install.aztec.network/5.0.0-rc.1" | VERSION="5.0.0-rc.1" bash -s`
- **VS Code extension:** `noir-lang.vscode-noir` for Noir syntax highlighting
- **Dependencies:** `yarn install` runs automatically

Expand Down Expand Up @@ -357,7 +357,7 @@ And higher-level helpers:
**Aztec toolkit:**

```bash
export VERSION=4.3.0
export VERSION=5.0.0-rc.1
curl -fsSL "https://install.aztec.network/${VERSION}" | VERSION="${VERSION}" bash -s
```

Expand Down
37 changes: 19 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,35 @@
"private": true,
"type": "module",
"scripts": {
"fees": "NODE_NO_WARNINGS=1 node --loader ts-node/esm scripts/fees.ts",
"fees": "NODE_NO_WARNINGS=1 tsx scripts/fees.ts",
"clean": "rm -rf ./src/artifacts ./target ./codegenCache.json",
"clear-store": "rm -rf ./store",
"codegen": "aztec codegen target --outdir src/artifacts",
"compile": "aztec compile",
"deploy": "NODE_NO_WARNINGS=1 node --loader ts-node/esm scripts/deploy_contract.ts",
"deploy-account": "NODE_NO_WARNINGS=1 node --loader ts-node/esm scripts/deploy_account.ts",
"interaction-existing-contract": "NODE_NO_WARNINGS=1 node --loader ts-node/esm scripts/interaction_existing_contract.ts",
"multiple-wallet": "NODE_NO_WARNINGS=1 node --loader ts-node/esm scripts/multiple_wallet.ts",
"get-block": "NODE_NO_WARNINGS=1 node --loader ts-node/esm scripts/get_block.ts",
"profile": "NODE_NO_WARNINGS=1 node --loader ts-node/esm scripts/profile_deploy.ts",
"read-logs": "NODE_NO_WARNINGS=1 LOG_LEVEL='info; debug:contract_log' node --loader ts-node/esm scripts/read_debug_logs.ts",
"deploy": "NODE_NO_WARNINGS=1 tsx scripts/deploy_contract.ts",
"deploy-account": "NODE_NO_WARNINGS=1 tsx scripts/deploy_account.ts",
"interaction-existing-contract": "NODE_NO_WARNINGS=1 tsx scripts/interaction_existing_contract.ts",
"multiple-wallet": "NODE_NO_WARNINGS=1 tsx scripts/multiple_wallet.ts",
"get-block": "NODE_NO_WARNINGS=1 tsx scripts/get_block.ts",
"profile": "NODE_NO_WARNINGS=1 tsx scripts/profile_deploy.ts",
"read-logs": "NODE_NO_WARNINGS=1 LOG_LEVEL='info; debug:contract_log' tsx scripts/read_debug_logs.ts",
"test": "yarn test:js && yarn test:nr",
"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",
"test:nr": "aztec test",
"docs:build": "remark docs/ONBOARDING.src.md -o ONBOARDING.md",
"update-readme-version": "node ./.github/scripts/update-readme-version.js"
},
"dependencies": {
"@aztec/accounts": "4.3.0",
"@aztec/aztec.js": "4.3.0",
"@aztec/constants": "4.3.0",
"@aztec/entrypoints": "4.3.0",
"@aztec/noir-contracts.js": "4.3.0",
"@aztec/protocol-contracts": "4.3.0",
"@aztec/pxe": "4.3.0",
"@aztec/stdlib": "4.3.0",
"@aztec/wallet-sdk": "4.3.0",
"@aztec/wallets": "4.3.0",
"@aztec/accounts": "5.0.0-rc.1",
"@aztec/aztec.js": "5.0.0-rc.1",
"@aztec/constants": "5.0.0-rc.1",
"@aztec/entrypoints": "5.0.0-rc.1",
"@aztec/noir-contracts.js": "5.0.0-rc.1",
"@aztec/protocol-contracts": "5.0.0-rc.1",
"@aztec/pxe": "5.0.0-rc.1",
"@aztec/stdlib": "5.0.0-rc.1",
"@aztec/wallet-sdk": "5.0.0-rc.1",
"@aztec/wallets": "5.0.0-rc.1",
"dotenv": "^17.2.2"
},
"devDependencies": {
Expand All @@ -49,6 +49,7 @@
"remark-cli": "^12.0.1",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.2",
"tsx": "^4.22.4",
"typescript": "^5.4.4"
},
"jest": {
Expand Down
11 changes: 5 additions & 6 deletions scripts/deploy_contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,11 @@ async function main() {
await deployRequest.simulate({
from: address,
});
const { contract: podRacingContract, receipt: deployReceipt } = await deployRequest.send({
const { contract: podRacingContract, instance } = await deployRequest.send({
from: address,
fee: { paymentMethod: sponsoredPaymentMethod },
wait: { timeout: timeouts.deployTimeout }
});
const instance = deployReceipt.instance;
// docs:end:deploy-contract

logger.info(`🎉 Pod Racing Contract deployed successfully!`);
Expand All @@ -68,10 +67,10 @@ async function main() {
logger.info(`Salt: ${instance.salt}`);
logger.info(`Deployer: ${instance.deployer}`);
if (instance.publicKeys) {
logger.info(`Public Keys - Master Nullifier: ${instance.publicKeys.masterNullifierPublicKey}`);
logger.info(`Public Keys - Master Incoming Viewing: ${instance.publicKeys.masterIncomingViewingPublicKey}`);
logger.info(`Public Keys - Master Outgoing Viewing: ${instance.publicKeys.masterOutgoingViewingPublicKey}`);
logger.info(`Public Keys - Master Tagging: ${instance.publicKeys.masterTaggingPublicKey}`);
logger.info(`Public Keys - Master Nullifier: ${instance.publicKeys.npkMHash}`);
logger.info(`Public Keys - Master Incoming Viewing: ${instance.publicKeys.ivpkM}`);
logger.info(`Public Keys - Master Outgoing Viewing: ${instance.publicKeys.ovpkMHash}`);
logger.info(`Public Keys - Master Tagging: ${instance.publicKeys.tpkMHash}`);
}
logger.info(`Constructor args: ${JSON.stringify([address.toString()])}`);
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/fees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { createAztecNodeClient } from '@aztec/aztec.js/node';
import { AztecAddress } from '@aztec/aztec.js/addresses';
import { NO_FROM } from '@aztec/aztec.js/account';
import { getAztecNodeUrl, getTimeouts } from '../config/config.js';
import { GasSettings } from '@aztec/stdlib/gas';
import { GasSettings, Gas } from '@aztec/stdlib/gas';

const MNEMONIC = 'test test test test test test test test test test test junk';
const FEE_FUNDING_FOR_TESTER_ACCOUNT = 1000000000000000000000n;
Expand Down Expand Up @@ -153,7 +153,7 @@ async function main() {
})).result}`);

const maxFeesPerGas = (await node.getCurrentMinFees()).mul(1.5);
const gasSettings = GasSettings.fallback({ maxFeesPerGas });
const gasSettings = GasSettings.fallback({ gasLimits: Gas.from(nodeInfo.txsLimits.gas), maxFeesPerGas });

const privateFee = new PrivateFeePaymentMethod(fpc.address, account2.address, wallet, gasSettings);
await bananaCoin.methods.transfer_in_private(account2.address, account1.address, 10, 0).simulate({ from: account2.address });
Expand Down
4 changes: 2 additions & 2 deletions src/main.nr
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use ::aztec::macros::aztec;
pub contract PodRacing {
use ::aztec::{
macros::{functions::{external, initializer, only_self}, storage::storage},
messages::message_delivery::MessageDelivery,
messages::delivery::MessageDelivery,
note::note_getter_options::NoteGetterOptions,
oracle::logging::debug_log_format,
};
Expand Down Expand Up @@ -147,7 +147,7 @@ pub contract PodRacing {
.at(game_id)
.at(player)
.insert(GameRoundNote::new(track1, track2, track3, track4, track5, round, player))
.deliver(MessageDelivery.ONCHAIN_CONSTRAINED);
.deliver(MessageDelivery::onchain_constrained());

// Enqueue a public function call to update the round counter
// This reveals that a round was played, but not the point allocation
Expand Down
6 changes: 3 additions & 3 deletions src/test/e2e/accounts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,18 +198,18 @@ describe("Accounts", () => {
deployer: deployerAccount.getAddress()
});
const deployer = new ContractDeployer(PodRacingArtifact, wallet);
const { receipt } = await deployer.deploy([adminAddress], { salt, deployer: deployerAccount.getAddress() }).send({
const { contract: deployedContract, receipt } = await deployer.deploy([adminAddress], { salt, deployer: deployerAccount.getAddress() }).send({
from: deployerAddress,
fee: { paymentMethod: sponsoredPaymentMethod },
wait: { timeout: getTimeouts().deployTimeout, returnReceipt: true }
wait: { timeout: getTimeouts().deployTimeout }
});

expect(await wallet.getContractMetadata(deploymentData.address)).toBeDefined();
const metadata = await wallet.getContractMetadata(deploymentData.address);
expect(metadata.instance).toBeTruthy();
// Transaction succeeded if we got here - status could be PROPOSED, CHECKPOINTED, PROVEN, or FINALIZED
expect([TxStatus.PROPOSED, TxStatus.CHECKPOINTED, TxStatus.PROVEN, TxStatus.FINALIZED]).toContain(receipt.status);
expect(receipt.contract.address).toEqual(deploymentData.address);
expect(deployedContract.address).toEqual(deploymentData.address);
})

});
Loading
Loading