@matterlabs/hardhat-zksync-verify
Version:
Hardhat plugin to verify smart contracts for the ZKsync network
37 lines • 2.69 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
require("@nomicfoundation/hardhat-verify");
const config_1 = require("hardhat/config");
require("./type-extensions");
require("./explorers/zksync-block-explorer/task-actions");
require("./explorers/zksync-etherscan/task-actions");
const constants_1 = require("./constants");
const task_actions_1 = require("./task-actions");
require("@matterlabs/hardhat-zksync-telemetry");
(0, config_1.extendEnvironment)((hre) => {
if (hre.network.config.zksync) {
hre.network.config.enableVerifyURL = hre.network.config.enableVerifyURL ?? false;
}
});
(0, config_1.subtask)(constants_1.TASK_VERIFY_GET_VERIFICATION_SUBTASKS).setAction(task_actions_1.getVerificationSubtasks);
(0, config_1.task)(constants_1.TASK_VERIFY, 'Verifies contract on Ethereum and ZKsync networks')
.addFlag('noCompile', 'Run verify without compile')
.setAction(task_actions_1.verify);
(0, config_1.subtask)(constants_1.TASK_VERIFY_VERIFY).setAction(task_actions_1.verifyContract);
(0, config_1.subtask)(constants_1.TASK_VERIFY_GET_COMPILER_VERSIONS).setAction(task_actions_1.getCompilerVersions);
(0, config_1.subtask)(constants_1.TASK_VERIFY_GET_CONSTRUCTOR_ARGUMENTS).setAction(task_actions_1.getConstructorArguments);
(0, config_1.subtask)(constants_1.TASK_VERIFY_GET_CONTRACT_INFORMATION).setAction(task_actions_1.getContractInfo);
(0, config_1.subtask)(constants_1.TASK_VERIFY_RESOLVE_ARGUMENTS, 'Resolve verify arguments')
.addOptionalPositionalParam('address', 'Address of the contract to verify')
.addOptionalVariadicPositionalParam('constructorArgsParams', 'Contract constructor arguments. Cannot be used if the --constructor-args option is provided', [])
.addOptionalParam('constructorArgs', 'Path to a Javascript module that exports the constructor arguments', undefined, config_1.types.inputFile)
.addOptionalParam('libraries', 'Path to a Javascript module that exports a dictionary of library addresses. ' +
'Use if there are undetectable library addresses in your contract. ' +
'Library addresses are undetectable if they are only used in the contract constructor', undefined, config_1.types.inputFile)
.addOptionalParam('contract', 'Fully qualified name of the contract to verify. Skips automatic detection of the contract. ' +
'Use if the deployed bytecode matches more than one contract in your project')
.addFlag('force', 'Enforce contract verification even if the contract is already verified. ' +
'Use to re-verify partially verified contracts on Blockscout')
.addFlag('noCompile')
.setAction(task_actions_1.resolveArguments);
//# sourceMappingURL=index.js.map