{"_id":"@codingsh/hardhat-blockscout","_rev":"2-829fefb6f65d8bc1d0fcefe55312f0e1","name":"@codingsh/hardhat-blockscout","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@codingsh/hardhat-blockscout","version":"1.0.0","description":"Hardhat plugin for verifying contracts on blockscout","repository":{"type":"git","url":"git+https://github.com/developerfred/hardhat.git"},"homepage":"https://github.com/developerfred/hardhat/tree/master/packages/hardhat-blockscout","authors":"Nomic Labs LLC","contributors":[{"name":"Nomic Labs LLC"},{"name":"Marin Petrunić","email":"marin@nodefactory.io"},{"name":"Codignsh","email":"codingsh@pm.me"}],"license":"MIT","main":"dist/src/index.js","types":"dist/src/index.d.ts","keywords":["fuse-network","smart-contracts","hardhat","hardhat-plugin","blockscout"],"scripts":{"lint":"yarn prettier --check && yarn eslint","lint:fix":"yarn prettier --write && yarn eslint --fix","eslint":"eslint 'src/**/*.ts' 'test/**/*.ts'","prettier":"prettier \"**/*.{js,md,json}\"","test":"mocha --recursive \"test/**/*.ts\" --exit","build":"tsc --build .","clean":"rimraf dist"},"dependencies":{"@ethersproject/abi":"^5.1.2","@ethersproject/address":"^5.0.2","cbor":"^5.0.2","debug":"^4.1.1","fs-extra":"^7.0.1","node-fetch":"^2.6.0","semver":"^6.3.0"},"devDependencies":{"@nomiclabs/hardhat-ethers":"^2.0.0","@types/cbor":"^5.0.1","@types/chai":"^4.2.0","@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","@typescript-eslint/eslint-plugin":"4.29.2","@typescript-eslint/parser":"4.29.2","chai":"^4.2.0","eslint":"^7.29.0","eslint-config-prettier":"8.3.0","eslint-plugin-import":"2.24.1","eslint-plugin-prettier":"3.4.0","ethers":"^5.0.8","hardhat":"^2.0.4","mocha":"^7.1.2","nock":"^13.0.5","prettier":"2.3.2","rimraf":"^3.0.2","ts-node":"^8.1.0","typescript":"~4.0.3"},"peerDependencies":{"hardhat":"^2.0.4"},"bugs":{"url":"https://github.com/developerfred/hardhat/issues"},"directories":{"test":"test"},"author":"","_id":"@codingsh/hardhat-blockscout@1.0.0","_nodeVersion":"16.6.2","_npmVersion":"7.20.3","dist":{"integrity":"sha512-vPvwIy7NuD2ncSjatOefvNyYukyrIW/gb2Ju2LRi714Xd2TpClA08JXAv4Zu9iuyoWztoM2fRgFh7jN3zzKBvg==","shasum":"8b0ec2568dea6d9d86f785a2ebd7428acbb5f2d9","tarball":"https://registry.npmjs.org/@codingsh/hardhat-blockscout/-/hardhat-blockscout-1.0.0.tgz","fileCount":83,"unpackedSize":227355,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQhXmCRA9TVsSAnZWagAAGbAP/0fK7C5bRPmEjdubFzoD\nfTMaga8Nvawg3Orf4aLO0WqrxznuQ5iGe2yxTLDljnX/snMQpNk0hcG0A/Pi\noaPioJaWM78+InOMomF8oNT5cEFuDiljm0VnLpdLL2nOIV6bZ1qR4ysCDaBj\nGKnxJQVVpwLMDKmE3KrF0xoOw/YU2nzvbwIASiOdKbnzt8Mrqs2TRQ7fwma3\nCVmFnm6TpVUIfd0TMesgSK8yiPsob6CyXkLdWZBHv3tvO56oUmb4LNFncDqG\na42PYJtzPl6D+BlE1xCr6I9cjKbgOmefhlx0Wp4TfmQyeJu/H613RCvCNeSn\noh/DIwxC4O6R2nQkUkkKYOSgfqm3zYlH1OHNAYhg0IyOh6ZPOI6zAG8p9C0X\nwib7Rqh8KcbtOoc+rztO4rcV9KD+2FasZfMBpGxsF/KTUpaqZNFrumva925x\nopTiN+tGNLN1BQrJrITl51uC4SYtULO5KiqdlfkvTywlEvi8JED344ycwv4U\nPOG4oqzS+VsVJPW+6jaJv25S0nq9jJeqPpjdQyJgdN/UUfexRW9ZQbyhd+vf\n4A+ikC1V0kngfutCOiFtP2G7uqjSiT6qAXaadunlNRD4QOEDrvOI4FtGDL7r\nrRV2KK3ow99GsFl3hEy2/jK+hEUi6ZwEzVm+7ritkLqfxGVWXZXzbqq4ETLv\nGI35\r\n=s+u/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGE9aOy0VvE7b5Qq80Pcx9c9rEOctjnNq187pRObXtkQAiBO3idke3q+uOxaR+U1M4m4JzEsUmNNaw12USnryW65Yg=="}]},"_npmUser":{"name":"codingsh","email":"codingsh@pm.me"},"maintainers":[{"name":"codingsh","email":"codingsh@pm.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hardhat-blockscout_1.0.0_1631720934580_0.6245440809987302"},"_hasShrinkwrap":false},"1.0.1":{"name":"@codingsh/hardhat-blockscout","version":"1.0.1","description":"Hardhat plugin for verifying contracts on blockscout","repository":{"type":"git","url":"git+https://github.com/developerfred/hardhat.git"},"homepage":"https://github.com/developerfred/hardhat/tree/master/packages/hardhat-blockscout","authors":"Nomic Labs LLC","contributors":[{"name":"Nomic Labs LLC"},{"name":"Marin Petrunić","email":"marin@nodefactory.io"},{"name":"Codignsh","email":"codingsh@pm.me"}],"license":"MIT","main":"dist/src/index.js","types":"dist/src/index.d.ts","keywords":["fuse-network","smart-contracts","hardhat","hardhat-plugin","blockscout"],"scripts":{"lint":"yarn prettier --check && yarn eslint","lint:fix":"yarn prettier --write && yarn eslint --fix","eslint":"eslint 'src/**/*.ts' 'test/**/*.ts'","prettier":"prettier \"**/*.{js,md,json}\"","test":"mocha --recursive \"test/**/*.ts\" --exit","build":"tsc --build .","clean":"rimraf dist"},"dependencies":{"@ethersproject/abi":"^5.1.2","@ethersproject/address":"^5.0.2","cbor":"^5.0.2","debug":"^4.1.1","fs-extra":"^7.0.1","node-fetch":"^2.6.0","semver":"^6.3.0"},"devDependencies":{"@nomiclabs/hardhat-ethers":"^2.0.0","@types/cbor":"^5.0.1","@types/chai":"^4.2.0","@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","@typescript-eslint/eslint-plugin":"4.29.2","@typescript-eslint/parser":"4.29.2","chai":"^4.2.0","eslint":"^7.29.0","eslint-config-prettier":"8.3.0","eslint-plugin-import":"2.24.1","eslint-plugin-prettier":"3.4.0","ethers":"^5.0.8","hardhat":"^2.0.4","mocha":"^7.1.2","nock":"^13.0.5","prettier":"2.3.2","rimraf":"^3.0.2","ts-node":"^8.1.0","typescript":"~4.0.3"},"peerDependencies":{"hardhat":"^2.0.4"},"bugs":{"url":"https://github.com/developerfred/hardhat/issues"},"directories":{"test":"test"},"author":"","_id":"@codingsh/hardhat-blockscout@1.0.1","_nodeVersion":"16.6.2","_npmVersion":"7.20.3","dist":{"integrity":"sha512-1eZyP8p+L3k93T+lkTSql4t58kybTXgN9dojLhCPhyM7/S3HW4CufZ8C0YbPMWT+AKjER8Ga+q/v4M3MI7/bGg==","shasum":"ed37ffff6e7373f26195b810bd8fde2e6cf8eb54","tarball":"https://registry.npmjs.org/@codingsh/hardhat-blockscout/-/hardhat-blockscout-1.0.1.tgz","fileCount":83,"unpackedSize":227357,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQidTCRA9TVsSAnZWagAAon4P/3cuWauVYvPqUd7RikOC\nSGD6w2US5Hem1FI33PcGu1gym7pBv7oXPfL4VbxWDl/4uE2le8qTtDvdonX/\n+BoUljcxSphoUnkEFLjjyUF2Vn4FfKNKRHMqv1o+nJM6p5tfJGXQ1bGXNcfb\ntcnlI6j1ClbZJeUZZLVoVd/2Oi0W0nYJYfG7cymAX/OEGgvfCou1tnN7xqPk\nEpQXG6wwAG+RQnN4Xx6Dhjd/3z8liN9cljrZuVOVuV6DGtlYZZkdEbqAlHOZ\n9jgjR2XWjr1sfUA3cS8KTucfjaFp201dtuBht8APyEYoDh/2vQ4o4cZGjU7b\nz4J4MLs3cyxPVuK0yPmraMC+JLBagz8udF5jb2orGze7vUwEohcSy8TvsVnC\nre/z0kiaIlNAEMZefBHjLlVQhyS3C23+En1cchQCjN7txWsvElChLGrWofqO\n2Halmnc1/6KZnRIaVPhI0kL6zm0k4JOKyV/fQlMSd6zFYB9OD9mfimgE02IT\nZn4GPieXej+s6q3rd3FkXuQj4grKxj5OMDdp21tKDBHCvBPm7VZtuXVz2HzK\nXnO6AuKpI6kMX79QGGaePitWI9d5TcwYgR7uunIdR0ggNfXZ8rEEbvMIXiUM\nobxJ6zPwxrKGPj8pl8BvnoRpObL/Zxqq4ugfL6ud1PPSNqmV2v/r0ZcNqWGm\nxPOc\r\n=j0lX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdmMAr2Spb2BvKa/BFusOlHEG8jHYy0PMCa3nfOdTfVAIgK85Ilezqlb/qvt4Wsus51XcBcCXLecVRPwVoO+Vda3s="}]},"_npmUser":{"name":"codingsh","email":"codingsh@pm.me"},"maintainers":[{"name":"codingsh","email":"codingsh@pm.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hardhat-blockscout_1.0.1_1631725394958_0.6553110984803394"},"_hasShrinkwrap":false}},"time":{"created":"2021-09-15T15:48:54.519Z","1.0.0":"2021-09-15T15:48:54.736Z","modified":"2022-04-05T00:09:43.600Z","1.0.1":"2021-09-15T17:03:15.142Z"},"maintainers":[{"name":"codingsh","email":"codingsh@pm.me"}],"description":"Hardhat plugin for verifying contracts on blockscout","homepage":"https://github.com/developerfred/hardhat/tree/master/packages/hardhat-blockscout","keywords":["fuse-network","smart-contracts","hardhat","hardhat-plugin","blockscout"],"repository":{"type":"git","url":"git+https://github.com/developerfred/hardhat.git"},"contributors":[{"name":"Nomic Labs LLC"},{"name":"Marin Petrunić","email":"marin@nodefactory.io"},{"name":"Codignsh","email":"codingsh@pm.me"}],"bugs":{"url":"https://github.com/developerfred/hardhat/issues"},"license":"MIT","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-blockscout\n\n[Hardhat](https://hardhat.org) plugin for integration with [blockscout](https://blockscout.com/)'s contract verification service.\n\n## What\n\nThis plugin helps you verify the source code for your Solidity contracts on [blockscout](https://blockscout.com/).\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-blockscout\n```\n\nAnd add the following statement to your `hardhat.config.js`:\n\n```js\nrequire(\"@nomiclabs/hardhat-blockscout\");\n```\n\nOr, if you are using TypeScript, add this to your `hardhat.config.ts`:\n\n```js\nimport \"@nomiclabs/hardhat-blockscout\";\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\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### 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","readmeFilename":"README.md"}