Skip to content

Commit

Permalink
Added hardhat verify plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
MiguelGGMM committed Jul 22, 2023
1 parent eae0286 commit 7d20718
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
14 changes: 10 additions & 4 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
//import "hardhat-gas-reporter";
import "@nomicfoundation/hardhat-toolbox"; //includes gas reporter etc
import "@nomiclabs/hardhat-solhint";
//import "solidity-coverage";
import "@nomicfoundation/hardhat-verify"; //https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-verify
import "ganache";
//import "@nomiclabs/hardhat-waffle"; //doesnt work fine with @nomicfoundation/hardhat-chai-matchers

import { config as dotEnvConfig } from "dotenv";
dotEnvConfig();
Expand Down Expand Up @@ -62,6 +60,14 @@ const config: HardhatUserConfig = {
],
},
mocha: {},
etherscan: {
//https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-verify
apiKey : {
bsc: "your binance smart chain API KEY"
//npx hardhat verify --list-networks //available networks
//https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-verify#adding-support-for-other-networks // if you need other networks
}
},
defaultNetwork: "hardhat",
networks: {
hardhat: {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"testP": "pnpm hardhat test --parallel",
"testNP": "pnpm hardhat test --parallel --network localhost",
"typechain": "pnpm hardhat typechain",
"verify": "pnpm hardhat verify",
"verify": "pnpm hardhat verify --network bsc --constructor-args arguments.js DEPLOYED_CONTRACT_ADDRESS",
"lint": "npx eslint .",
"lintSOL": "pnpm hardhat check",
"prettierSOL": "npx prettier --check --plugin=prettier-plugin-solidity contracts/**/*.sol",
Expand All @@ -38,6 +38,7 @@
"@nomicfoundation/hardhat-ethers": "^3.0.4",
"@nomicfoundation/hardhat-network-helpers": "^1.0.8",
"@nomicfoundation/hardhat-toolbox": "^3.0.0",
"@nomicfoundation/hardhat-verify": "^1.0.4",
"@nomiclabs/hardhat-solhint": "^3.0.1",
"@openzeppelin/contracts": "^4.9.2",
"@typechain/ethers-v6": "^0.4.2",
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

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

0 comments on commit 7d20718

Please sign in to comment.