@nomiclabs/hardhat-etherscan
Advanced tools
Comparing version 3.1.2 to 3.1.3
@@ -225,4 +225,4 @@ "use strict"; | ||
// Please read this to learn how to manually add support for custom networks: | ||
// https://github.com/NomicFoundation/hardhat/tree/master/packages/hardhat-etherscan#adding-support-for-other-networks | ||
// https://github.com/NomicFoundation/hardhat/tree/main/packages/hardhat-etherscan#adding-support-for-other-networks | ||
}; | ||
//# sourceMappingURL=ChainConfig.js.map |
@@ -46,3 +46,3 @@ "use strict"; | ||
(0, config_1.extendConfig)(config_2.etherscanConfigExtender); | ||
const verify = async ({ address, constructorArgsParams, constructorArgs: constructorArgsModule, contract, libraries: librariesModule, listNetworks, }, { config, run }) => { | ||
const verify = async ({ address, constructorArgsParams, constructorArgs: constructorArgsModule, contract, libraries: librariesModule, listNetworks, noCompile, }, { config, run }) => { | ||
if (listNetworks) { | ||
@@ -68,5 +68,6 @@ await (0, util_1.printSupportedNetworks)(config.etherscan.customChains); | ||
libraries, | ||
noCompile, | ||
}); | ||
}; | ||
const verifySubtask = async ({ address, constructorArguments, contract: contractFQN, libraries }, { config, network, run }) => { | ||
const verifySubtask = async ({ address, constructorArguments, contract: contractFQN, libraries, noCompile, }, { config, network, run }) => { | ||
const { etherscan } = config; | ||
@@ -116,3 +117,5 @@ const { isAddress } = await Promise.resolve().then(() => __importStar(require("@ethersproject/address"))); | ||
// Make sure that contract artifacts are up-to-date. | ||
await run(task_names_1.TASK_COMPILE); | ||
if (!noCompile) { | ||
await run(task_names_1.TASK_COMPILE); | ||
} | ||
const contractInformation = await run(constants_1.TASK_VERIFY_GET_CONTRACT_INFORMATION, { | ||
@@ -448,2 +451,3 @@ contractFQN, | ||
.addFlag("listNetworks", "Print the list of supported networks") | ||
.addFlag("noCompile", "Don't compile before running this task") | ||
.setAction(verify); | ||
@@ -455,2 +459,3 @@ (0, config_1.subtask)(constants_1.TASK_VERIFY_VERIFY) | ||
.addOptionalParam("libraries", undefined, {}, config_1.types.any) | ||
.addFlag("noCompile", undefined) | ||
.setAction(verifySubtask); | ||
@@ -457,0 +462,0 @@ function assertHardhatPluginInvariant(invariant, message) { |
@@ -9,2 +9,3 @@ "use strict"; | ||
const util_1 = __importDefault(require("util")); | ||
const cbor_1 = require("cbor"); | ||
exports.METADATA_LENGTH_SIZE = 2; | ||
@@ -67,8 +68,3 @@ exports.METADATA_PRESENT_SOLC_NOT_FOUND_VERSION_RANGE = "0.4.7 - 0.5.8"; | ||
log(`Last ${lastMetadataBytes.length} bytes of metadata: ${lastMetadataBytes.toString("hex")}`); | ||
const { decodeFirstSync } = require("cbor"); | ||
// The documentation for decodeFirst mentions the `required` option even though | ||
// the type information is missing it. | ||
// See http://hildjj.github.io/node-cbor/Decoder.html#.decodeFirst | ||
const options = { required: true }; | ||
const decoded = decodeFirstSync(metadataPayload, options); | ||
const decoded = (0, cbor_1.decodeFirstSync)(metadataPayload, { required: true }); | ||
return { | ||
@@ -75,0 +71,0 @@ decoded, |
{ | ||
"name": "@nomiclabs/hardhat-etherscan", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"description": "Hardhat plugin for verifying contracts on etherscan", | ||
"repository": "github:nomiclabs/hardhat", | ||
"homepage": "https://github.com/nomiclabs/hardhat/tree/master/packages/hardhat-etherscan", | ||
"homepage": "https://github.com/nomiclabs/hardhat/tree/main/packages/hardhat-etherscan", | ||
"author": "Nomic Labs LLC", | ||
@@ -41,8 +41,8 @@ "contributors": [ | ||
"@ethersproject/address": "^5.0.2", | ||
"cbor": "^5.0.2", | ||
"cbor": "^8.1.0", | ||
"chalk": "^2.4.2", | ||
"debug": "^4.1.1", | ||
"fs-extra": "^7.0.1", | ||
"lodash": "^4.17.11", | ||
"semver": "^6.3.0", | ||
"lodash": "^4.17.11", | ||
"table": "^6.8.0", | ||
@@ -53,3 +53,2 @@ "undici": "^5.4.0" | ||
"@nomiclabs/hardhat-ethers": "^2.0.0", | ||
"@types/cbor": "^5.0.1", | ||
"@types/chai": "^4.2.0", | ||
@@ -56,0 +55,0 @@ "@types/fs-extra": "^5.1.0", |
@@ -224,3 +224,3 @@ import { ChainConfig } from "./types"; | ||
// Please read this to learn how to manually add support for custom networks: | ||
// https://github.com/NomicFoundation/hardhat/tree/master/packages/hardhat-etherscan#adding-support-for-other-networks | ||
// https://github.com/NomicFoundation/hardhat/tree/main/packages/hardhat-etherscan#adding-support-for-other-networks | ||
}; |
@@ -83,2 +83,4 @@ import { | ||
listNetworks: boolean; | ||
// --no-compile flag | ||
noCompile: boolean; | ||
} | ||
@@ -92,2 +94,3 @@ | ||
libraries: Libraries; | ||
noCompile: boolean; | ||
} | ||
@@ -139,2 +142,3 @@ | ||
listNetworks, | ||
noCompile, | ||
}, | ||
@@ -174,2 +178,3 @@ { config, run } | ||
libraries, | ||
noCompile, | ||
}); | ||
@@ -179,3 +184,9 @@ }; | ||
const verifySubtask: ActionType<VerificationSubtaskArgs> = async ( | ||
{ address, constructorArguments, contract: contractFQN, libraries }, | ||
{ | ||
address, | ||
constructorArguments, | ||
contract: contractFQN, | ||
libraries, | ||
noCompile, | ||
}, | ||
{ config, network, run } | ||
@@ -257,3 +268,5 @@ ) => { | ||
// Make sure that contract artifacts are up-to-date. | ||
await run(TASK_COMPILE); | ||
if (!noCompile) { | ||
await run(TASK_COMPILE); | ||
} | ||
@@ -847,2 +860,3 @@ const contractInformation: ExtendedContractInformation = await run( | ||
.addFlag("listNetworks", "Print the list of supported networks") | ||
.addFlag("noCompile", "Don't compile before running this task") | ||
.setAction(verify); | ||
@@ -855,2 +869,3 @@ | ||
.addOptionalParam("libraries", undefined, {}, types.any) | ||
.addFlag("noCompile", undefined) | ||
.setAction(verifySubtask); | ||
@@ -857,0 +872,0 @@ |
@@ -1,5 +0,4 @@ | ||
import type cbor from "cbor"; | ||
import debug from "debug"; | ||
import util from "util"; | ||
import { decodeFirstSync } from "cbor"; | ||
@@ -82,9 +81,3 @@ interface MetadataDescription { | ||
); | ||
const { decodeFirstSync }: typeof cbor = require("cbor"); | ||
// The documentation for decodeFirst mentions the `required` option even though | ||
// the type information is missing it. | ||
// See http://hildjj.github.io/node-cbor/Decoder.html#.decodeFirst | ||
const options: cbor.DecoderOptions = { required: true } as any; | ||
const decoded = decodeFirstSync(metadataPayload, options); | ||
const decoded = decodeFirstSync(metadataPayload, { required: true }); | ||
return { | ||
@@ -91,0 +84,0 @@ decoded, |
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
Sorry, the diff of this file is not supported yet
21
4114
234562
+ Addedcbor@8.1.0(transitive)
+ Addednofilter@3.1.0(transitive)
- Removedbignumber.js@9.1.2(transitive)
- Removedcbor@5.2.0(transitive)
- Removednofilter@1.0.4(transitive)
Updatedcbor@^8.1.0