Skip to content

Add testnet config and upgrade Aztec to 4.1.0-rc.2#248

Open
critesjosh wants to merge 16 commits intotestnetfrom
josh/add-testnet-config
Open

Add testnet config and upgrade Aztec to 4.1.0-rc.2#248
critesjosh wants to merge 16 commits intotestnetfrom
josh/add-testnet-config

Conversation

@critesjosh
Copy link
Collaborator

@critesjosh critesjosh commented Mar 10, 2026

Summary

  • Add config/testnet.json targeting https://rpc.testnet.aztec-labs.com
  • Add isTestnet() and isRemoteNetwork() helpers to ConfigManager
  • Add ::testnet script variants for all scripts (deploy, test, read-logs, etc.)
  • Add .github/workflows/testnet.yaml CI workflow for the testnet branch
  • Upgrade all Aztec dependencies from 4.0.0-devnet.2-patch.1 to 4.1.0-rc.2
  • Update scripts and tests for v4.1.0-rc.2 API changes (deploy result shape, simulate result wrapping)
  • Add /update-version slash command for Claude Code

Branch strategy

  • next — tracks devnet version, devnet CI runs here
  • testnet — tracks testnet version, testnet CI runs here

Test plan

  • yarn compile && yarn codegen succeeds
  • yarn deploy-account::testnet deploys to testnet
  • yarn deploy::testnet deploys contract to testnet
  • Testnet CI workflow passes

🤖 Generated with Claude Code

critesjosh and others added 3 commits March 10, 2026 17:14
Add config/testnet.json targeting https://rpc.testnet.aztec-labs.com, add
isTestnet()/isRemoteNetwork() helpers to ConfigManager, add ::testnet
script variants, and upgrade all Aztec dependencies from
4.0.0-devnet.2-patch.1 to 4.1.0-rc.2.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@critesjosh critesjosh changed the base branch from next to testnet March 10, 2026 21:24
@critesjosh critesjosh marked this pull request as ready for review March 11, 2026 00:34
critesjosh and others added 13 commits March 10, 2026 20:36
Deploy send() now returns { contract, receipt } instead of contract
directly. Simulate results now wrapped in { result } object.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Add testnet branch to local-network.yaml PR triggers. Read
AZTEC_VERSION from config/local-network.json so it stays in sync
with the branch's pinned version automatically.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
On testnet there is no SponsoredFPC, so we mint fee juice on Sepolia
L1 and bridge it to L2 using L1FeeJuicePortalManager. The deploy
account script now uses FeeJuicePaymentMethodWithClaim on testnet
and falls back to SponsoredFPC on devnet/local.

Requires L1_PRIVATE_KEY env var (Sepolia-funded) for testnet.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
createExtendedL1Client requires the 0x prefix to distinguish
private keys from mnemonics. Auto-prefix if missing.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
The L1 fee juice portal enforces a fixed mint amount of
1000000000000000000000 (1000e18).

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Check the account's fee juice balance on L2 before bridging from L1.
If the account already has fee juice (e.g. from a previous run), skip
the mint+bridge step and deploy without a claim payment method.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Only one testnet deploy can run at a time since they share the same
L1 account. Concurrent runs cause 'replacement transaction underpriced'
errors from nonce collisions on Sepolia.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
The upstream L1TokenManager.mint() doesn't wait for the tx receipt,
so the subsequent approve tx gets sent before the mint confirms,
causing 'replacement transaction underpriced' nonce conflicts.

Work around this by calling the mint handler directly and waiting
for the receipt before calling bridgeTokensPublic(mint=false).

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Cancel in-progress runs when a new push arrives on the same branch,
so stale jobs don't waste runner time.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Viem caches nonces per client instance. When mint is skipped (tokens
already on L1), the original client may have a stale nonce from
previous runs. Create a fresh client right before bridging so viem
fetches the current on-chain nonce.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Use configManager.getNetworkConfig() instead of double getConfig()
- Add max poll attempts (40 * 30s = 20min) to prevent infinite loop
- Use const instead of let for logger, secretKey, signingKey, salt
- Remove any type from sendOpts, use spread operator
- Read AZTEC_VERSION from config in testnet.yaml (matching local-network)

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant