{"bugs":{"url":"https://github.com/nomiclabs/hardhat/issues"},"dist":{"shasum":"416aa683860203e24cfa4cd71f0bd2cff84ccc4e","tarball":"https://registry.npmjs.org/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.0.2-rc.1.tgz","fileCount":49,"integrity":"sha512-J+fsKjF6fKSn+hzH2CRJodgmwrlOJGGO9Q3tDRdwnXgBeR5QdICtlQbV+InksNJaoeDdW9cmuigHhgfpT8BNvw==","signatures":[{"sig":"MEUCIQDGl2IxuLHwJJDAmsV8PPy0nPI0UGTmF//gfA3Bt1r2BgIgVu3n2I1zjSQOCl/zoqlPDuO8nimhetrKt1wYweMYziM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66762,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGqCQCRA9TVsSAnZWagAAjOAP/1JYlKmle9Nw1iwoor1F\npzvdUSqjM+zZukkSPtn+wKOAUK976i4aCOhFGAbIoO9dcryEKBLKeQCMqI6l\nGS1nsne4w6OLNDUfKwtry0ub4UXKACJ+WnIHe+RzVdMuGS+jwFsPQiIjccmY\npfywuTnKSzU6V8DQaOFIj19uBV6UcVFe5OvCqoAmuQzQPzS3dwBNFXUoyIbB\nn2Cj9XacdCeX9UwXbjI8+v8O5YTS3ox24LYDq5BWtyfw9enMVdBlpgOtyBPf\n3HAm6T8ft/pHpo+8wRyedXPNRVxg8vmFW72FO1A3EnozeuvzWSeMN2eRfjzM\ndQDny+9aNzFYN+jPGA7Y4tWbknh3VdCiNqKSaP2QO7QDiYRWXrTJkUPn+wKP\nGHhFddo/Zbr1coS2LU2zVUcAikwqQiStMhHnOZCo4Vefv59wiLN1uMiEFRW3\neftkHyr3vcbuokdGmOJ0uLKQ7IzHILbLpKKnnmKXoPq9LMtbas3jwea0rMJ4\nHQ5ZFaDNG6fFJjAThj9aUlQEGU1fWrsTsIgN7hwXkltF6aEA1wqCINPc8wbG\n71Y2UAzlJ9gqbYeHVTp+2gJ+5PEe4r7zFCz7nXD6zZ+iPKoAmB4O8jxvLR2I\nRa3vreYpnOFBwcxVqhJ0Ic1yJboBFwCXRUNr9Js6oMBjlwUJDegbIWb93S8Q\nB1zg\r\n=WuPZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"internal/index.js","name":"@nomiclabs/hardhat-ethers","types":"internal/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/buidler-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\nrequire(\"@nomiclabs/hardhat-ethers\");\n```\n\nOr, if you are using TypeScript, add this to your `hardhat.config.ts`:\n\n```js\nimport \"@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\nfunction getSigner(address: string) => Promise<ethers.Signer>;\n```\n\nThe `Contract`s and `ContractFactory`s returned by these helpers are connected to the first signer returned by `getSigners` by default.\n\nIf there is no signer available, `getContractAt` returns read-only contracts.\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\nrequire(\"@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","license":"MIT","scripts":{"lint":"yarn lint-src && yarn lint-tests","test":"node ../../node_modules/mocha/bin/mocha --recursive \"test/**/*.ts\" --exit","build":"node ../../node_modules/typescript/bin/tsc --build src","clean":"node ../../node_modules/rimraf/bin.js dist internal types *.{d.ts,js}{,.map} build-test tsconfig.tsbuildinfo","lint-src":"node -r ts-node/register/transpile-only ../../node_modules/tslint/bin/tslint --config tslint.json --project ./src/tsconfig.json","lint:fix":"node ../../node_modules/prettier/bin-prettier.js --write \"src/**/*.{js,ts}\" \"test/**/*.{js,ts}\" && yarn lint --fix","build-test":"node ../../node_modules/typescript/bin/tsc --build .","lint-tests":"node -r ts-node/register/transpile-only ../../node_modules/tslint/bin/tslint --config tslint.json --project ./tsconfig.json"},"_npmUser":{"name":"fvictorio","email":"victorio.franco@gmail.com"},"homepage":"https://github.com/nomiclabs/hardhat/tree/master/packages/hardhat-ethers","keywords":["ethereum","smart-contracts","hardhat","hardhat-plugin","ethers.js"],"repository":{"url":"git+https://github.com/nomiclabs/hardhat.git","type":"git"},"_npmVersion":"6.14.8","description":"Hardhat plugin for ethers","directories":{},"maintainers":[{"name":"fzeoli","email":"franco@nomiclabs.io"},{"name":"alcuadrado","email":"email@patriciopalladino.com"},{"name":"fvictorio","email":"victorio.franco@gmail.com"}],"_nodeVersion":"10.23.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","ethers":"^5.0.0","hardhat":"^2.0.0","@types/chai":"^4.2.0"},"peerDependencies":{"ethers":"^5.0.0","hardhat":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/hardhat-ethers_2.0.2-rc.1_1612357775631_0.29136841489098586","host":"s3://npm-registry-packages"},"_id":"@nomiclabs/hardhat-ethers@2.0.2-rc.1","version":"2.0.2-rc.1"}