Socket
Socket
Sign inDemoInstall

@nomiclabs/hardhat-etherscan

Package Overview
Dependencies
283
Maintainers
3
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.2 to 2.1.3

17

dist/src/index.js

@@ -88,20 +88,13 @@ "use strict";

if (matchingCompilerVersions.length === 0) {
const detailedContext = [];
if (isVersionRange(inferredSolcVersion)) {
detailedContext.push(`The expected version range is ${inferredSolcVersion}.`);
}
else {
detailedContext.push(`The expected version is ${inferredSolcVersion}.`);
}
// There is always at least one configured version.
let configuredCompilersFragment;
if (compilerVersions.length > 1) {
detailedContext.push(`The selected compiler versions are: ${compilerVersions.join(", ")}`);
configuredCompilersFragment = `your configured compiler versions are: ${compilerVersions.join(", ")}`;
}
else {
detailedContext.push(`The selected compiler version is: ${compilerVersions[0]}`);
configuredCompilersFragment = `your configured compiler version is: ${compilerVersions[0]}`;
}
const message = `The bytecode retrieved could not have been generated by any of the selected compilers.
${detailedContext.join("\n")}
const message = `The contract you want to verify was compiled with solidity ${inferredSolcVersion}, but ${configuredCompilersFragment}.
Possible causes are:
- You are not in the same commit that was used to deploy the contract.
- Wrong compiler version selected in hardhat config.

@@ -108,0 +101,0 @@ - The given address is wrong.

@@ -22,2 +22,7 @@ "use strict";

NetworkID[NetworkID["OPERA"] = 250] = "OPERA";
// Optimistim
NetworkID[NetworkID["OPTIMISTIC_ETHEREUM"] = 10] = "OPTIMISTIC_ETHEREUM";
NetworkID[NetworkID["OPTIMISTIC_KOVAN"] = 69] = "OPTIMISTIC_KOVAN";
// Polygon
NetworkID[NetworkID["POLYGON"] = 137] = "POLYGON";
})(NetworkID || (NetworkID = {}));

@@ -65,2 +70,14 @@ const networkIDtoEndpoints = {

},
[NetworkID.OPTIMISTIC_ETHEREUM]: {
apiURL: "https://api-optimistic.etherscan.io",
browserURL: "https://optimistic.etherscan.io/",
},
[NetworkID.OPTIMISTIC_KOVAN]: {
apiURL: "https://api-kovan-optimistic.etherscan.io",
browserURL: "https://kovan-optimistic.etherscan.io/",
},
[NetworkID.POLYGON]: {
apiURL: "https://api.polygonscan.com/api",
browserURL: "https://polygonscan.com",
},
};

@@ -67,0 +84,0 @@ async function getEtherscanEndpoints(provider, networkName) {

{
"name": "@nomiclabs/hardhat-etherscan",
"version": "2.1.2",
"version": "2.1.3",
"description": "Hardhat plugin for verifying contracts on etherscan",

@@ -23,7 +23,7 @@ "repository": "github:nomiclabs/hardhat",

"scripts": {
"lint:fix": "node ../../node_modules/prettier/bin-prettier.js --write \"src/**/*.{js,ts}\" \"test/**/*.{js,ts}\" && yarn lint --fix",
"lint": "node ../../node_modules/tslint/bin/tslint --config tslint.json --project ./tsconfig.json",
"test": "node ../../node_modules/mocha/bin/mocha --recursive \"test/**/*.ts\" --exit",
"build": "node ../../node_modules/typescript/bin/tsc --build .",
"clean": "node ../../node_modules/rimraf/bin.js dist"
"lint:fix": "prettier --write \"src/**/*.{js,ts}\" \"test/**/*.{js,ts}\" && yarn lint --fix",
"lint": "tslint --config tslint.json --project ./tsconfig.json",
"test": "mocha --recursive \"test/**/*.ts\" --exit",
"build": "tsc --build .",
"clean": "rimraf dist"
},

@@ -50,3 +50,5 @@ "files": [

"@types/fs-extra": "^5.1.0",
"@types/mocha": "^5.2.6",
"@types/node-fetch": "^2.3.7",
"@types/node": "^10.17.24",
"@types/semver": "^6.0.2",

@@ -56,3 +58,12 @@ "chai": "^4.2.0",

"hardhat": "^2.0.4",
"nock": "^13.0.5"
"mocha": "^7.1.2",
"nock": "^13.0.5",
"prettier": "2.0.5",
"rimraf": "^3.0.2",
"ts-node": "^8.1.0",
"tslint-config-prettier": "^1.18.0",
"tslint-consistent-codestyle": "^1.15.1",
"tslint-plugin-prettier": "^2.0.1",
"tslint": "^5.16.0",
"typescript": "~4.0.3"
},

@@ -59,0 +70,0 @@ "peerDependencies": {

@@ -69,3 +69,3 @@ [![npm](https://img.shields.io/npm/v/@nomiclabs/hardhat-etherscan.svg)](https://www.npmjs.com/package/@nomiclabs/hardhat-etherscan)

When the constructor has a complex argument list, it might be easier to write a javascript module that exports the argument list. The expected format is the same as a constructor list for an [ethers contract](https://docs.ethers.io/v5/api/contract/). For example, if you have a contract like this:
When the constructor has a complex argument list, you'll need to write a javascript module that exports the argument list. The expected format is the same as a constructor list for an [ethers contract](https://docs.ethers.io/v5/api/contract/). For example, if you have a contract like this:

@@ -72,0 +72,0 @@ ```solidity

@@ -211,24 +211,14 @@ import {

if (matchingCompilerVersions.length === 0) {
const detailedContext = [];
if (isVersionRange(inferredSolcVersion)) {
detailedContext.push(
`The expected version range is ${inferredSolcVersion}.`
);
} else {
detailedContext.push(`The expected version is ${inferredSolcVersion}.`);
}
// There is always at least one configured version.
let configuredCompilersFragment;
if (compilerVersions.length > 1) {
detailedContext.push(
`The selected compiler versions are: ${compilerVersions.join(", ")}`
);
configuredCompilersFragment = `your configured compiler versions are: ${compilerVersions.join(
", "
)}`;
} else {
detailedContext.push(
`The selected compiler version is: ${compilerVersions[0]}`
);
configuredCompilersFragment = `your configured compiler version is: ${compilerVersions[0]}`;
}
const message = `The bytecode retrieved could not have been generated by any of the selected compilers.
${detailedContext.join("\n")}
const message = `The contract you want to verify was compiled with solidity ${inferredSolcVersion}, but ${configuredCompilersFragment}.
Possible causes are:
- You are not in the same commit that was used to deploy the contract.
- Wrong compiler version selected in hardhat config.

@@ -235,0 +225,0 @@ - The given address is wrong.

@@ -32,3 +32,8 @@ import {

// Fantom mainnet
OPERA = 250
OPERA = 250,
// Optimistim
OPTIMISTIC_ETHEREUM = 10,
OPTIMISTIC_KOVAN = 69,
// Polygon
POLYGON = 137,
}

@@ -77,2 +82,14 @@

},
[NetworkID.OPTIMISTIC_ETHEREUM]: {
apiURL: "https://api-optimistic.etherscan.io",
browserURL: "https://optimistic.etherscan.io/",
},
[NetworkID.OPTIMISTIC_KOVAN]: {
apiURL: "https://api-kovan-optimistic.etherscan.io",
browserURL: "https://kovan-optimistic.etherscan.io/",
},
[NetworkID.POLYGON]: {
apiURL: "https://api.polygonscan.com/api",
browserURL: "https://polygonscan.com",
},
};

@@ -79,0 +96,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc