{"_id":"@dzejkop/hardhat-waffle","_rev":"1-213eaf216f656a0d4d536fd4cc34a00a","name":"@dzejkop/hardhat-waffle","dist-tags":{"latest":"2.0.1"},"versions":{"2.0.1":{"name":"@dzejkop/hardhat-waffle","version":"2.0.1","description":"Hardhat plugin to test smart contracts with Waffle","homepage":"https://github.com/nomiclabs/hardhat/tree/master/packages/hardhat-waffle","repository":{"type":"git","url":"https://github.com/Dzejkop/hardhat.git"},"author":{"name":"Nomic Labs LLC"},"license":"MIT","main":"dist/src/index.js","types":"dist/src/index.d.ts","keywords":["ethereum","smart-contracts","hardhat","hardhat-plugin","ethers.js"],"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"},"devDependencies":{"@nomiclabs/hardhat-ethers":"^2.0.0","@types/chai":"^4.2.0","@types/fs-extra":"^5.1.0","@types/mocha":"^9.0.0","@types/node":"^12.0.0","@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","ethereum-waffle":"^3.2.0","ethers":"^5.0.0","hardhat":"^2.0.0","mocha":"^7.2.0","prettier":"2.4.1","rimraf":"^3.0.2","ts-node":"^8.1.0","typescript":"~4.5.2"},"peerDependencies":{"@nomiclabs/hardhat-ethers":"^2.0.0","ethers":"^5.0.0","ethereum-waffle":"^3.2.0","hardhat":"^2.0.0"},"dependencies":{"@types/web3":"1.0.19","@types/sinon-chai":"^3.2.3"},"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","_id":"@dzejkop/hardhat-waffle@2.0.1","dist":{"shasum":"c6968d9b9526dc3c0ae1b40f918526683d3e6f66","integrity":"sha512-FnCQLE0WXo1Dofh78t0L9/k5cuSFgmIYB2JWNmcJNKU9P5jCv1fEyW8mnGJ5YvasQhhCOqFGAD01ElPWMx03og==","tarball":"https://registry.npmjs.org/@dzejkop/hardhat-waffle/-/hardhat-waffle-2.0.1.tgz","fileCount":47,"unpackedSize":38566,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4Un3CRA9TVsSAnZWagAAXU0QAItmUIkAZTn8/hKn2rhY\nS4vH+EwDzHm9q5lz9e/lXkNuz2joNMtnE5tkVa7hpWg/0tr2dyiF8JmUlwsj\nrI1Azso3JsoK+GLWcJWQ8pzvZu9jJ6gcaxa80pCSTEvrCsiCNBd+TMg9aX2g\nApH4WASfFtUMTTjgACbMVTv4Q6NwA+2Qbz393RYw+6r8tV4246VMvjoSC0uM\nyp/jBxKmjHyxHiP0+iBXppWz+wK+e8dJWb99eoyGrVdBWCt7cymjkeYj7IIU\ndFbn6bkcjayrWUKUJu0nRdHnaVNhKIjPoUfmzkviA03DAIx2PkESCBBgJmeN\n2IcWZ0JgxHjUoJgtZ4q2fUbKtKsX2LYkB9CuX3VzD/IrLEWMwEzdx37/Ku/V\nG94jiKpxP+hZqs7TMjcJNtyQgXezcxKm8SxkMjnahpoI17OnbWXcuo1gr0Jl\nVmyu0tEFaIQAMk9ACVa8ycndrXDqLxhb0LG8MiDBa6w8GJ1gaHJPdk1sP7+a\nIUd7+RjA+Ep/AxKXiRU5u2xOdMuCgY9LAlm3MPifekzOZY9UD0HxFwMajsON\n4Lj3xCK1b0hBY3doxE5/hjX8WiXbTh5V8GokDRhKrGUUTqqaI4W/WDUx9tg0\nYRcA4D8Cf4z5pXafBRUioHF4kpwtgtT2sYtzNJ0ZgNRpvWInw7GcqumMXfen\nSesD\r\n=p6Pp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBtplG1Qll4jA6sYsZuHoF1H3tw6XYG3ccmbBM2VQk9/AiEAvpW140I8uq4Sd+HxmgfaQ0VPVcCIFgTBO8W+kDQGXPY="}]},"_npmUser":{"name":"dzejkop","email":"jakubtrad@gmail.com"},"directories":{},"maintainers":[{"name":"dzejkop","email":"jakubtrad@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hardhat-waffle_2.0.1_1642154486934_0.8122905319400695"},"_hasShrinkwrap":false}},"time":{"created":"2022-01-14T10:01:26.857Z","2.0.1":"2022-01-14T10:01:27.087Z","modified":"2022-04-05T06:19:36.633Z"},"maintainers":[{"name":"dzejkop","email":"jakubtrad@gmail.com"}],"description":"Hardhat plugin to test smart contracts with Waffle","homepage":"https://github.com/nomiclabs/hardhat/tree/master/packages/hardhat-waffle","keywords":["ethereum","smart-contracts","hardhat","hardhat-plugin","ethers.js"],"repository":{"type":"git","url":"https://github.com/Dzejkop/hardhat.git"},"author":{"name":"Nomic Labs LLC"},"license":"MIT","readme":"[![npm](https://img.shields.io/npm/v/@nomiclabs/hardhat-waffle.svg)](https://www.npmjs.com/package/@nomiclabs/hardhat-waffle) [![hardhat](https://hardhat.org/buidler-plugin-badge.svg?1)](https://hardhat.org)\n\n# hardhat-waffle\n\n[Hardhat](https://hardhat.org) plugin for integration with [Waffle](https://getwaffle.io/).\n\n## What\n\nYou can use this plugin to build smart contract tests using Waffle in Hardhat, taking advantage of both.\n\nThis plugin adds a Hardhat-ready version of Waffle to the Hardhat Runtime Environment, and automatically initializes the [Waffle Chai matchers](https://ethereum-waffle.readthedocs.io/en/latest/matchers.html).\n\n## Installation\n\n```bash\nnpm install --save-dev @nomiclabs/hardhat-waffle 'ethereum-waffle@^3.0.0' @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-waffle\");\n```\n\nOr, if you are using TypeScript, add this to your `hardhat.config.ts`:\n\n```js\nimport \"@nomiclabs/hardhat-waffle\";\n```\n\n## Tasks\n\nThis plugin creates no additional tasks.\n\n## Environment extensions\n\nThis plugin adds a `waffle` object to the Hardhat Runtime Environment. This object has all the Waffle functionality, already adapted to work with Hardhat.\n\nThe `waffle` object has these properties:\n\n- `provider`\n- `deployContract`\n- `solidity`\n- `link`\n- `deployMockContract`\n- `createFixtureLoader`\n- `loadFixture`\n\nThis plugin depends on [`@nomiclabs/hardhat-ethers`](https://github.com/nomiclabs/hardhat/tree/master/packages/hardhat-ethers), so it also injects an `ethers` object into the HRE, which is documented [here](https://github.com/nomiclabs/hardhat/tree/master/packages/hardhat-ethers#environment-extensions).\n\n## Usage\n\nOnce installed, you can build your tests almost like in Waffle.\n\nInstead of importing things from `ethereum-waffle`, you access them from the `waffle` property of the Hardhat Runtime Environment.\n\nFor example, instead of doing\n\n```js\nconst { deployContract } = require(\"ethereum-waffle\");\n```\n\nyou should do\n\n```typescript\nconst { waffle } = require(\"hardhat\");\nconst { deployContract } = waffle;\n```\n\nAlso, you don't need to call `chai.use` in order to use [Waffle's Chai matchers](https://ethereum-waffle.readthedocs.io/en/latest/matchers.html).\n\nNote that by default, Hardhat saves its compilation output into `artifacts/` instead of `build/`. You can either use that directory in your tests, or [customize your Hardhat config](https://hardhat.org/config/#path-configuration).\n","readmeFilename":"README.md"}