CONTRACT VERIFICATION
Verify your smart contracts on Mantle Explorer.
WHY VERIFY
Contract verification proves that your deployed bytecode matches the original source code. This builds trust with users and enables:
Source code visibility on block explorers
Direct contract interaction through the explorer UI
Security auditing and code review by the community
VERIFICATION API
MantleDevKit includes a verification module that submits your contract to Mantle Explorer (Blockscout).
import { verifyContract } from '@mantle/compiler';
const result = await verifyContract(5003, {
contractAddress: '0x...',
sourceCode: contractSource,
contractName: 'MyToken',
compilerVersion: 'v0.8.20+commit.a1b79de6',
optimizationUsed: false,
});
if (result.success) {
console.log('Verified:', result.explorerUrl);
}EXPLORER URLS
| Network | Explorer |
|---|---|
| Mantle Mainnet | explorer.mantle.xyz |
| Mantle Sepolia | explorer.sepolia.mantle.xyz |
MANUAL VERIFICATION
You can also verify contracts manually through the explorer:
- 1
Navigate to your contract address on the explorer
- 2
Click on the "Contract" tab, then "Verify & Publish"
- 3
Select compiler version 0.8.20 and paste your source code
- 4
Submit and wait for verification to complete
USING EXPORTED PROJECT
When you export a project, it includes a Hardhat configuration with verification settings pre-configured.
npx hardhat verify --network mantleSepolia \ 0xYourContractAddress \ "Constructor" "Arguments" "Here"