{"bugs":{"url":"https://github.com/nomiclabs/hardhat/issues"},"dist":{"shasum":"ad57845ecb3c17b4eee4e6bf685cab52d15e4565","tarball":"https://registry.npmjs.org/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.1.0-rc.2.tgz","fileCount":93,"integrity":"sha512-2FEKz464QEmTiiMUjXRw+AyEmbx8i/51B5+l4p3FjJoAitK5Yj29gaCXeVZq5hB5f6dw3BmWDLwJuN04zFYOfw==","signatures":[{"sig":"MEYCIQCpljaq2AxPQtAyIx44D4hEIVlRp3BYUSeWTiNnJ54LuQIhAO5cI4bxJc5BkUvfUJIIFBgWCKxG5LCTRFoKVh3cezws","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":233249,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJimiceACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr2Dg/8DNRjVMRdgQvxHJPF95zREwOdKMpxM9nR3VPPNtBYV1LXWxjT\r\nyfZmn8gG9Rjp2Pk/9kOyhhpN9ceIrCoj3zVE5OmxsgnjiTZL1xy5wsI2r0if\r\nSB362PrxrJV9mOZnHOd2Z3DRT5fAsATjmgYChRJH8qupgAITMiZZIoyHg10B\r\n0LeVWrRx6gYf5Cds0nJsbtPkfmuS/NSPK97tjQgrD+tAgEVPZwKV6NYLEZxJ\r\nfiv5Fjy/Bh0izfCVjpvSS7RBpoW6tUBqKbjVFHQ/zr5GbqbjrLHLVj5/9j7L\r\nxK2J0Na5Tjg1S9PpUVSty0c4zdlGes9QNzPhQWv8i1cHnQFxl6bEOowkMRvz\r\n5+sO9O51vZnW8L/+huWQUBMULK4I4c+GmfhGXUqm5wpQaXhN6nuYfZ9hkLza\r\nryQe+bXTNfEtI4HfjI1DAP344WIN6mIMPntg6R1KT4waQ2zsIa7D9eyPeeGT\r\nAWDPTuu7C4zKS7r9xLQXAjRzdsHTn7SIjkjqmgTnwTZ8nciCiP32pwAOnozr\r\nwdJKXalKKnW3rHH47cbzR3g4eX5XQwtexOrq3CNzb7bwaZogwX0RSo526LVi\r\n2ptFzQpTKtYKPSnOjH+QaeoCIpw7N5rTUld16aGiSVmLdW/qnHVOFqkODFpl\r\nn/yfCl+Bg9uWnBGJ4t4auOhpMEZUsJit0L0=\r\n=7fbc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/src/index.js","name":"@nomiclabs/hardhat-etherscan","types":"dist/src/index.d.ts","author":{"name":"Nomic Labs LLC"},"readme":"[![npm](https://img.shields.io/npm/v/@nomiclabs/hardhat-etherscan.svg)](https://www.npmjs.com/package/@nomiclabs/hardhat-etherscan) [![hardhat](https://hardhat.org/buidler-plugin-badge.svg?1)](https://hardhat.org)\n\n# hardhat-etherscan\n\n[Hardhat](https://hardhat.org) plugin for integration with [Etherscan](https://etherscan.io)'s contract verification service.\n\n## What\n\nThis plugin helps you verify the source code for your Solidity contracts on [Etherscan](https://etherscan.io).\n\nIt's smart and it tries to do as much as possible to facilitate the process:\n\n- Just provide the deployment address and constructor arguments, and the plugin will detect locally which contract to verify.\n- If your contract uses Solidity libraries, the plugin will detect them and deal with them automatically. You don't need to do anything about them.\n- A simulation of the verification process will run locally, allowing the plugin to detect and communicate any mistakes during the process.\n- Once the simulation is successful the contract will be verified using the Etherscan API.\n\n## Installation\n\n```bash\nnpm install --save-dev @nomiclabs/hardhat-etherscan\n```\n\nAnd add the following statement to your `hardhat.config.js`:\n\n```js\nrequire(\"@nomiclabs/hardhat-etherscan\");\n```\n\nOr, if you are using TypeScript, add this to your `hardhat.config.ts`:\n\n```js\nimport \"@nomiclabs/hardhat-etherscan\";\n```\n\n## Tasks\n\nThis plugin provides the `verify` task, which allows you to verify contracts through Etherscan's service.\n\n## Environment extensions\n\nThis plugin does not extend the environment.\n\n## Usage\n\nYou need to add the following Etherscan config to your `hardhat.config.js` file:\n\n```js\nmodule.exports = {\n  networks: {\n    mainnet: { ... }\n  },\n  etherscan: {\n    // Your API key for Etherscan\n    // Obtain one at https://etherscan.io/\n    apiKey: \"YOUR_ETHERSCAN_API_KEY\"\n  }\n};\n```\n\nAlternatively you can specify more than one block explorer API key, by passing an object under the `apiKey` property, see [`Multiple API keys and alternative block explorers`](#multiple-api-keys-and-alternative-block-explorers).\n\nLastly, run the `verify` task, passing the address of the contract, the network where it's deployed, and the constructor arguments that were used to deploy it (if any):\n\n```bash\nnpx hardhat verify --network mainnet DEPLOYED_CONTRACT_ADDRESS \"Constructor argument 1\"\n```\n\n### Complex arguments\n\nWhen 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:\n\n```solidity\nstruct Point {\n  uint x;\n  uint y;\n}\n\ncontract Foo {\n  constructor (uint x, string s, Point memory point, bytes b) { ... }\n}\n```\n\nthen you can use an `arguments.js` file like this:\n\n```js\nmodule.exports = [\n  50,\n  \"a string argument\",\n  {\n    x: 10,\n    y: 5,\n  },\n  // bytes have to be 0x-prefixed\n  \"0xabcdef\",\n];\n```\n\nWhere the third argument represents the value for the `point` parameter.\n\nThe module can then be loaded by the `verify` task when invoked like this:\n\n```bash\nnpx hardhat verify --constructor-args arguments.js DEPLOYED_CONTRACT_ADDRESS\n```\n\n### Libraries with undetectable addresses\n\nSome library addresses are undetectable. If your contract uses a library only in the constructor, then its address cannot be found in the deployed bytecode.\n\nTo supply these missing addresses, you can create a javascript module that exports a library dictionary and pass it through the `--libraries` parameter:\n\n```bash\nhardhat verify --libraries libraries.js OTHER_ARGS\n```\n\nwhere `libraries.js` looks like this:\n\n```js\nmodule.exports = {\n  SomeLibrary: \"0x...\",\n};\n```\n\n### Multiple API keys and alternative block explorers\n\nIf your project targets multiple EVM-compatible networks that have different explorers, you'll need to set multiple API keys.\n\nTo configure the API keys for the chains you are using, provide an object under `etherscan/apiKey` with the identifier of each chain as the key. **This is not necessarily the same name that you are using to define the network**. For example, if you are going to verify contracts in Ethereum mainnet, Optimism and Arbitrum, your config would look like this:\n\n```js\nmodule.exports = {\n  networks: {\n    mainnet: { ... },\n    testnet: { ... }\n  },\n  etherscan: {\n    apiKey: {\n        mainnet: \"YOUR_ETHERSCAN_API_KEY\",\n        optimisticEthereum: \"YOUR_OPTIMISTIC_ETHERSCAN_API_KEY\",\n        arbitrumOne: \"YOUR_ARBISCAN_API_KEY\",\n    }\n  }\n};\n```\n\nTo see the full list of supported networks, run `npx hardhat verify --list-networks`. The identifiers shown there are the ones that should be used as keys in the `apiKey` object.\n\n### Adding support for other networks\n\nIf the chain you are using is not in the list, you can manually add the necessary information to verify your contracts on it. For this you need three things: the chain id of the network, the URL of the verification endpoint, and the URL of the explorer.\n\nFor example, if Rinkeby wasn't supported, you could add it like this:\n\n```\netherscan: {\n  apiKey: {\n    rinkeby: \"<rinkeby-api-key>\"\n  },\n  customChains: [\n    {\n      network: \"rinkeby\",\n      chainId: 4,\n      urls: {\n        apiURL: \"https://api-rinkeby.etherscan.io/api\",\n        browserURL: \"https://rinkeby.etherscan.io\"\n      }\n    }\n  ]\n}\n```\n\nKeep in mind that the name you are giving to the network in `customChains` is the same one that has to be used in the `apiKey` object.\n\nTo see which custom chains are supported, run `npx hardhat verify --list-networks`.\n\n### Using programmatically\n\nTo call the verification task from within a Hardhat task or script, use the `\"verify:verify\"` subtask. Assuming the same contract as [above](#complex-arguments), you can run the subtask like this:\n\n```js\nawait hre.run(\"verify:verify\", {\n  address: contractAddress,\n  constructorArguments: [\n    50,\n    \"a string argument\",\n    {\n      x: 10,\n      y: 5,\n    },\n    \"0xabcdef\",\n  ],\n});\n```\n\nIf the verification is not successful, an error will be thrown.\n\n#### Providing libraries from a script or task\n\nIf your contract has libraries with undetectable addresses, you may pass the libraries parameter with a dictionary specifying them:\n\n```js\nhre.run(\"verify:verify\", {\n  // other args\n  libraries: {\n    SomeLibrary: \"0x...\",\n  }\n}\n```\n\n## How it works\n\nThe plugin works by fetching the bytecode in the given address and using it to check which contract in your project corresponds to it. Besides that, some sanity checks are performed locally to make sure that the verification won't fail.\n\n## Known limitations\n\n- Adding, removing, moving or renaming new contracts to the hardhat project or reorganizing the directory structure of contracts after deployment may alter the resulting bytecode in some solc versions. See this [Solidity issue](https://github.com/ethereum/solidity/issues/9573) for further information.\n","gitHead":"7f5ace3e4865401512ae056b48b709e00db88b72","license":"MIT","scripts":{"lint":"yarn prettier --check && yarn eslint","test":"mocha --recursive \"test/**/*.ts\" --exit","build":"tsc --build .","clean":"rimraf dist","eslint":"eslint 'src/**/*.ts' 'test/**/*.ts'","lint:fix":"yarn prettier --write && yarn eslint --fix","prettier":"prettier \"**/*.{js,md,json}\""},"_npmUser":{"name":"fvictorio","email":"victorio.franco@gmail.com"},"homepage":"https://github.com/nomiclabs/hardhat/tree/master/packages/hardhat-etherscan","keywords":["ethereum","smart-contracts","hardhat","hardhat-plugin","etherscan"],"deprecated":"The @nomiclabs/hardhat-etherscan package is deprecated, please use @nomicfoundation/hardhat-verify instead","repository":{"url":"git+https://github.com/nomiclabs/hardhat.git","type":"git"},"_npmVersion":"8.8.0","description":"Hardhat plugin for verifying contracts on etherscan","directories":{},"maintainers":[{"name":"geneaum","email":"gene@aumson.org"},{"name":"fzeoli","email":"franco@nomiclabs.io"},{"name":"alcuadrado","email":"email@patriciopalladino.com"},{"name":"fvictorio","email":"victorio.franco@gmail.com"}],"_nodeVersion":"16.15.0","contributors":[{"name":"Nomic Labs LLC"},{"name":"Marin Petrunić","email":"marin@nodefactory.io"}],"dependencies":{"cbor":"^5.0.2","chalk":"^2.4.2","debug":"^4.1.1","table":"^6.8.0","lodash":"^4.17.11","semver":"^6.3.0","undici":"^5.4.0","fs-extra":"^7.0.1","@ethersproject/abi":"^5.1.2","@ethersproject/address":"^5.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","mocha":"^9.2.0","eslint":"^7.29.0","ethers":"^5.0.8","rimraf":"^3.0.2","hardhat":"^2.0.4","ts-node":"^8.1.0","prettier":"2.4.1","typescript":"~4.5.2","@types/cbor":"^5.0.1","@types/chai":"^4.2.0","@types/node":"^12.0.0","@types/mocha":"^9.1.0","@types/semver":"^6.0.2","@types/fs-extra":"^5.1.0","eslint-plugin-import":"2.24.1","eslint-config-prettier":"8.3.0","eslint-plugin-prettier":"3.4.0","@nomiclabs/hardhat-ethers":"^2.0.0","@typescript-eslint/parser":"4.29.2","@typescript-eslint/eslint-plugin":"4.29.2"},"peerDependencies":{"hardhat":"^2.0.4"},"_npmOperationalInternal":{"tmp":"tmp/hardhat-etherscan_3.1.0-rc.2_1654269726604_0.692621839321296","host":"s3://npm-registry-packages"},"_id":"@nomiclabs/hardhat-etherscan@3.1.0-rc.2","version":"3.1.0-rc.2"}