Verify contract code with Hardhat in Blockscout
Install plugin
require("@nomicfoundation/hardhat-verify");import "@nomicfoundation/hardhat-verify";
Config hardhat.config.js or hardhat.config.ts
module.exports = {
networks{
b2testnet: {
url: 'https://b2testnet-rpc.bsquared.network',
chainId: 1123,
accounts: {
mnemonic: process.env.MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
},
etherscan: {
apiKey: {
b2testnet: "abc"
},
customChains: [
{
network: "b2testnet",
chainId: 1123,
urls: {
apiURL: "https://b2-testnet.alt.technology/",
browserURL: "https://testnet-blockscout.bsquared.network/"
}
},
}
]
},Verify
Reference
Last updated