Hardhat Verify
To verify your contract on kaia, you need to add the following configuration to your hardhat.config.js:
Mainnet
module.exports = {
etherscan: {
apiKey: {
kaia: "unnecessary",
},
customChains: [
{
network: "kaia",
chainId: 8217,
urls: {
apiURL: "https://mainnet-api.kaiascan.io/hardhat-verify",
browserURL: "https://kaiascan.io",
}
},
]
}
}
Kairos
module.exports = {
etherscan: {
apiKey: {
kairos: "unnecessary",
},
customChains: [
{
network: "kairos",
chainId: 1001,
urls: {
apiURL: "https://kairos-api.kaiascan.io/hardhat-verify",
browserURL: "https://kairos.kaiascan.io",
}
},
]
}
}
Verification Command
Once the configuration is set up, you can verify your contract using the following Hardhat command:
npx hardhat verify --network <network> --contract contracts/MyContract.sol:MyContract <deployed_contract_address> [constructor_arguments...]
Hardhat V3 Users
Hardhat V3 Notice
If you are using Hardhat V3, the above configuration may not work properly. For Hardhat V3 users, please verify your contracts directly through the KaiaScan web interface:
- Mainnet: https://kaiascan.io/contract
- Kairos: https://kairos.kaiascan.io/contract
Hardhat V3 support through API verification is currently under development. We will provide updates when it becomes available.
Troubleshooting
If you encounter any issues during the verification process, please contact us through our support page with details about the error.
Contact Support for Contract Verification Issues