Socket
Socket
Sign inDemoInstall

@nomicfoundation/hardhat-network-helpers

Package Overview
Dependencies
278
Maintainers
3
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @nomicfoundation/hardhat-network-helpers

Hardhat utils for testing


Version published
Weekly downloads
55K
decreased by-13.05%
Maintainers
3
Install size
7.69 MB
Created
Weekly downloads
 

Readme

Source

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;
});

Keywords

FAQs

Last updated on 05 Dec 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc