@nomicfoundation/hardhat-network-helpers
TypeScript icon, indicating that this package has built-in type declarations

1.0.12 • Public • Published

npm

Hardhat Network Helpers

Hardhat Network Helpers is a library that provides a set of utility functions to interact with the Hardhat Network. You can read their full documentation here.

Installation

We recommend using npm 7 or later:

npm install --save-dev @nomicfoundation/hardhat-network-helpers

Usage

Import it and use it in any of your files. For example, this Hardhat script mines some blocks and then prints the block number.

const helpers = require("@nomicfoundation/hardhat-network-helpers");

async function main() {
  // mine 100 blocks
  await helpers.mine(100);

  console.log("The current block number is", await helpers.time.latestBlock());
}

main().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.1244,363latest
3.0.0-next.371next
1.0.0-beta.41beta

Version History

VersionDownloads (Last 7 Days)Published
3.0.0-next.371
3.0.0-next.217
3.0.0-next.119
3.0.0-next.00
1.0.1244,363
1.0.119,269
1.0.1012,222
1.0.918,848
1.0.86,051
1.0.76,387
1.0.61,747
1.0.58
1.0.41,184
1.0.3138
1.0.212
1.0.10
1.0.0126
1.0.0-beta.41
1.0.0-beta.30
0.0.10
1.0.0-beta.20
1.0.0-beta.10
1.0.0-beta.00

Package Sidebar

Install

npm i @nomicfoundation/hardhat-network-helpers

Weekly Downloads

100,463

Version

1.0.12

License

MIT

Unpacked Size

114 kB

Total Files

189

Last publish

Collaborators

  • galargh
  • alcuadrado
  • fvictorio
  • nomic-foundation-publisher
  • kanej
  • schaable
  • zoeytm