On ZetaChain, you can build universal apps: smart contracts that can read, write, and manage assets across multiple chains. Universal apps remove the complexity of cross-chain development and let you create seamless user experiences that work everywhere.
This page will help you set up your environment, install the core tools, and point you to the right tutorials depending on what you want to build.
Prerequisites
Before you begin, make sure your system is set up with the following tools:
- Node.js (opens in a new tab) (v21 or later recommended): Required to run the ZetaChain CLI and manage JavaScript dependencies.
- Yarn (opens in a new tab) or npm: Package managers used to install and update project libraries. Either works, use whichever you prefer.
- Git (opens in a new tab): Essential for managing your project source code and collaborating with others.
- jq (opens in a new tab): A lightweight command-line JSON processor, useful for parsing Localnet output and writing shell scripts.
- Foundry (opens in a new tab): A fast, modular toolkit for Ethereum development. You’ll use it to compile contracts, manage dependencies, and run Localnet.
Setting up Environment
Install the ZetaChain CLI:
npm install -g zetachain
The ZetaChain CLI is your primary tool for working with ZetaChain. You’ll use it to make cross-chain calls, transfer tokens, track cross-chain transactions, manage accounts across multiple networks, query balances, and more.
Try running:
zetachain query chains list
This command prints all the chains currently connected to ZetaChain, a good way to confirm your setup is working.
For local development, we recommend running Localnet, a self-contained environment that includes ZetaChain, EVM, Solana, Sui, and TON. Localnet is the fastest way to build and test universal apps without relying on public testnets.
To run Localnet, make sure you have Foundry (opens in a new tab) installed. Foundry provides the core tooling for EVM development and is required to start the local network.
If you want to include non-EVM chains in Localnet, check the prerequisites in the Localnet documentation.
Tools & References
With your environment ready, these resources will help you interact with and build on ZetaChain.
Explorers
ZetaChain is both a Cosmos chain and an EVM chain. You can use Cosmos explorers to view blocks, validators, and governance activity, or EVM explorers to track contracts and transactions. Links to both are available in the Explorers reference.
Faucets
Before deploying or testing on testnet, you’ll need tokens. The Faucet page lists all available faucets: for ZETA gas and for tokens on connected chains.
Networks
ZetaChain runs on mainnet and testnet. Tutorials focus on testnet, but you can switch at any time. RPC endpoints, chain IDs, and other details are listed in the Networks reference.
RPCs
To connect apps, wallets, or frameworks like Foundry and Hardhat, you’ll need RPC endpoints. Public RPCs for both ZetaChain mainnet and testnet are listed in the RPC reference.
Contracts
Core protocol contracts such as the Gateway, and other system contracts are deployed on ZetaChain. Their addresses are listed in the Protocol Contracts reference.
Tokens
All whitelisted tokens available on ZetaChain are listed along with their ZRC-20 contract addresses in the Tokens reference.
Where to Go Next
Once your environment is set up, you can dive straight into building. Choose a path based on what you want to create:
Learn the basics
- First Universal Contract (10 min) Build your first universal contract and understand the foundation of ZetaChain development.
- Build a Web App (10 min) Connect a wallet, send cross-chain calls, and track execution with a simple frontend.
Make calls to and from universal apps
- EVM (30 min) Learn how to send and receive calls between EVM chains and universal apps on ZetaChain.
- Solana (60 min) Deposit assets and call universal apps from Solana, or make outgoing calls to Solana.
- Sui (60 min) Deposit assets and call universal apps from Sui.
- Sui Withdraw & Call (60 min) Withdraw assets and call contracts on Sui.
Cross-Chain Messaging
- Messaging (30 min) Make cross-chain calls directly between EVM networks without building a universal app.
Build real-world apps
- Universal NFT (45 min) Create NFTs that can move seamlessly across multiple chains.
- Universal Token (45 min) Deploy a fungible token that exists everywhere and can be transferred across chains.
- Swap (30 min) Implement a universal swap app compatible with chains like Ethereum, Solana, and Bitcoin.