Skip to content

Commit

Permalink
Add installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
fvictorio committed Jun 6, 2022
1 parent 575239c commit bbe43b1
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/src/content/chai-matchers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,29 @@

Among other things, you can assert that a contract fired certain events, or that it exhibited a specific revert, or that a transaction resulted in specific changes to a wallet's Ether or token balance.

## Installation


::::tabsgroup{options=npm,yarn}

:::tab{value=npm}

```bash
npm install @nomicfoundation/hardhat-chai-matchers@beta
```

:::

:::tab{value=yarn}

```bash
yarn add @nomicfoundation/hardhat-chai-matchers@beta
```

:::

::::

## How can I use it?

Simply `require("@nomicfoundation/hardhat-chai-matchers")` in your Hardhat config and then the assertions will be available in your code.
Expand Down
58 changes: 58 additions & 0 deletions docs/src/content/network-helpers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,62 @@ Hardhat Network exposes its custom functionality primarily through its JSON-RPC

This package provides convenience functions for quick and easy interaction with Hardhat Network. Facilities include the ability to mine blocks up to a certain timestamp or block number, the ability to manipulate attributes of accounts (balance, code, nonce, storage), the ability to impersonate specific accounts, and the ability to take and restore snapshots.

## Installation

::::tabsgroup{options=npm,yarn}

:::tab{value=npm}

```bash
npm install @nomicfoundation/hardhat-network-helpers@beta
```

:::

:::tab{value=yarn}

```bash
yarn add @nomicfoundation/hardhat-network-helpers@beta
```

:::

::::

## Usage

To use a network helper, simply import it where you want to use it:

::::tabsgroup{options=TypeScript,JavaScript}

:::tab{value=TypeScript}

```ts
import { mine } from "@nomicfoundation/hardhat-network-helpers";
async function main() {
// instantly mine 1000 blocks
await mine(1000);
}
```
:::
:::tab{value=JavaScript}
```js
const { mine } = require("@nomicfoundation/hardhat-network-helpers");
async function main() {
// instantly mine 1000 blocks
await mine(1000);
}
```
:::
::::
Since this is not a Hardhat plugin, you don't need to import it in your config.
For a full listing of all of the helpers provided by this package, see [the reference documentation](/network-helpers/reference).

0 comments on commit bbe43b1

Please sign in to comment.