Verify contract code with Hardhat in B² Explorer
Install plugin
require("@nomicfoundation/hardhat-verify");import "@nomicfoundation/hardhat-verify";
Config hardhat.config.js or hardhat.config.ts
module.exports = {
solidity: "0.8.28",
networks: {
b2: {
url: "https://rpc.bsquared.network",
chainId: 223,
accounts: "abc",
},
},
etherscan: {
apiKey: {
b2: "no-api-key",
},
customChains: [
{
network: "b2",
chainId: 223,
urls: {
apiURL: "https://12d6a1773a-backend-blockscout.bsquared.network/api/",
browserURL: "https://explorer.bsquared.network",
},
},
],
},
sourcify: {
enabled: false,
},
}Verify
Reference
Last updated