feat: etherscan verification

This commit is contained in:
Adam Uhlíř 2025-07-01 15:48:54 +02:00
parent 64174d8ce6
commit d6cf524255
No known key found for this signature in database
GPG Key ID: 1D17A9E81F76155B
2 changed files with 13 additions and 0 deletions

View File

@ -62,6 +62,16 @@ The deployment files are kept under version
control [as recommended by Hardhat](https://hardhat.org/ignition/docs/advanced/versioning), except the build files,
which are 18 MB.
### Etherscan verification
When deploying to network supported by Etherscan, it is **strongly** recommended to submit also verification files
to Etherscan, which then makes the contract "readable" on Etherscan. Eq. users can understand what the smart contract
does and also potentially submit transactions and call through Etherscan UI.
You can enable Etherscan verification by specifying Etherscan API key with `ETHERSCAN_API_KEY` and then either submitting
the verification after deployment with `hardhat ignition verify` or already during the deployment by adding the
`--verify` flag (eq. `hardhat ignition deploy <module> --verify`).
## Smart contracts overview
This contract suite deploys two smart contracts:

View File

@ -17,6 +17,9 @@ module.exports = {
slow: 200,
timeout: 30 * 1000,
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
namedAccounts: {
deployer: { default: 0 },
},