Use this guide when you have deployed a contract with Hardhat and want to verify the source on Berachain’s block explorer (Berascan).Documentation Index
Fetch the complete documentation index at: https://berachain-422fce37-feat-nodes-section-reno.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Repository
- Code: github.com/berachain/guides/tree/main/apps/hardhat-contract-verification
- README (raw): raw README
Requirements
- Node, npm, Hardhat
- Deployed contract address and constructor arguments (if any)
- Same Solidity version and build settings as deployment
Stack
Hardhat, Ethers v6, Solidity, Hardhat Etherscan/Verification plugin.Quick start
- Clone and install
- Configure Hardhat for Berachain (network and verify task); see README.
- Run the verify task, e.g.
npx hardhat verify --network berachainTestnet <ADDRESS> <CONSTRUCTOR_ARGS...>.