Verify contract code with Hardhat in Explorer
Verify a Smart Contract with hardhat
Step-by-Step Guide
1. Install the hardhat-verify Plugin
2. Configure the hardhat-verify Plugin
require("@nomicfoundation/hardhat-verify");
module.exports = {
// ...
networks: {
B2Mainnet: {
url: 'https://rpc.bsquared.network',
chainId: 223,
accounts: {
"your_private_key",
},
},
},
etherscan: {
apiKey: {
B2Mainnet: "no-api-key-needed"
},
customChains: [
{
network: "B2Mainnet",
chainId: 223,
urls: {
apiURL: "https://explorer.bsquared.network/api",
browserURL: "https://explorer.bsquared.network/"
}
},
]
},
// ...
};3. Compile Your Smart Contract
4. Deploy Your Smart Contract
5. Verify Your Smart Contract
6. Check Your Verification Status
Last updated