updated hardhat-etherscan

This commit is contained in:
pk1411 2022-03-03 14:12:30 +05:30
parent 576a8d2d11
commit 9ad3a66b56
4 changed files with 24 additions and 19 deletions

View File

@ -67,12 +67,12 @@ function getNetworkUrl(networkType: string) {
else return `https://eth-mainnet.alchemyapi.io/v2/${alchemyApiKey}`;
}
function getScanApiKey(networkType: string) {
if (networkType === "avalanche") return SNOWTRACE_API;
else if (networkType === "polygon") return POLYGONSCAN_API;
else if (networkType === "arbitrum") return ARBISCAN_API;
else return ETHERSCAN_API;
}
// function getScanApiKey(networkType: string) {
// if (networkType === "avalanche") return SNOWTRACE_API;
// else if (networkType === "polygon") return POLYGONSCAN_API;
// else if (networkType === "arbitrum") return ARBISCAN_API;
// else return ETHERSCAN_API;
// }
/**
* @type import('hardhat/config').HardhatUserConfig
@ -123,7 +123,12 @@ const config: HardhatUserConfig = {
tests: "./test",
},
etherscan: {
apiKey: getScanApiKey(String(process.env.networkType)),
apiKey: {
mainnet: ETHERSCAN_API,
polygon: POLYGONSCAN_API,
arbitrumOne: ARBISCAN_API,
avalanche: SNOWTRACE_API
}
},
typechain: {
outDir: "typechain",

14
package-lock.json generated
View File

@ -25,7 +25,7 @@
},
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.3",
"@nomiclabs/hardhat-etherscan": "^2.1.8",
"@nomiclabs/hardhat-etherscan": "^3.0.1",
"@nomiclabs/hardhat-waffle": "^2.0.1",
"@nomiclabs/hardhat-web3": "^2.0.0",
"@openzeppelin/test-helpers": "^0.5.15",
@ -2120,9 +2120,9 @@
}
},
"node_modules/@nomiclabs/hardhat-etherscan": {
"version": "2.1.8",
"resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-2.1.8.tgz",
"integrity": "sha512-0+rj0SsZotVOcTLyDOxnOc3Gulo8upo0rsw/h+gBPcmtj91YqYJNhdARHoBxOhhE8z+5IUQPx+Dii04lXT14PA==",
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.0.1.tgz",
"integrity": "sha512-ZeDMqUvbmWGSpsCkyD7QOsJ3lytNgmoOPpglOtgCfoIewb1o2Nz1PgofWYsSdIiWBtIN9rBF8ldU2jVpgsNhHg==",
"dev": true,
"dependencies": {
"@ethersproject/abi": "^5.1.2",
@ -33696,9 +33696,9 @@
"requires": {}
},
"@nomiclabs/hardhat-etherscan": {
"version": "2.1.8",
"resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-2.1.8.tgz",
"integrity": "sha512-0+rj0SsZotVOcTLyDOxnOc3Gulo8upo0rsw/h+gBPcmtj91YqYJNhdARHoBxOhhE8z+5IUQPx+Dii04lXT14PA==",
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.0.1.tgz",
"integrity": "sha512-ZeDMqUvbmWGSpsCkyD7QOsJ3lytNgmoOPpglOtgCfoIewb1o2Nz1PgofWYsSdIiWBtIN9rBF8ldU2jVpgsNhHg==",
"dev": true,
"requires": {
"@ethersproject/abi": "^5.1.2",

View File

@ -42,7 +42,7 @@
},
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.3",
"@nomiclabs/hardhat-etherscan": "^2.1.8",
"@nomiclabs/hardhat-etherscan": "^3.0.1",
"@nomiclabs/hardhat-waffle": "^2.0.1",
"@nomiclabs/hardhat-web3": "^2.0.0",
"@openzeppelin/test-helpers": "^0.5.15",

View File

@ -848,10 +848,10 @@
"resolved" "https://registry.npmjs.org/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.0.3.tgz"
"version" "2.0.3"
"@nomiclabs/hardhat-etherscan@^2.1.8":
"integrity" "sha512-0+rj0SsZotVOcTLyDOxnOc3Gulo8upo0rsw/h+gBPcmtj91YqYJNhdARHoBxOhhE8z+5IUQPx+Dii04lXT14PA=="
"resolved" "https://registry.npmjs.org/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-2.1.8.tgz"
"version" "2.1.8"
"@nomiclabs/hardhat-etherscan@^3.0.1":
"integrity" "sha512-ZeDMqUvbmWGSpsCkyD7QOsJ3lytNgmoOPpglOtgCfoIewb1o2Nz1PgofWYsSdIiWBtIN9rBF8ldU2jVpgsNhHg=="
"resolved" "https://registry.npmjs.org/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.0.1.tgz"
"version" "3.0.1"
dependencies:
"@ethersproject/abi" "^5.1.2"
"@ethersproject/address" "^5.0.2"