Verify Contract Source Code
Make your smart contracts transparent and trustworthy by verifying source code on Tetreum Explorer.
- Transparency: Users can read and audit your contract code
- Trust: Verified contracts build user confidence
- Interaction: Easy contract interaction through the explorer
- Debug: Better error messages and debugging
- Deploy your contract on Tetreum testnet
- Keep your original source code (.sol files)
- Remember the compiler version used
- Note any constructor parameters
Navigate to your deployed contract on Tetreum Explorer:
- Go to Tetreum Explorer
- Search for your contract address
- Click on the contract address in search results
- You should see contract details page
On the contract page, look for verification options:
- Look for "Contract" tab on the contract page
- Click "Verify & Publish" button
- Choose verification method (usually "Solidity Single File")
Note: If you see "Contract Source Code Verified", your contract is already verified by someone else.
Fill out the verification form with exact details:
Required Information:
Source Code:
Copy and paste your complete Solidity source code, including:
- • SPDX license identifier
- • All import statements
- • Complete contract code
- • Comments and formatting
If your contract has constructor parameters, you need to encode them:
Example:
// Contract with constructor
constructor(string memory _name, uint256 _supply) {
name = _name;
totalSupply = _supply;
}
// If deployed with:
// _name = "MyToken"
// _supply = 1000000
// ABI-encoded parameters:
000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000000000074d79546f6b656e00000000000000000000000000000000000000000000000000Tip: Use online ABI encoding tools or Remix IDE to get the correct ABI-encoded constructor parameters.
Complete the verification process:
- Review all information for accuracy
- Complete any CAPTCHA if required
- Click "Verify and Publish"
- Wait for verification (usually takes 1-2 minutes)
Success Indicators:
- • Green checkmark appears next to contract
- • "Contract Source Code Verified" message
- • Source code tab becomes readable
- • Read/Write contract functions available
Compilation failed:
Ensure exact compiler version and source code match what was used for deployment.
Bytecode doesn't match:
Check constructor parameters encoding and optimization settings.
Import errors:
Include all imported contracts or use flattened source code.
Contract Verified Successfully!
Your contract is now transparent and trustworthy. Users can interact with it directly through the explorer.