How to Verify a Contract on Etherscan
A verified contract is the difference between "trust me" and "check for yourself." When your token's source code is verified on Etherscan, anyone can read exactly what it does, confirm it has no hidden powers, and interact with it directly. This guide explains what verification means, why it matters so much for trust, and how to verify a contract step by step.
What verification actually means
When a contract is deployed, only its compiled bytecode โ machine instructions โ lives on-chain. That bytecode is unreadable to humans. Verification is the process of uploading the original Solidity source code to Etherscan, which then recompiles it and confirms it produces the exact same bytecode found at the address. If they match, Etherscan marks the contract as verified and publishes the readable source. It's cryptographic proof that the code you're reading is the code that's running.
Why verification matters
For a token, verification is one of the strongest trust signals you can offer:
- Transparency. Buyers can read the code and confirm there's no hidden mint function, no owner backdoor, and no malicious logic.
- Interactivity. Verified contracts get "Read" and "Write" tabs on Etherscan, letting anyone call functions directly.
- Credibility. Exchanges, aggregators and savvy users often skip unverified tokens entirely.
An unverified token still works, but it asks people to trust a black box. Verification removes that doubt.
Verified vs. unverified: what users see
On an unverified contract, the Etherscan "Contract" tab shows only raw bytecode and a prompt to verify. On a verified one, it shows a green checkmark, the full source code, the compiler settings, the ABI, and Read/Write Contract tabs. The practical effect is huge: a verified token invites inspection, while an unverified one invites suspicion.
What you need before verifying
- The contract address of your deployed token.
- The exact Solidity source code that was deployed.
- The compiler version used (e.g. v0.8.x+commit hash).
- The optimization settings (on/off and the runs value) used at compile time.
- Any constructor arguments, ABI-encoded, if the contract took parameters at deployment.
Two verification methods
Etherscan offers a few approaches; the two most common are:
- Single-file (flattened) source. You paste one combined Solidity file. Simple, but fragile if your project uses multiple files or specific compiler settings.
- Standard JSON Input. You upload the exact JSON the compiler used, including all sources and settings. This is the most reliable method, especially for contracts compiled with optimization, and is the recommended approach for anything non-trivial.
Step-by-step on Etherscan
- Open your contract's address on Etherscan and go to the "Contract" tab.
- Click "Verify and Publish."
- Select the compiler type (Solidity) and the exact compiler version used.
- Choose the open-source license (e.g. MIT).
- Pick your method โ single-file or Standard JSON Input โ and provide the source accordingly.
- Set the optimization exactly as it was at compile time (enabled/disabled and the runs value).
- Paste any ABI-encoded constructor arguments if your contract had them.
- Submit. If everything matches, Etherscan confirms verification within seconds and publishes the source.
Constructor arguments
If your contract took parameters in its constructor (for example a fee wallet and fee amount for a factory, or name/symbol/supply for a token), Etherscan needs the ABI-encoded version of those exact values to reproduce the deployed bytecode. You can derive them by reading the contract's on-chain state and encoding them with the matching types. Getting these wrong is the most common reason verification fails.
One verification, many tokens
If your tokens are created by a factory that deploys identical token bytecode each time, you only need to verify one token. Because every token shares the same compiled code, Etherscan automatically marks the others as a "similar match," displaying them as verified without you repeating the process for each one. This is how factory-based token creators provide verified tokens at scale.
Reading a verified contract
Once verified, the contract becomes a tool for due diligence. On the "Read Contract" tab you can call view functions like totalSupply, owner and balanceOf for free. On "Write Contract" you (or the owner) can call functions that change state. For evaluating a token, scan the source for:
- A mint function โ can supply be inflated, and by whom?
- An owner and owner-only powers โ pause, blacklist, tax changes?
- Whether ownership has been renounced (owner is the zero address).
Our guide on why immutable tokens are safer explains what to make of these findings.
Troubleshooting verification
- Bytecode mismatch. Almost always a settings difference โ wrong compiler version, optimizer runs, or EVM version. Match them exactly to deployment.
- Constructor argument errors. Re-derive and re-encode the exact values used at deploy.
- Single-file fails. Switch to Standard JSON Input, which removes flattening ambiguity.
- Immutables look different. Contracts using immutable variables embed values in the bytecode; Etherscan handles this, so don't be alarmed by minor differences it accounts for.
Tokens created with our tool
When you create a token with Create ERC-20 Token, it's deployed by a verified factory using a consistent, audited token template โ so your token shows as verified on Etherscan automatically, with no manual steps. You get the trust benefit of a verified contract without touching the Solidity compiler yourself. You can confirm this by opening your token's address and checking for the green checkmark and readable source.
Conclusion
Verifying a contract publishes its source and proves it matches the deployed bytecode โ turning a black box into something anyone can inspect and trust. The keys to a successful verification are matching the compiler version and optimization settings exactly and providing correct constructor arguments. Whether you verify manually or use a tool that ships verified tokens by default, a verified contract is one of the most valuable trust signals your project can have.
๐ Ready to launch your token?
Create a verified ERC-20 token on Ethereum in under 60 seconds โ no coding required.
Create Your ERC-20 Token โ