You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@nomicfoundation/hardhat-network-helpers

Package Overview
Dependencies
Maintainers
5
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nomicfoundation/hardhat-network-helpers

Hardhat utils for testing


Version published
Weekly downloads
60K
decreased by-9.24%
Maintainers
5
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

Package last updated on 03 Jun 2024

Did you know?

Socket

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
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc