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:
You can deploy this using Hardhat, Remix, or Truffle
The
msg.sender
will receive all minted tokensGas 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 ofpublic
for functions that don’t need internal accessLeverage events for off-chain indexing instead of storing too much data on-chain
🛠 Tooling Compatibility
All major Solidity tools work out-of-the-box:
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
Last updated