Getting Started on Testnet
This guide walks you through deploying your first contract on the Aztec testnet. You will install the CLI tools, create an account using the Sponsored FPC (so you don't need to bridge Fee Juice yourself), and deploy and interact with a contract.
Testnet vs Local Network
| Feature | Local Network | Testnet |
|---|---|---|
| Environment | Local machine | Decentralized network on Sepolia |
| Fees | Free (test accounts prefunded) | Sponsored FPC available |
| Block times | Instant | ~36 seconds |
| Proving | Optional | Required |
| Accounts | Test accounts pre-deployed | Must create and deploy your own |
If you want to develop and iterate quickly, start with the local network guide. The local network has instant blocks and no proving, making it faster for development.
Prerequisites
-
Aztec libraries require Node.js version 24. If you have an older version installed, the installer will try to upgrade via nvm if available. If nvm is not installed, you will need to upgrade Node.js manually (e.g.
nvm install 24after installing nvm).
Install the Aztec toolchain
Install the testnet version of the Aztec CLI:
VERSION=4.2.0-aztecnr-rc.2 bash -i <(curl -sL https://install.aztec.network/4.2.0-aztecnr-rc.2)
Testnet is version-dependent. It is currently running version 4.2.0-aztecnr-rc.2. Maintain version consistency when interacting with the testnet to avoid errors.
This installs:
- aztec - Compiles and tests Aztec contracts, launches infrastructure, and provides utility commands
- aztec-up - Version manager for the Aztec toolchain (
aztec-up install,aztec-up use,aztec-up list) - aztec-wallet - CLI tool for interacting with the Aztec network
Getting started on testnet
Step 1: Set up your environment
Set the required environment variables:
export NODE_URL=https://rpc.testnet.aztec-labs.com
export SPONSORED_FPC_ADDRESS=0x254082b62f9108d044b8998f212bb145619d91bfcd049461d74babb840181257
Step 2: Register the Sponsored FPC
The Sponsored FPC (Fee Payment Contract) pays transaction fees on your behalf, so you don't need to bridge Fee Juice from L1. Register it in your wallet:
aztec-wallet register-contract \
--node-url $NODE_URL \
--alias sponsoredfpc \
$SPONSORED_FPC_ADDRESS SponsoredFPC \
--salt 0
Step 3: Create and deploy an account
Unlike the local network, testnet has no pre-deployed accounts. Create and deploy your own:
aztec-wallet create-account \
--node-url $NODE_URL \
--alias my-wallet \
--payment method=fpc-sponsored,fpc=$SPONSORED_FPC_ADDRESS
The first transaction will take longer as it downloads proving keys. If you see Timeout awaiting isMined, the transaction is still processing — this is normal on testnet.
Step 4: Deploy a contract
Deploy a token contract as an example:
aztec-wallet deploy \
--node-url $NODE_URL \
--from accounts:my-wallet \
--payment method=fpc-sponsored,fpc=$SPONSORED_FPC_ADDRESS \
--alias token \
TokenContract \
--args accounts:my-wallet Token TOK 18
This deploys the TokenContract with:
admin: your wallet addressname: Tokensymbol: TOKdecimals: 18
You can check the transaction status on Aztecscan.
Step 5: Interact with your contract
Mint some tokens:
aztec-wallet send mint_to_public \
--node-url $NODE_URL \
--from accounts:my-wallet \
--payment method=fpc-sponsored,fpc=$SPONSORED_FPC_ADDRESS \
--contract-address token \
--args accounts:my-wallet 100
Check your balance:
aztec-wallet simulate balance_of_public \
--node-url $NODE_URL \
--from accounts:my-wallet \
--contract-address token \
--args accounts:my-wallet
This should print:
Simulation result: 100n
Move tokens to private state:
aztec-wallet send transfer_to_private \
--node-url $NODE_URL \
--from accounts:my-wallet \
--payment method=fpc-sponsored,fpc=$SPONSORED_FPC_ADDRESS \
--contract-address token \
--args accounts:my-wallet 25
Check your private balance:
aztec-wallet simulate balance_of_private \
--node-url $NODE_URL \
--from accounts:my-wallet \
--contract-address token \
--args accounts:my-wallet
This should print:
Simulation result: 25n
Viewing transactions on the block explorer
You can view your transactions, contracts, and account on the testnet block explorers:
Search by transaction hash, contract address, or account address to see details and status.
Registering existing contracts
To interact with a contract deployed by someone else, you need to register it in your local PXE first:
aztec-wallet register-contract \
--node-url $NODE_URL \
--alias mycontract \
<CONTRACT_ADDRESS> <ArtifactName>
For example, to register a TokenContract deployed by someone else:
aztec-wallet register-contract \
--node-url $NODE_URL \
--alias external-token \
0x1234...abcd TokenContract
After registration, you can interact with it using aztec-wallet send and aztec-wallet simulate as shown above.
Paying fees without the Sponsored FPC
The Sponsored FPC is convenient for getting started, but you can also pay fees directly by bridging Fee Juice from Ethereum Sepolia. See Paying Fees for details on bridging and other fee payment methods.
Testnet information
For complete testnet technical details including contract addresses and network configuration, see the Networks page.
Next steps
- Check out the Tutorials for building more complex contracts
- Learn about paying fees with different methods
- Explore Aztec Playground for an interactive development experience