Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

verifies Sepolia deployment -> uses the newer official hardhat-verify package #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "@nomiclabs/hardhat-etherscan";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why this change is needed as I can't see anywhere where hardhat-verify is used in the repository. Can you shed more light why this is needed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, https://github.com/NomicFoundation/hardhat/tree/main/packages/hardhat-etherscan

The @nomiclabs/hardhat-etherscan plugin is deprecated in favor of our new @nomicfoundation/hardhat-verify plugin.
hardhat-verify is a drop-in replacement of hardhat-etherscan.

it's used on the hardhat config. Can't exactly remember why I upgraded it in the first place, but the currently used plugin didn't support sepolia for sure.

import "@nomicfoundation/hardhat-verify";
import "@nomiclabs/hardhat-waffle";
import "hardhat-deploy";
import dotenv from "dotenv";
Expand Down Expand Up @@ -216,5 +216,15 @@ export default {
},
etherscan: {
apiKey: MY_ETHERSCAN_API_KEY,
customChains: [

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason why sepolia is not added to networks list?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's already on it, somewhere around L 117. The only missing piece was verification support.

{
network: "sepolia",
chainId: 11155111,
urls: {
apiURL: "https://api-sepolia.etherscan.io/api",
browserURL: "https://sepolia.etherscan.io",
},
},
],
},
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
},
"dependencies": {
"@gnosis.pm/solidity-data-structures": "^1.3.4",
"@nomicfoundation/hardhat-verify": "^1.0.4",
"@types/yargs": "^15.0.10",
"argv": "^0.0.2",
"axios": "^0.21.1",
Expand All @@ -32,7 +33,6 @@
"@gnosis.pm/mock-contract": "^3.0.8",
"@gnosis.pm/util-contracts": "^2.0.6",
"@nomiclabs/hardhat-ethers": "^2.0.1",
"@nomiclabs/hardhat-etherscan": "^2.1.8",
"@nomiclabs/hardhat-waffle": "^2.0.0",
"@openeth/truffle-typings": "^0.0.5",
"@openzeppelin/contracts": "^3.3.0",
Expand Down
Loading