Socket
Socket
Sign inDemoInstall

buidler-gas-reporter

Package Overview
Dependencies
540
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    buidler-gas-reporter

Buidler plugin for eth-gas-reporter, a mocha reporter for Ethereum test suites


Version published
Weekly downloads
116
increased by118.87%
Maintainers
1
Install size
29.0 MB
Created
Weekly downloads
 

Readme

Source

npm version Build Status

buidler-gas-reporter

eth-gas-reporter plugin for buidler. :fuelpump:

What

A Mocha reporter for Ethereum test suites:

  • Gas usage per unit test.
  • Metrics for method calls and deployments.
  • National currency costs of deploying and using your contract system.
  • CI integration with codechecksbeta

Example report

Screen Shot 2019-06-23 at 2 10 19 PM

Installation

npm install buidler-gas-reporter --save-dev

And add the following to your buidler.config.js:

usePlugin("buidler-gas-reporter");

Configuration

Configuration is optional.

module.exports = {
  gasReporter: {
    currency: 'CHF',
    gasPrice: 21
  }
}

:bulb: Pro Tip

The options include an enabled key that lets you toggle gas reporting on and off using shell environment variables. When enabled is false, mocha's (faster) default spec reporter is used. Example:

module.exports = {
  gasReporter: {
    enabled: (process.env.REPORT_GAS) ? true : false
  }
}

Usage

This plugin overrides the built-in test task. Gas reports are generated by default with:

npx buidler test

Options / Documentation

A list of options and other useful documentation can be found at eth-gas-reporter

Keywords

FAQs

Last updated on 14 Oct 2020

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