Skip to content

NomicFoundation/hardhat-waffle

Repository files navigation

npm hardhat

hardhat-waffle

Hardhat plugin for integration with Waffle.

What

You can use this plugin to build smart contract tests using Waffle in Hardhat, taking advantage of both.

This plugin adds a Hardhat-ready version of Waffle to the Hardhat Runtime Environment, and automatically initializes the Waffle Chai matchers.

Installation

npm install --save-dev @nomiclabs/hardhat-waffle 'ethereum-waffle@^3.0.0' @nomiclabs/hardhat-ethers 'ethers@^5.0.0' @types/sinon-chai@^3.2.3

And add the following statement to your hardhat.config.js:

require("@nomiclabs/hardhat-waffle");

Or, if you are using TypeScript, add this to your hardhat.config.ts:

import "@nomiclabs/hardhat-waffle";

Tasks