ZONA PROTOCOL
  • Welcome to Zona
  • What is ZONA?
  • Core Concepts
  • Network Architecture
  • Getting Started
    • ◼️Setting Up Wallets
    • ◼️Connecting to Testnet
    • ◼️Faucet Access
    • ◼️ZONA RPC & Chain Info
  • Smart Contract Development
    • ◻️EVM Compatibility Overview
    • ◻️Writing Contracts (Solidity)
    • ◻️Deploying to ZONA with Hardhat
    • ◻️Using Remix on ZONA
    • Advanced Topics
  • ◼️Gas Optimization on ZONA
  • ◼️Custom Modules with ZONA SDK
  • ◼️Security & Auditing Guidelines
Powered by GitBook
On this page
  1. Smart Contract Development

Writing Contracts (Solidity)

Since ZONA is fully EVM-compatible, you can write smart contracts using Solidity, the most widely used language for Ethereum and EVM-based blockchains.

If you’ve built on Ethereum, BNB Chain, or Avalanche, you can use the same syntax, tools, and patterns on ZONA without modification.


🧱 Basic Solidity Contract Example

Here’s a simple example of an ERC-20 token written in Solidity that will work natively on ZONA:

/ SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract ZonaToken is ERC20 {
    constructor(uint256 initialSupply) ERC20("ZonaToken", "ZONA") {
        _mint(msg.sender, initialSupply);
    }
}
  • You can deploy this using Hardhat, Remix, or Truffle

  • The msg.sender will receive all minted tokens

  • Gas fees will be paid in testnet ZONA (if on testnet)


🧪 Use the Latest Solidity Version

ZONA supports Solidity versions up to ^0.8.x. For best performance and compatibility, always use the latest stable version.


⚠️ Gas Optimization Tips

Even though ZONA offers lower gas fees than Ethereum, optimizing your contracts is still a best practice:

  • Use uint256 instead of smaller types (less packing confusion)

  • Minimize state writes inside loops

  • Use external instead of public for functions that don’t need internal access

  • Leverage events for off-chain indexing instead of storing too much data on-chain


🛠 Tooling Compatibility

All major Solidity tools work out-of-the-box:

Tool
Supported

Hardhat

✅

Truffle

✅

Foundry

✅

Remix IDE

✅

MetaMask

✅

You can write and test your contracts locally, then deploy them directly to ZONA Testnet or Mainnet once live.


📚 Learn More

  • Solidity Docs

  • OpenZeppelin Contracts

PreviousEVM Compatibility OverviewNextDeploying to ZONA with Hardhat

Last updated 14 days ago

◻️
Hardhat