{"_id":"@compound-finance/hardhat-match","_rev":"2-60eefe2db7a0b69446002c02067f7be9","name":"@compound-finance/hardhat-match","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@compound-finance/hardhat-match","version":"1.0.0","author":{"name":"Compound Labs"},"license":"MIT","_id":"@compound-finance/hardhat-match@1.0.0","maintainers":[{"name":"arr00","email":"arr00comp@gmail.com"},{"name":"hayesgm","email":"geoff@compound.finance"},{"name":"ajb413","email":"adam@compound.finance"}],"dist":{"shasum":"57666b56c4b2cdbee4c7e570f8ea14dceee1cc40","tarball":"https://registry.npmjs.org/@compound-finance/hardhat-match/-/hardhat-match-1.0.0.tgz","fileCount":27,"integrity":"sha512-Rwq0Q9Xra9UdUE7JDPKCHbLSmL/wf4AwgFpDPeC6mSryC5yJFt9oekmlSuV/JlNg7gxuFmH5kRykjoVXTac9dg==","signatures":[{"sig":"MEYCIQDKvQszqH0DlLCu0MDF3DPF9pMpN4ZBWZ2MbrDR/yDc3wIhANguG/FeH47UAkpaQA5F0njK+V7S6oqixjNAyN4CzBmj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":62391,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsQzUCRA9TVsSAnZWagAApn0QAJFj/sg7W7vtfAF3K6wh\nxC23prZQ7w8WvBIm/kgrpl8Vbdw4Yj6G9kKTm+CQtci+gxdCL7cPNoKspxmx\n8F4DjXxG14Z/vjH/Pl1UgtAFrIvxSQLfaXRc4KH4HKfJPSn+ywg8cvTiyE3M\nUy5RjAsXCpXKGcLN/bC0sBfagMhep3dU7GK9dQZd0b6jQuBNg2K82d9odr1L\nd/e26JDDpatoqmHKqAOJiSFaMWD0ftFylPZ2YjgnMl7LiU+1VY4OVGhxbR1Q\nhji95YBM/LxeT3L1QyrCxSM5IjBOSgnp7AEHlRLgfClt9B1HoKuPnNMPRUWk\nLQyWETLjzd9OTOdbYGuls6NcOFngNhvu3/NZVzxde6RI6fhdKwAFtugE1Ely\nTVSR+MFAxEk/l/uzosjxXo6+c4LIPcrLcaPJjnWFyPjF+VyT31s1CH4r58Qz\nEnjVCC7Jz68kax98Ij6lSLgTvCKio1neo+xKkk9VtmDqB5Mba0T9c6oID2GU\nYkKXjI2NvYaN5EXJ2/gO55IkjDlCquyqbfi4cnuWIgi7M5YlHn/be/oUZXm8\n5EKylzHkBVQokC1b5zuOViH+Y0a4ZO2LKLmvm503+2B/WTkmL1VXdvlgBFUC\nvnf9A9Dryg1whJdOf34zUZX3eulmmVZJnaNWnNCxv70Umbsccb2wU9Oc/Qwe\nplHH\r\n=sUoO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"lint":"npm run prettier --check && npm run eslint","build":"tsc --build .","clean":"rimraf dist","eslint":"eslint 'src/**/*.ts'","lint:fix":"npm run prettier --write && npm run eslint --fix","prettier":"prettier \"**/*.{js,md,json}\""},"_npmUser":{"name":"arr00","email":"arr00comp@gmail.com"},"_npmVersion":"6.14.15","description":"Hardhat plugin for matching contract bytecode","directories":{},"_nodeVersion":"14.18.1","dependencies":{"cbor":"^5.0.2","debug":"^4.1.1","dotenv":"^10.0.0","semver":"^6.3.0","fs-extra":"^7.0.1","node-fetch":"^2.6.0","@ethersproject/abi":"^5.1.2","@ethersproject/address":"^5.0.2"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","nock":"^13.0.5","mocha":"^7.1.2","eslint":"^7.29.0","ethers":"^5.0.8","rimraf":"^3.0.2","hardhat":"^2.0.4","ts-node":"^8.1.0","prettier":"2.3.2","typescript":"~4.0.3","@types/cbor":"^5.0.1","@types/chai":"^4.2.0","@types/node":"^10.17.24","@types/mocha":"^5.2.6","@types/semver":"^6.0.2","@types/fs-extra":"^5.1.0","@types/node-fetch":"^2.3.7","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-match_1.0.0_1638993108256_0.7959820527668244","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-12-08T19:51:48.197Z","modified":"2024-12-12T18:14:47.838Z","1.0.0":"2021-12-08T19:51:48.417Z"},"author":{"name":"Compound Labs"},"license":"MIT","description":"Hardhat plugin for matching contract bytecode","maintainers":[{"email":"arr00comp@gmail.com","name":"arr00"},{"email":"hayesgm@gmail.com","name":"hayesgm"},{"email":"adam@compound.finance","name":"ajb413"},{"email":"bhasinaryan@gmail.com","name":"aryanbhasin"}],"readme":"# @compound-finance/hardhat-match forked from @nomiclabs/hardhat-etherscan\n\n[Hardhat](https://hardhat.org) plugin for matching deployed contract bytecode to locally compiled version.\n\n## Installation\n\nBuild project using `npm run build` and then add to your project via npm.\n\nAdd the following statement to your `hardhat.config.js`:\n\n```js\nrequire(\"@compound-finance/hardhat-match\");\n```\n\nOr, if you are using TypeScript, add this to your `hardhat.config.ts`:\n\n```js\nimport \"@compound-finance/hardhat-match\";\n```\n\n## Tasks\n\nThis plugin provides the `match` task, which allows you to match contracts by pulling deployed bytecode and locally compiling contracts. If the etherscan key is set, the constructor arguments will be compaired with the verified values on etherscan.\n\n## Usage\n\nYou may 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 `match` 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 match --network mainnet DEPLOYED_CONTRACT_ADDRESS \"Constructor argument 1\"\n```\n\n### Using programmatically\n\nTo call the verification task from within a Hardhat task or script, use the `\"match:match\"` subtask. You can run the subtask like this:\n\n```js\nawait hre.run(\"match:match\", {\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 match is not successful, an error will be thrown.\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- Bytecode metadata is not part of the match comparison. If comments or whitespacing are changed, the match will still be successful.\n","readmeFilename":"README.md"}