Verify a contract with Hardhat
Who this is for: developers who've deployed a contract with Hardhat and want its source code visible and callable on the explorer.
Prerequisites: a contract already deployed. See Deploy a contract with Hardhat.
Time: a couple of minutes.
1. Confirm the verify plugin is installed
@nomicfoundation/hardhat-toolbox (which bundles hardhat-verify); if you scaffolded via Quickstart, it already is.
2. Add the verifier config to hardhat.config.js
The exact verifier backend Lumia's explorer expects (a Blockscout-style verification endpoint versus an Etherscan-style API key flow) is {{TODO: confirm with protocol eng: not confirmed in material available 2026-09-09}}. Once confirmed, add the corresponding block to hardhat.config.js, for example:
module.exports = {
// ...existing config
etherscan: {
apiKey: {
lumiaBeam: process.env.LUMIA_EXPLORER_API_KEY, // {{TODO: confirm whether an API key is required at all}}
},
customChains: [
{
network: "lumiaBeam",
chainId: 2030232745,
urls: {
apiURL: "{{TODO: confirm: explorer API URL for Beam}}",
browserURL: "{{TODO: see /reference/explorers for the browser URL}}",
},
},
],
},
};Verify it worked
Open the contract's address on the Beam explorer (see Block explorers). The Contract tab shows your source code and a Read/Write Contract panel once verification succeeds.
Troubleshooting
Was this helpful?