Nocturnal Prancing Mosquito

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

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

    Install

    npm i @nomicfoundation/hardhat-network-helpers

    DownloadsWeekly Downloads

    20,263

    Version

    1.0.6

    License

    MIT

    Unpacked Size

    107 kB

    Total Files

    184

    Last publish

    Collaborators

    • fvictorio
    • alcuadrado