cgewecke / eth-gas-reporter

Gas usage per unit test. Average gas usage per method. A mocha reporter.
MIT License
603 stars 94 forks source link

Change Int to Float for gas gwei representation #283

Closed tempest-sol closed 7 months ago

tempest-sol commented 2 years ago

https://github.com/cgewecke/eth-gas-reporter/blob/27ba98a23b6fc4d4deaebed7aff6e284791781c9/lib/codechecksReport.js#L41

Arbitrum L2 gas is currently under 1, at 0.38, by default this parses as integer 0 (rounding down), thus making the gas reported show nothing as the cost.

Suggestion: Change parseInt to parseFloat to allow these scenarios.

giacomo-cc commented 1 year ago

+1 on this

cgewecke commented 7 months ago

Hi! eth-gas-reporter is being deprecated in favor of hardhat-gas-reporter.

In the latest version at Hardhat, sub-gwei gas prices are fully supported:

https://github.com/cgewecke/hardhat-gas-reporter/releases/tag/v2.0.0