Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
9d83554
fix(pxe): cap event filter toBlock to last synced block (#22573)
nchamo Apr 15, 2026
2059373
fix(pxe): round tx expiration timestamp to reduce precision (#22577)
nchamo Apr 15, 2026
478fcf1
fix: eliminate anvil watcher warp race and false success logs (#22584)
just-mitch Apr 15, 2026
31c2395
refactor: aztec new and init creating 2 crates (#20681)
benesjan Feb 20, 2026
54b43f8
test: aztec new scaffold works (#20711)
benesjan Feb 20, 2026
7f1e5ad
feat(cli): warning if contract crate has tests (#20723)
benesjan Feb 24, 2026
105133b
feat(cli): auto-recompiling when aztec test is run (#20729)
benesjan Mar 6, 2026
d78e19c
feat: aztec new supporting multiple contract crates (#21007)
benesjan Mar 4, 2026
7494f11
feat: asserts that aztec dep version matches cli (#21245)
AztecBot Mar 27, 2026
42ecd02
fix: move migration notes to TBD section and restore #include_code macro
benesjan Apr 16, 2026
a327ba7
chore: backport aztec CLI improvements to v4-next (#22587)
benesjan Apr 16, 2026
3ac1a74
feat: check noir release has nargo binaries before releasing (#22551)
benesjan Apr 16, 2026
c87faa9
chore: cache chainInfo in embeddedwallet (#22592)
Thunkar Apr 16, 2026
de8128b
fix: wrap external getCapsule in transactionAsync (#22595)
mverzilli Apr 16, 2026
3a87020
fix(pxe): throw clear error for invalid comparator in pick_notes (#22…
nchamo Apr 16, 2026
478f32a
refactor(aztec-nr): rename conversion fns to encode_/decode_ naming (…
nchamo Apr 16, 2026
5249708
feat: infrastructure for testing `[new_contract_artfiacts, old_aztec_…
benesjan Apr 16, 2026
64de724
chore: fix unnecessary and inconsistent side-effect counter increment…
nventuro Apr 16, 2026
76db45e
fix: update FaceID wallet redirects and strip anchors in redirect val…
critesjosh Apr 16, 2026
6e5107b
docs: add getting started on testnet guide (#22366)
critesjosh Apr 16, 2026
26e20c7
docs: add getting started on testnet guide (backport #22366) (#22619)
critesjosh Apr 16, 2026
18895d5
feat(aztec-nr): new BoundedVec emit private log APIs (#22064)
nchamo Apr 16, 2026
a8f46eb
cherry-pick: fix(docs): use label-based API version mapping in v4.2.0…
critesjosh Apr 16, 2026
9badce9
fix: resolve cherry-pick conflicts by reverting wrong target
AztecBot Apr 16, 2026
aaf8d20
fix(docs): use label-based API version mapping in docs-developers azt…
AztecBot Apr 16, 2026
ed5a823
fix: adding transactions to PXE stores (#22603)
Thunkar Apr 16, 2026
0357421
fix(pxe): stop block synchronizer on PXE shutdown (backport #22604)
benesjan Apr 16, 2026
b4b1746
fix: resolve cherry-pick conflicts
AztecBot Apr 17, 2026
e78799a
fix(aztec): respect TEST_ACCOUNTS env var in local network mode (#22600)
benesjan Apr 17, 2026
565fbc5
fix(pxe): stop block synchronizer on PXE shutdown (backport #22604)
AztecBot Apr 17, 2026
36b3a47
fix: check all aztec-nr dependency tags, not just aztec (#22483)
benesjan Apr 17, 2026
c63c959
chore: remove stray empty yarn.lock
AztecBot Apr 17, 2026
fca5590
fix: reuse anchor block in kernel oracle (#22631)
Thunkar Apr 17, 2026
8d795ad
Merge branch 'backport-to-v4-next-staging' into claudebox/backport-22…
benesjan Apr 17, 2026
c09cf24
fix(pxe): stop block synchronizer on PXE shutdown (backport #22604) (…
benesjan Apr 17, 2026
b67c876
chore: cherry-pick PR #22590 (conflicts unresolved)
benesjan Apr 17, 2026
6b89b4a
fix: resolve cherry-pick conflicts for PR #22590
AztecBot Apr 17, 2026
8852e76
fix(pxe): queue registerSender wipe to avoid racing with in-flight jo…
nchamo Apr 17, 2026
04b4e95
fix(pxe): bounds-check PropertySelector in pick_notes (#22614)
nchamo Apr 17, 2026
0fb8e4d
fix(pxe): guard private event store rollback against in-flight jobs (…
nchamo Apr 17, 2026
e50e05e
refactor(pxe): rename sideEffectCounter to initialSideEffectCounter (…
nchamo Apr 17, 2026
95ed47b
fix(pxe): correct stale authwitness comment and inverted tagging erro…
nchamo Apr 17, 2026
ba5b625
Merge branch 'backport-to-v4-next-staging' into claudebox/backport-22…
benesjan Apr 17, 2026
2040c38
fix: recreate target/ dir before extracting pinned-protocol-contracts
AztecBot Apr 17, 2026
056420a
fix(aztec-nr): range-check auth witness fields before byte cast (#22624)
nchamo Apr 17, 2026
b4e90ff
fix(pxe): serialize block stream event handling to prevent race condi…
nchamo Apr 17, 2026
bb75dd9
refactor: unify contract compilation pipeline via bb aztec_process (b…
benesjan Apr 17, 2026
23cde9a
Merge branch 'backport-to-v4-next-staging' into claudebox/backport-22…
critesjosh Apr 17, 2026
9e878ae
fix(docs): backport #22617 — label-based API version mapping (v4-next…
critesjosh Apr 17, 2026
d45a673
fix(pxe): throw error on origin/contract address mismatch in simulati…
nchamo Apr 17, 2026
1d60dfe
cherry-pick: fix(docs): restore operator changelog v4.md and add v4.2…
critesjosh Apr 17, 2026
fc36658
fix: resolve cherry-pick conflicts
AztecBot Apr 17, 2026
54eb650
fix: adapt backport for v4-next (no v4.2.0 version yet)
AztecBot Apr 17, 2026
1c34bec
fix(docs): restore operator changelog v4.md (backport #22609) (#22639)
critesjosh Apr 17, 2026
eb4aad8
Merge branch 'v4-next' into backport-to-v4-next-staging
Thunkar Apr 17, 2026
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 aztec-up/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ EOF
}

function test_cmds {
for test in amm_flow bridge_and_claim basic_install counter_contract; do
for test in amm_flow bridge_and_claim basic_install counter_contract default_scaffold; do
echo "$hash:TIMEOUT=15m aztec-up/scripts/run_test.sh $test"
done
}
Expand Down
34 changes: 22 additions & 12 deletions aztec-up/test/counter_contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,38 @@ set -euo pipefail
export LOG_LEVEL=silent

# Execute commands as per: https://docs.aztec.network/tutorials/codealong/contract_tutorials/counter_contract
aztec new counter_contract
if [ ! -f counter_contract/Nargo.toml ] || [ ! -f counter_contract/src/main.nr ]; then
echo "Failed to create contract."
aztec new counter

# Verify workspace structure
if [ ! -f counter/Nargo.toml ]; then
echo "Failed to create workspace Nargo.toml."
exit 1
fi
if [ ! -f counter/counter_contract/Nargo.toml ] || [ ! -f counter/counter_contract/src/main.nr ]; then
echo "Failed to create contract crate."
exit 1
fi
if [ ! -f counter/counter_test/Nargo.toml ] || [ ! -f counter/counter_test/src/lib.nr ]; then
echo "Failed to create test crate."
exit 1
fi

# Check counter_contract dir is owned by aztec-dev.
if [ "$(stat -c %U counter_contract)" != "ubuntu" ]; then
echo "counter_contract dir is not owned by ubuntu."
# Check counter dir is owned by ubuntu.
if [ "$(stat -c %U counter)" != "ubuntu" ]; then
echo "counter dir is not owned by ubuntu."
exit 1
fi

# "Write" our contract.
cp -Rf ./aztec-packages/noir-projects/noir-contracts/contracts/test/counter_contract .
cd counter_contract
sed -i 's|\.\./\.\./\.\./\.\./|/home/ubuntu/aztec-packages/noir-projects/|g' Nargo.toml
# "Write" our contract over the scaffold.
cp -Rf ./aztec-packages/noir-projects/noir-contracts/contracts/test/counter/* counter/
cd counter
sed -i 's|\.\./\.\./\.\./\.\./\.\./|/home/ubuntu/aztec-packages/noir-projects/|g' counter_contract/Nargo.toml counter_test/Nargo.toml

# Compile the contract.
aztec compile
# Codegen
aztec codegen -o src/artifacts target
if [ ! -d src/artifacts ]; then
aztec codegen -o counter_contract/src/artifacts target
if [ ! -d counter_contract/src/artifacts ]; then
echo "Failed to codegen TypeScript."
exit 1
fi
Expand Down
66 changes: 66 additions & 0 deletions aztec-up/test/default_scaffold.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/usr/bin/env bash
set -euo pipefail

# Tests that the default scaffold generated by `aztec new` compiles and passes its tests without any modifications.
# Also tests that a second contract can be added to the workspace with `aztec new`.

export LOG_LEVEL=silent

aztec new my_workspace

# Verify workspace structure with named crate directories.
if [ ! -f my_workspace/Nargo.toml ]; then
echo "Failed to create workspace Nargo.toml."
exit 1
fi
if [ ! -f my_workspace/my_workspace_contract/Nargo.toml ] || [ ! -f my_workspace/my_workspace_contract/src/main.nr ]; then
echo "Failed to create contract crate."
exit 1
fi
if [ ! -f my_workspace/my_workspace_test/Nargo.toml ] || [ ! -f my_workspace/my_workspace_test/src/lib.nr ]; then
echo "Failed to create test crate."
exit 1
fi

cd my_workspace

# This is unfortunate as it makes the test worse but in CI setting the aztec version is 0.0.1 which doesn't exist as
# a remote git tag, so we need to rewrite dependencies to use local aztec-nr.
sed -i 's|aztec = .*git.*AztecProtocol/aztec-nr.*|aztec = { path="/home/ubuntu/aztec-packages/noir-projects/aztec-nr/aztec" }|' \
my_workspace_contract/Nargo.toml my_workspace_test/Nargo.toml

# Compile the default scaffold contract.
aztec compile

# Run the default scaffold tests.
aztec test

# --- Test adding a second contract to the workspace ---
aztec new token

# Verify token crates were created.
if [ ! -f token_contract/Nargo.toml ] || [ ! -f token_contract/src/main.nr ]; then
echo "Failed to create token contract crate."
exit 1
fi
if [ ! -f token_test/Nargo.toml ] || [ ! -f token_test/src/lib.nr ]; then
echo "Failed to create token test crate."
exit 1
fi

# Verify workspace Nargo.toml contains all four members.
if ! grep -q '"my_workspace_contract"' Nargo.toml || \
! grep -q '"my_workspace_test"' Nargo.toml || \
! grep -q '"token_contract"' Nargo.toml || \
! grep -q '"token_test"' Nargo.toml; then
echo "Workspace Nargo.toml does not contain all expected members."
exit 1
fi

# Rewrite aztec deps for token crates too.
sed -i 's|aztec = .*git.*AztecProtocol/aztec-nr.*|aztec = { path="/home/ubuntu/aztec-packages/noir-projects/aztec-nr/aztec" }|' \
token_contract/Nargo.toml token_test/Nargo.toml

# Compile and test the full workspace (both contracts).
aztec compile
aztec test
24 changes: 19 additions & 5 deletions barretenberg/cpp/src/barretenberg/api/aztec_process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,21 @@ bool process_aztec_artifact(const std::string& input_path, const std::string& ou
return true;
}

// Strip __aztec_nr_internals__ prefix from function names.
// The #[aztec] macro generates wrapper functions with this prefix; we strip it so
// the exported ABI exposes the original developer-written names.
const std::string internal_prefix = "__aztec_nr_internals__";
for (auto& function : artifact_json["functions"]) {
auto& name = function["name"];
if (name.is_string()) {
std::string fn_name = name.get<std::string>();
if (fn_name.size() >= internal_prefix.size() &&
fn_name.compare(0, internal_prefix.size(), internal_prefix) == 0) {
name = fn_name.substr(internal_prefix.size());
}
}
}

// Filter to private constrained functions
std::vector<nlohmann::json*> private_functions;
for (auto& function : artifact_json["functions"]) {
Expand All @@ -266,14 +281,13 @@ bool process_aztec_artifact(const std::string& input_path, const std::string& ou
}
}

if (private_functions.empty()) {
if (!private_functions.empty()) {
// Generate VKs
generate_vks_for_functions(cache_dir, private_functions, force);
} else {
info("No private constrained functions found");
return true;
}

// Generate VKs
generate_vks_for_functions(cache_dir, private_functions, force);

// Write updated JSON back to file
std::ofstream out_file(output_path);
out_file << artifact_json.dump(2) << std::endl;
Expand Down
2 changes: 2 additions & 0 deletions boxes/init/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
target/
codegenCache.json
8 changes: 2 additions & 6 deletions boxes/init/Nargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
[package]
name = "init"
type = "contract"

[dependencies]
aztec = { path = "../../noir-projects/aztec-nr/aztec" }
[workspace]
members = ["contract", "test"]
27 changes: 27 additions & 0 deletions boxes/init/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# init

An Aztec Noir contract project.

## Compile

```bash
aztec compile
```

This compiles the contract in `contract/` and outputs artifacts to `target/`.

## Test

```bash
aztec test
```

This runs the tests in `test/`.

## Generate TypeScript bindings

```bash
aztec codegen target -o src/artifacts
```

This generates TypeScript contract artifacts from the compiled output in `target/` into `src/artifacts/`.
6 changes: 6 additions & 0 deletions boxes/init/contract/Nargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "init"
type = "contract"

[dependencies]
aztec = { path = "../../../noir-projects/aztec-nr/aztec" }
10 changes: 10 additions & 0 deletions boxes/init/contract/src/main.nr
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use aztec::macros::aztec;

#[aztec]
pub contract Main {
use aztec::macros::functions::{external, initializer};

#[initializer]
#[external("private")]
fn constructor() {}
}
9 changes: 0 additions & 9 deletions boxes/init/src/main.nr

This file was deleted.

7 changes: 7 additions & 0 deletions boxes/init/test/Nargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "init_test"
type = "lib"

[dependencies]
aztec = { path = "../../../noir-projects/aztec-nr/aztec" }
init = { path = "../contract" }
17 changes: 17 additions & 0 deletions boxes/init/test/src/lib.nr
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
use aztec::test::helpers::test_environment::TestEnvironment;
use init::Main;

#[test]
unconstrained fn test_constructor() {
let mut env = TestEnvironment::new();
let deployer = env.create_light_account();

// Deploy the contract with the default constructor:
let contract_address = env.deploy("@init/Main").with_private_initializer(
deployer,
Main::interface().constructor(),
);

// Deploy without an initializer:
let contract_address = env.deploy("@init/Main").without_initializer();
}
1 change: 0 additions & 1 deletion docs/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ source $(git rev-parse --show-toplevel)/ci3/source_bootstrap
repo_root=$(git rev-parse --show-toplevel)
export BB=${BB:-$repo_root/barretenberg/cpp/build/bin/bb}
export NARGO=${NARGO:-$repo_root/noir/noir-repo/target/release/nargo}
export TRANSPILER=${TRANSPILER:-$repo_root/avm-transpiler/target/release/avm-transpiler}
export BB_HASH=${BB_HASH:-$($repo_root/barretenberg/cpp/bootstrap.sh hash)}

# We search the docs/*.md files to find included code, and use those as our rebuild dependencies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tags: [local_network, testnet]
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

Get started on your local environment using a local network.
Get started on your local environment using a local network. If you'd rather deploy to a live network, read the [getting started on testnet guide](./getting_started_on_testnet.md).

The local network is a local development Aztec network running fully on your machine, and interacting with a development Ethereum node. You can develop and deploy on it just like on a testnet or mainnet (when the time comes). The local network makes it faster and easier to develop and test your Aztec applications.

Expand Down Expand Up @@ -252,4 +252,5 @@ Simulation result: 25n
Want to build something cool on Aztec?

- Check out the [Token Contract Tutorial](./docs/tutorials/contract_tutorials/token_contract.md) for a beginner tutorial, or jump into more advanced ones
- Ready for a live network? Try [deploying on testnet](./getting_started_on_testnet.md)
- Start on your own thing and check out the How To Guides to help you!
Loading
Loading