{"bugs":{"url":"https://github.com/nomiclabs/hardhat/issues"},"dist":{"shasum":"0ab529b9977e8354dd8e29d750f9cb5109948d5e","tarball":"https://registry.npmjs.org/@nomiclabs/hardhat-ethers/-/hardhat-ethers-3.0.0-beta.0.tgz","fileCount":57,"integrity":"sha512-oV0PZ+UPFiLjV2wVKxYP/OXCJhcqGMTvoVQG2di4EE/2pqgEGDGXdPNfDiRemv6UfK8aGvtvsmU+hM+OrPR7fQ==","signatures":[{"sig":"MEUCIE4xiROmBohGggY93c1EKfIdAtRNv9HaQJYM+HGDlpugAiEAqgb7IewWQ0UnnVdg4VgYfzy5QNNRFmAnVqUfsLtRu4U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":190975,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkKvouACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoF5xAAk0iyYgDMmYSCWTr55dnkMO5Xvz5/V+g6H/bZ35wkJA6s4SU0\r\nJC+7JVOqaurj+j7qIQf60Pi1I6x22rIQkB0eHxAj9A04gUGW3qQIWmaZAIUF\r\nzhEdoUh9WknHOvMkQXeoNxAI8LPeQA7ZbFfLRlNM67K2oAWur7/y5CrWfhqh\r\nORzPk8KWAv+Uyj3fsoGWOmmKJWLUyzlQMhx3o9rPjkI5eLSrhiuXUR2mQV4+\r\npGmi4847aqsrmUCt0aElNr7hsPsOsUEhiTj/Ggrqc2m2lEVXKEwatV6PbKL2\r\nYRJT6Ce4gv+392vEAFVrDsOc5jZ58QLNQ2UZcvv934XiCQlYGny/81wfVBgr\r\npVbdFY194yIjwsmzdmicEwGh7eNpAhDIDbr97aS6s3R2ewCLfBY2oHUek7ze\r\nLgcNPVwGCjIbVmhfQf+2sDbz+JZw5Vok3PrH2/tfn/UnFOqi3cdhRGsntQkw\r\nnmS9Cm40NZKoW2yE/yfpMpcwEzRbnakyNJH6bj/X82KNKH+HpEh6FmfNGHxJ\r\nFjCEBT3NGIKlVZdL5WYm+neNx6am1bGP4935+ASuJ3anTU/nwXKhFXGrvH1n\r\nub9XDogdiSecoSO1wvQj5zAXuzmqj1xgqf/zkHSIgAxEkLmZxZXzkAsiP+t0\r\n8eiCfX0aD0rD3VE57vs6dqFFCKCnum2v45s=\r\n=T8aq\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) [![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](https://docs.ethers.io/v5/single-page/) as `ethers.js`, with some extra Hardhat-specific functionality.\n\n### Provider object\n\nA `provider` field is added to `ethers`, which is an [`ethers.providers.Provider`](https://docs.ethers.io/v5/single-page/#/v5/api/providers/provider/) automatically 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 deployContract(name: string, constructorArgs?: any[], signer?: ethers.Signer): Promise<ethers.Contract>;\n\nfunction getContractFactory(name: string, signer?: ethers.Signer): Promise<ethers.ContractFactory>;\n\nfunction getContractFactory(name: string, factoryOptions: FactoryOptions): Promise<ethers.ContractFactory>;\n\nfunction getContractFactory(abi: any[], bytecode: ethers.utils.BytesLike, signer?: ethers.Signer): Promise<ethers.ContractFactory>;\n\nfunction getContractAt(name: string, address: string, signer?: ethers.Signer): Promise<ethers.Contract>;\n\nfunction getContractAt(abi: any[], address: string, signer?: ethers.Signer): Promise<ethers.Contract>;\n\nfunction getSigners() => Promise<ethers.Signer[]>;\n\nfunction getSigner(address: string) => Promise<ethers.Signer>;\n\nfunction getImpersonatedSigner(address: string) => Promise<ethers.Signer>;\n\nfunction getContractFactoryFromArtifact(artifact: Artifact, signer?: ethers.Signer): Promise<ethers.ContractFactory>;\n\nfunction getContractFactoryFromArtifact(artifact: Artifact, factoryOptions: FactoryOptions): Promise<ethers.ContractFactory>;\n\nfunction getContractAtFromArtifact(artifact: Artifact, address: string, signer?: ethers.Signer): Promise<ethers.Contract>;\n```\n\nThe [`Contract`s](https://docs.ethers.io/v5/single-page/#/v5/api/contract/contract/) and [`ContractFactory`s](https://docs.ethers.io/v5/single-page/#/v5/api/contract/contract-factory/) returned by these helpers are connected to the first [signer](https://docs.ethers.io/v5/single-page/#/v5/api/signer/) returned by `getSigners` by default.\n\nIf there is no signer available, `getContractAt` returns [read-only](https://docs.ethers.io/v5/single-page/#/v5/api/contract/contract/-%23-Contract--readonly) 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/hardhat-runner/docs/advanced/hardhat-runtime-environment) 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(\"Example\", {\n  libraries: {\n    ExampleLib: \"0x...\",\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## Troubleshooting\n\n### Events are not being emitted\n\nEthers.js polls the network to check if some event was emitted (except when a `WebSocketProvider` is used; see below). This polling is done every 4 seconds. If you have a script or test that is not emitting an event, it's likely that the execution is finishing before the event is detected by the polling mechanism.\n\nIf you are connecting to a Hardhat node using a `WebSocketProvider`, events should be emitted immediately. But keep in mind that you'll have to create this provider manually, since Hardhat only supports configuring networks via http. That is, you can't add a `localhost` network with a URL like `ws://127.0.0.1:8545`.\n\n### Gas transaction parameters in `hardhat.config` are not used\n\nWhen using this plugin, the `gas`, `gasPrice` and `gasMultiplier` parameters from your `hardhat.config` are not automatically applied to transactions. In order to provide such values to your transactions, specify them as [overrides](https://docs.ethers.io/v5/single-page/#/v5/api/contract/contract/-%23-contract-functionsSend) on the transaction itself.\n","gitHead":"03bb3d81decb0dbcad95dd5efbed218f76d73922","license":"MIT","scripts":{"lint":"yarn prettier --check && yarn eslint","test":"mocha --recursive \"test/**/*.ts\" --exit","build":"tsc --build .","clean":"rimraf dist internal types *.{d.ts,js}{,.map} build-test tsconfig.tsbuildinfo","eslint":"eslint 'src/**/*.ts' 'test/**/*.ts'","lint:fix":"yarn prettier --write && yarn eslint --fix","prettier":"prettier \"**/*.{js,md,json}\"","prepublishOnly":"yarn build"},"_npmUser":{"name":"fvictorio","email":"victorio.franco@gmail.com"},"homepage":"https://github.com/nomiclabs/hardhat/tree/main/packages/hardhat-ethers","keywords":["ethereum","smart-contracts","hardhat","hardhat-plugin","ethers.js"],"repository":{"url":"git+https://github.com/nomiclabs/hardhat.git","type":"git"},"_npmVersion":"9.5.0","description":"Hardhat plugin for ethers","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":"18.15.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","mocha":"^10.0.0","eslint":"^7.29.0","ethers":"^6.1.0","rimraf":"^3.0.2","hardhat":"^2.0.0","ts-node":"^10.8.0","prettier":"2.4.1","typescript":"~4.7.4","@types/chai":"^4.2.0","@types/node":"^14.0.0","@types/mocha":">=9.1.0","chai-as-promised":"^7.1.1","eslint-plugin-import":"2.24.1","eslint-config-prettier":"8.3.0","eslint-plugin-prettier":"3.4.0","@types/chai-as-promised":"^7.1.3","@typescript-eslint/parser":"4.29.2","eslint-plugin-no-only-tests":"3.0.0","@typescript-eslint/eslint-plugin":"^5.30.7"},"peerDependencies":{"ethers":"^6.1.0","hardhat":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/hardhat-ethers_3.0.0-beta.0_1680538158627_0.24010360763284644","host":"s3://npm-registry-packages"},"_id":"@nomiclabs/hardhat-ethers@3.0.0-beta.0","version":"3.0.0-beta.0"}