Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nomicfoundation/hardhat-network-helpers

Package Overview
Dependencies
Maintainers
2
Versions
19
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

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
63K
decreased by-7.58%
Maintainers
2
Weekly downloads
 
Created
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 07 Jul 2022

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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc