{"dist":{"shasum":"1a9038a1d37b58db4549cf0704882c7acf118c14","tarball":"https://registry.npmjs.org/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.0.0-rc.1.tgz","fileCount":32,"integrity":"sha512-SiKelu6ucloLeARYbEZM69MCopkCKlVl1aPPvhSYXUWXkTWmeLEKIjn0mWUSd2Nq6gh1C3hEXEgjzj96wcNjiA==","signatures":[{"sig":"MEUCIBGnWRtr9gA7KV05RNaZ7L59r17JTJ94D+Ppv/D8TUIOAiEAuhogWu9yxczwABaDGAN5nX3C/lLcKoq4VH7UrPzCDBo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50708,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkKx5CRA9TVsSAnZWagAA+yYP/0cT6g8KeFUtEuoCjLBk\nITE/bA/1Dp3o1AQ+PByF3t/TGjWNbB2De2cc+NUw/BF9oWsnAq2yluGYgJca\nlt4OYixvYRGvwFo4+Xx5CO05b/FHrwKxOG1m1TIGsu83FtDGiU8TpMlLXhW7\n2WvCaUNUiXMbDIOjb04qciRWfXdQnTKcZpY9PjkzCMcnZnd4dNeWCQi8jmsi\nLFAoeD+t1votYklMhqWJQuZP25E14lOiSY5uGkWuWkIiLGezF6KUSIQcVKgF\n8ezF4/J9hk/QYVLbUlNdU/VJiTPWH91b0h+LToIdzadDputkzC02Z7K343+d\n/q1UvGudGXWeVxQhoewgA46kh6YR7Vg3m1/9IUlguCQogc73KP4AoL7N6NXS\nnXTbHqeN13B+RM+S7Y58Yzw6K7QE2mlewLsLbX0nSyZ46BVaHbO+d9UDiZ1O\nNRE+WjZJsTp3DlJlt8rCWJZz2DhpNgEDq4Kceb26L19Wq8ShQz2PAh8d+ldj\nKcV+25vrCoyVPiydMAuAlogrKH17sx5ZN+l0LXO4E+rUdvY8947zoprXwxEJ\nugb9B/gWv4StTOMbITomFhTm4F5tYJ6qAaW+BmCe2ARHFNSgMbX4e7b3Csgp\nq+1a5t4c6csLr/xn+2GtZYUmncmCWZ1xLx6HIsv7kBE+v0RUtZXzq/LQBtdP\nRKF8\r\n=KVnL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/src/index.js","name":"@nomiclabs/hardhat-ethers","types":"dist/src/index.d.ts","author":{"name":"Nomic Labs LLC"},"readme":"[![npm](https://img.shields.io/npm/v/@nomiclabs/hardhat-ethers.svg)](https://www.npmjs.com/package/@nomiclabs/hardhat-ethers)\n[![hardhat](https://hardhat.org/hardhat-plugin-badge.svg?1)](https://hardhat.org)\n\n# hardhat-ethers\n\n[Hardhat](https://hardhat.org) plugin for integration with [ethers.js](https://github.com/ethers-io/ethers.js/).\n\n## What\n\nThis plugin brings to Hardhat the Ethereum library `ethers.js`, which allows you to interact with the Ethereum blockchain in a simple way.\n\n## Installation\n\n```bash\nnpm install --save-dev @nomiclabs/hardhat-ethers 'ethers@^5.0.0'\n```\n\nAnd add the following statement to your `hardhat.config.js`:\n\n```js\nusePlugin(\"@nomiclabs/hardhat-ethers\");\n```\n\n## Tasks\n\nThis plugin creates no additional tasks.\n\n## Environment extensions\n\nThis plugins adds an `ethers` object to the Hardhat Runtime Environment.\n\nThis object has the same API than `ethers.js`, with some extra Hardhat-specific\nfunctionality.\n\n### Provider object\n\nA `provider` field is added to `ethers`, which is an `ethers.providers.Provider`\nautomatically connected to the selected network.\n\n### Helpers\n\nThese helpers are added to the `ethers` object:\n\n```typescript\ninterface Libraries {\n  [libraryName: string]: string;\n}\n\ninterface FactoryOptions {\n  signer?: ethers.Signer;\n  libraries?: Libraries;\n}\n\nfunction getContractFactory(name: string): Promise<ethers.ContractFactory>;\n\nfunction getContractFactory(name: string, signer: ethers.Signer): Promise<ethers.ContractFactory>;\n\nfunction getContractFactory(name: string, factoryOptions: FactoryOptions): Promise<ethers.ContractFactory>;\n\n\nfunction getContractAt(nameOrAbi: string | any[], address: string, signer?: ethers.Signer): Promise<ethers.Contract>;\n\nfunction getSigners() => Promise<ethers.Signer[]>;\n```\n\nThe `Contract`s and `ContractFactory`s returned by these helpers are connected to the first signer returned by `getSigners` be default.\n\n## Usage\n\nThere are no additional steps you need to take for this plugin to work.\n\nInstall it and access ethers through the Hardhat Runtime Environment anywhere you need it (tasks, scripts, tests, etc). For example, in your `hardhat.config.js`:\n\n```js\nusePlugin(\"@nomiclabs/hardhat-ethers\");\n\n// task action function receives the Hardhat Runtime Environment as second argument\ntask(\n  \"blockNumber\",\n  \"Prints the current block number\",\n  async (_, { ethers }) => {\n    await ethers.provider.getBlockNumber().then((blockNumber) => {\n      console.log(\"Current block number: \" + blockNumber);\n    });\n  }\n);\n\nmodule.exports = {};\n```\n\nAnd then run `npx hardhat blockNumber` to try it.\n\nRead the documentation on the [Hardhat Runtime Environment](https://hardhat.org/advanced/hardhat-runtime-environment.html) to learn how to access the HRE in different ways to use ethers.js from anywhere the HRE is accessible.\n\n### Library linking\n\nSome contracts need to be linked with libraries before they are deployed. You can pass the addresses of their libraries to the `getContractFactory` function with an object like this:\n\n```js\nconst contractFactory = await this.env.ethers.getContractFactory(\n  \"Example\",\n  {\n    libraries: {\n      ExampleLib: \"0x...\"\n    }\n  }\n);\n```\n\nThis allows you to create a contract factory for the `Example` contract and link its `ExampleLib` library references to the address `\"0x...\"`.\n\nTo create a contract factory, all libraries must be linked. An error will be thrown informing you of any missing library.\n\n## TypeScript support\n\nIf your project uses TypeScript, you need to create a `hardhat-env.d.ts` file like this:\n\n``` typescript\n/// <reference types=\"@nomiclabs/hardhat-ethers\" />\n```\n\nIf you already have this file, just add that line to it.\n\n\nThen you have to include that file in the `files` array of your `tsconfig.json`:\n\n```json\n{\n  ...\n  \"files\": [..., \"hardhat-env.d.ts\"]\n}\n```\n\nusing the relative path from the `tsconfig.json` to your `hardhat-env.d.ts`.\n","license":"MIT","scripts":{"lint":"node ../../node_modules/tslint/bin/tslint --config tslint.json --project ./tsconfig.json","test":"node ../../node_modules/mocha/bin/mocha --recursive \"test/**/*.ts\" --exit","build":"node ../../node_modules/typescript/bin/tsc --build .","clean":"node ../../node_modules/rimraf/bin.js dist","lint:fix":"node ../../node_modules/prettier/bin-prettier.js --write \"src/**/*.{js,ts}\" \"test/**/*.{js,ts}\" && yarn lint --fix"},"_npmUser":{"name":"alcuadrado","email":"email@patriciopalladino.com"},"homepage":"https://github.com/nomiclabs/hardhat/tree/master/packages/hardhat-ethers","keywords":["ethereum","smart-contracts","hardhat","hardhat-plugin","ethers.js"],"repository":{"url":"https://github.com/nomiclabs/hardhat.git","type":"git"},"description":"Hardhat plugin for ethers","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2019 Nomic Labs LLC\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","maintainers":[{"name":"fvictorio","email":"victorio.franco@gmail.com"},{"name":"alcuadrado","email":"email@patriciopalladino.com"},{"name":"fzeoli","email":"franco@nomiclabs.io"}],"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","ethers":"^5.0.0","hardhat":"^2.0.0-rc.1","@types/chai":"^4.2.0","@types/fs-extra":"^5.1.0"},"peerDependencies":{"ethers":"^5.0.0","hardhat":"^2.0.0-rc.1"},"_npmOperationalInternal":{"tmp":"tmp/hardhat-ethers_2.0.0-rc.1_1603316857220_0.6342804392096437","host":"s3://npm-registry-packages"},"_id":"@nomiclabs/hardhat-ethers@2.0.0-rc.1","version":"2.0.0-rc.1"}