Verification Best Practices
Verifying smart contracts on Chiliz Chain requires a combination of standard EVM practices, and and attention to chain-specific details.
Indeed, because Chiliz Chain operates on a Proof of Staked Authority (PoSA) consensus mechanism with specific standards like CAP-20 and a specific EVM versioning, simply porting code from Ethereum might not work.
Understand the CAP-20 standard
While Chiliz Chain is EVM-compatible, the ecosystem relies on the CAP-20 standard for tokens. This is the Chiliz specific implementation of ERC-20.
See the token details here:
CAP-20If you are developing a Fan Token or an asset intended to behave like one, you should explicitly set decimals to 0. Standard DeFi tokens may use 18.
Configure compiler & EVM
Chiliz Chain validators are optimized for specific EVM versions. Using "bleeding edge" configurations may lead to deployment failures or unexpected behavior.
You should rely on these versions:
Solidity:
0.8.24.EVM:
shanghaiorparis.
Optimize for gas
Chiliz Chain enforces a "high-Gwei" minimum gas price to prevent spam and ensure validator sustainability.
Since the Dragon8 hard fork, Chiliz Chain implements EIP-1559 but with a minimum base fee of 2500 gwei. This means unoptimized code is significantly more expensive for your users here than on other chains.
You should therefore optimize your contract for storage usage (the most expensive operation):
Pack
uint128,uint64, orboolvariables next to each other so they fit into a single 32-byte storage slot.Use
calldatainstead ofmemoryfor read-only function arguments (external functions) to save gas during execution.
Install hardhat-gas-reporter and configure it with the specific Chiliz gas price settings to see the real-world cost in CHZ before you deploy.
Always test on Spicy
Never assume Mainnet equivalence based on your Ethereum experience. You must validate interactions with the Chiliz PoSA consensus on the Spicy Testnet before you move to Chiliz Chain Mainnet.
See the connection details here:
Connect to Chiliz ChainLast updated
Was this helpful?