Skip to content

Commit

Permalink
Add contract verification configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianBorst committed Jan 7, 2025
1 parent a8dbf9d commit 6969e49
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 52 deletions.
17 changes: 17 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import mint from "./hardhat-tasks/mint";
import deployERC20 from "./hardhat-tasks/deployERC20";
import migrateERC20 from "./hardhat-tasks/migrateERC20";
import { json } from "hardhat/internal/core/params/argumentTypes";
import "@nomicfoundation/hardhat-verify";

// The following are set using `npx hardhat vars set <KEY>` and then the value is a prompt for a secret.
// I provide a default value so that the call does not fail for regular hardhat network usage
const GNOSISSCAN_API_KEY = vars.get("GNOSISSCAN_API_KEY", "");
const DAI_PRIVATE_KEY = vars.get(
"DAI_PRIVATE_KEY",
"0xc5e8f61d1ab959b397eecc0a37a6517b8e67a0e7cf1f4bce5591f3ed80199122" // hardhat signer 0 to avoid failure
Expand Down Expand Up @@ -965,6 +967,21 @@ const config: HardhatUserConfig = {
],
},
},
etherscan: {
apiKey: {
dai: GNOSISSCAN_API_KEY,
},
customChains: [
{
network: "dai",
chainId: 100,
urls: {
apiURL: "https://api.gnosisscan.io/api",
browserURL: "https://gnosisscan.io/",
},
},
],
},
};

export default config;
73 changes: 21 additions & 52 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@nomicfoundation/hardhat-chai-matchers": "^2.0.2",
"@nomicfoundation/hardhat-ethers": "^3.0.5",
"@nomicfoundation/hardhat-toolbox": "^4.0.0",
"@nomicfoundation/hardhat-verify": "^2.0.8",
"@types/command-line-args": "^5.2.3",
"bignumber.js": "^9.1.2",
"hardhat": "^2.19.2",
Expand Down

0 comments on commit 6969e49

Please sign in to comment.