Skip to main content

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...]

Additional Resources