| title | Getting Started on Testnet | |
|---|---|---|
| sidebar_position | 1 | |
| tags |
|
|
| description | Deploy contracts and send transactions on the Aztec testnet using the CLI wallet and the Sponsored FPC for fee payment. |
import { General } from '@site/src/components/Snippets/general_snippets';
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.
| Feature | Local Network | Testnet |
|---|---|---|
| Environment | Local machine | Decentralized network on Sepolia |
| Fees | Free (test accounts prefunded) | Sponsored FPC available |
| Proving | Optional | Required |
| Accounts | Test accounts pre-deployed | Must create and deploy your own |
:::info 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. :::
- <General.node_ver />
Install the testnet version of the Aztec CLI:
VERSION=#include_testnet_version bash -i <(curl -sL https://install.aztec.network/#include_testnet_version):::warning
Testnet is version-dependent. It is currently running version #include_testnet_version. 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
Set the required environment variables:
export NODE_URL=https://v5.testnet.rpc.aztec-labs.com
export SPONSORED_FPC_ADDRESS=0x1441491b59934ec64f8c98f17c91f23c01ca2a45dbb35caf123146ec76f9970cThe 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 0Unlike 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:::note
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.
:::
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 18This deploys the TokenContract with:
admin: your wallet addressname: Tokensymbol: TOKdecimals: 18
You can check the transaction status on Aztecscan.
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 100Check your balance:
aztec-wallet simulate balance_of_public \
--node-url $NODE_URL \
--from accounts:my-wallet \
--contract-address token \
--args accounts:my-walletThis 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 25Check your private balance:
aztec-wallet simulate balance_of_private \
--node-url $NODE_URL \
--from accounts:my-wallet \
--contract-address token \
--args accounts:my-walletThis should print:
Simulation result: 25n
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.
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 TokenContractAfter registration, you can interact with it using aztec-wallet send and aztec-wallet simulate as shown above.
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.
If you want to pay fees directly instead of using the Sponsored FPC, you can request Fee Juice from the testnet faucet:
- Aztec Fee Juice Faucet - dispenses testnet Fee Juice to your account
:::note Fee Juice is not the AZTEC token This faucet dispenses Fee Juice, the asset used to pay transaction fees (gas) on Aztec. Fee Juice lives on Aztec (L2) and is only used to pay fees. It is not the AZTEC token, which is a separate asset that lives on Ethereum (L1). This faucet does not dispense AZTEC tokens. :::
For complete testnet technical details including contract addresses and network configuration, see the Networks page.
- Check out the Tutorials for building more complex contracts
- Learn about paying fees with different methods
- Explore Aztec Playground for an interactive development experience
:::tip Need help? If something does not work, see the support guide. It tells you when to ask in Discord or the forum, when to open a GitHub issue, and how to disclose security issues responsibly. :::