Back

Introducing Localnet & Devnet: Build Universal Apps faster with the newest features!

Check out this blog post in español, 简体中文, 繁體中文, 日本語, हिंदी, 한국어, tiếng-việt, português, français, русский, українська, persian, türkçe, indonesian, filipino, and italiano (non-English translations are created by the community, not ZetaChain).

At ZetaChain, our mission is to power Universal Apps that span all chains from native Bitcoin and Ethereum to Cosmos, Solana and beyond. A key part of this mission is lowering the barrier to entry for building and testing Universal Apps. This allows developers bring better products to mainnet faster while ensuring security. Today, we introduce ZetaChain Localnet and Devnet, enabling more rapid development and experimentation for both Universal App builders and the ZetaChain protocol.

Introducing ZetaChain Localnet and Devnet

Developing on different chains is a complex and time-consuming process. ZetaChain streamlines this by enabling single-deployment Universal Apps that work seamlessly across multiple blockchain networks from one place of logic. To improve the testing and development experience, we’re excited to introduce two new development environments — Localnet and Devnet — which empower developers to iterate faster and build apps more efficiently with the newest features. Let’s dive into these environments and discuss how they can enhance your development workflow.

Build faster with ZetaChain Localnet

The Localnet environment is designed to simulate ZetaChain and its connected chains, allowing you to develop Universal Apps right from your local machine. This setup mimics real-world scenarios, making it easier to test and iterate on your applications without the overhead of initiating transactions on the actual testnet and waiting for confirmations.

Localnet provides a sandbox where you can experiment with ZetaChain’s 2.0 architecture, which focuses on simplifying the development process with intuitive interfaces. Here’s a closer look at what Localnet offers and how you can get started.

Getting started with Localnet

To get started with Localnet, you’ll need to clone the ZetaChain protocol contracts repository and start the local environment using Hardhat, a popular development framework for Ethereum.

git clone <https://github.com/zeta-chain/protocol-contracts.git>
cd protocol-contracts
yarn
yarn localnet

Running the localnet command initiates two processes:

  • A local Ethereum network (powered by Hardhat) with the necessary gateway contracts deployed.

  • A background worker that simulates cross-chain message relaying between the deployed gateway contracts, creating a seamless development experience as if you were interacting with live networks.

ZetaChain 2.0 contracts are central to the Localnet environment, featuring two key contracts: GatewayEVM and GatewayZEVM.

  • GatewayEVM: Deployed on each connected chain, it handles interactions with ZetaChain.

  • GatewayZEVM: Deployed on ZetaChain, it facilitates interactions with connected chains.

These contracts support fundamental operations such as deposits, withdrawals, and smart contract calls, tailored for both native and ERC-20 tokens. This design ensures an intuitive and straightforward interface for developers.

Localnet is set up to allow for smooth experimentation and development. After deploying the local network, you’ll have access to default Hardhat accounts and their private keys, making it easy to start interacting with the contracts immediately.

To illustrate the ZetaChain 2.0 interface in action, we provide example contracts like TestZContract, SenderZEVM, and ReceiverEVM. These demonstrate how to build and interact with Universal Apps.

You can test interactions using the following commands:

npx hardhat zevm-call --network localhost
npx hardhat zevm-withdraw-and-call --network localhost
npx hardhat evm-call --network localhost
npx hardhat evm-deposit-and-call --network localhost

The introduction of Localnet marks a significant step forward for enhancing the developer experience on ZetaChain. By providing a realistic and efficient local development environment, we aim to make building Universal Apps more accessible and less cumbersome. Stay tuned for more updates as we continue to innovate and support the developer community.

Build with the newest features with ZetaChain Devnet

Devnet complements Localnet by providing a comprehensive suite of tools for ZetaChain development. Devnet is a ZetaChain test network that gives access to bleeding-edge and experimental features before they land on the Testnet. Devnet will be rapidly upgraded and may be less stable than the testnet. However, it allows developers to interact with and build on newly researched ZetaChain developments.

Note, DevNet is a fully isolated development environment. This network is reset often and your normal workflow may not be supported. It runs an isolated ZetaChain network that connects an isolated EVM compatible DevNet and a Bitcoin DevNet. It does not connect to any public testnet.

This network is not for use by most developers. Only developers who need access to the latest ZetaChain features that have not been released publicly will benefit from the DevNet.

Visit this form to request early access to the Devnet.

What’s next

We will make further developments to the Localnet and Devnet environments to enhance developer experience. The goal is for developers to be able to focus purely on the real utility of their apps and build faster.

About ZetaChain

ZetaChain is the first universal L1 blockchain. It serves as the base-layer of the decentralized internet, providing a platform for global access, simplicity, and utility across any blockchain. Zetachain’s Omnichain Smart Contracts on the Universal EVM are purpose-built for general chain abstraction across the entire crypto ecosystem. ZetaChain can connect to any blockchain, from Ethereum and Cosmos to Bitcoin and beyond, enabling unified liquidity, user experience, and data all from a single place. Universal Apps on ZetaChain are future-proof and have full compatibility with both existing and new chain integrations. With a proposed Universal Proof-of-Stake capability, ZetaChain supports staking of assets like native Bitcoin and Ethereum in exchange for rewards, powering unbounded scale for economic security.

Follow ZetaChain on Twitter @zetablockchain and join the conversation on Discord and Telegram. Reach out to [email protected] if you’re building on top of ZetaChain.

Any projects mentioned are 3rd party, not ZetaChain.

BlockchainOmnichainWeb3CryptoAnnouncementNetwork