Socket
Socket
Sign inDemoInstall

hardhat-gas-reporter

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hardhat-gas-reporter - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

4

dist/lib/render/markdown.js

@@ -37,2 +37,3 @@ "use strict";

let l2gwei;
let l1GweiBlobBaseFee;
const { network, currency, nonZeroMsg, intrinsicMsg } = (0, ui_1.getCommonTableVals)(options);

@@ -46,2 +47,3 @@ let tokenPrice = "-";

l2gwei,
l1GweiBlobBaseFee,
rate,

@@ -58,3 +60,3 @@ token

[`L1 Base Fee`, `${options.baseFee} gwei`],
[`L1 Blob Base Fee`, `${options.blobBaseFee} gwei`],
[`L1 Blob Base Fee`, `${l1GweiBlobBaseFee} gwei`],
[`L2 Gas Price`, `${l2gwei} gwei`]

@@ -61,0 +63,0 @@ ]

@@ -238,3 +238,3 @@ "use strict";

if (options.tokenPrice && options.gasPrice) {
const { l1gwei, l2gwei, l1gweiNote, l2gweiNote, network, rate, currency, token } = (0, ui_1.getCommonTableVals)(options);
const { l1gwei, l2gwei, l1gweiNote, l2gweiNote, l1GweiBlobBaseFee, network, rate, currency, token } = (0, ui_1.getCommonTableVals)(options);
networkConfig.push({

@@ -270,3 +270,3 @@ hAlign: "left",

colSpan: 2,
content: chalk_1.default.cyan(`L1: ${options.blobBaseFee} gwei (blobBaseFee)`)
content: chalk_1.default.cyan(`L1: ${l1GweiBlobBaseFee} gwei (blobBaseFee)`)
});

@@ -273,0 +273,0 @@ opStackConfig.push({

@@ -115,5 +115,6 @@ "use strict";

try {
const blobBaseFee = await axiosInstance.get(blobBaseFeeUrl);
checkForEtherscanError(blobBaseFee.data.result);
options.blobBaseFee = Math.round((0, gas_1.hexWeiToIntGwei)(blobBaseFee.data.result));
const response = await axiosInstance.get(blobBaseFeeUrl);
checkForEtherscanError(response.data.result);
const blobBaseFee = (0, gas_1.hexWeiToIntGwei)(response.data.result);
options.blobBaseFee = (blobBaseFee >= 1) ? Math.round(blobBaseFee) : blobBaseFee;
}

@@ -120,0 +121,0 @@ catch (error) {

@@ -51,2 +51,3 @@ import { GasReporterOptions } from "../types";

l2gweiNote: string;
l1GweiBlobBaseFee: string | number;
network: string;

@@ -53,0 +54,0 @@ rate: string;

@@ -143,2 +143,3 @@ "use strict";

let l1GweiForL2 = options.baseFee;
let l1GweiBlobBaseFee = options.blobBaseFee;
if (options.L2 === "arbitrum") {

@@ -170,2 +171,5 @@ l2BaseFeeNote = "(baseFeePerByte)";

}
if (typeof l1GweiBlobBaseFee === "number" && l1GweiBlobBaseFee < 1) {
l1GweiBlobBaseFee = parseFloat(l1GweiBlobBaseFee.toString()).toFixed(constants_1.DEFAULT_GAS_PRICE_PRECISION);
}
const nonZeroMsg = "Cost was non-zero but below the precision setting for the currency display (see options)";

@@ -178,2 +182,3 @@ const intrinsicMsg = "Execution gas for this method does not include intrinsic gas overhead ";

l2gweiNote,
l1GweiBlobBaseFee,
network,

@@ -180,0 +185,0 @@ rate,

{
"name": "hardhat-gas-reporter",
"version": "2.1.0",
"version": "2.1.1",
"description": "Gas Analytics plugin for Hardhat",

@@ -5,0 +5,0 @@ "repository": "github:cgewecke/hardhat-gas-reporter",

@@ -54,2 +54,3 @@ import { EOL } from "os";

let l2gwei: string | number | undefined;
let l1GweiBlobBaseFee: string | number | undefined;
const { network, currency, nonZeroMsg, intrinsicMsg } = getCommonTableVals(options);

@@ -64,2 +65,3 @@ let tokenPrice = "-";

l2gwei,
l1GweiBlobBaseFee,
rate,

@@ -77,3 +79,3 @@ token

[`L1 Base Fee`, `${options.baseFee!} gwei`],
[`L1 Blob Base Fee`, `${options.blobBaseFee!} gwei`],
[`L1 Blob Base Fee`, `${l1GweiBlobBaseFee!} gwei`],
[`L2 Gas Price`, `${l2gwei} gwei` ]

@@ -80,0 +82,0 @@ ]

@@ -291,2 +291,3 @@ import chalk, {Chalk} from "chalk";

l2gweiNote,
l1GweiBlobBaseFee,
network,

@@ -331,3 +332,3 @@ rate,

colSpan: 2,
content: chalk.cyan(`L1: ${options.blobBaseFee!} gwei (blobBaseFee)`)
content: chalk.cyan(`L1: ${l1GweiBlobBaseFee!} gwei (blobBaseFee)`)
});

@@ -334,0 +335,0 @@ opStackConfig.push({

@@ -132,5 +132,6 @@ import axios from "axios";

try {
const blobBaseFee = await axiosInstance.get(blobBaseFeeUrl);
checkForEtherscanError(blobBaseFee.data.result);
options.blobBaseFee = Math.round(hexWeiToIntGwei(blobBaseFee.data.result))
const response = await axiosInstance.get(blobBaseFeeUrl);
checkForEtherscanError(response.data.result);
const blobBaseFee = hexWeiToIntGwei(response.data.result);
options.blobBaseFee = (blobBaseFee >= 1 ) ? Math.round(blobBaseFee) : blobBaseFee;
} catch (error) {

@@ -137,0 +138,0 @@ options.blobBaseFee = DEFAULT_BLOB_BASE_FEE;

@@ -214,2 +214,3 @@ import chalk from "chalk";

let l1GweiForL2 = options.baseFee;
let l1GweiBlobBaseFee: string | number | undefined = options.blobBaseFee;

@@ -249,2 +250,6 @@ if (options.L2 === "arbitrum"){

if (typeof l1GweiBlobBaseFee === "number" && l1GweiBlobBaseFee < 1) {
l1GweiBlobBaseFee = parseFloat(l1GweiBlobBaseFee.toString()).toFixed(DEFAULT_GAS_PRICE_PRECISION);
}
const nonZeroMsg = "Cost was non-zero but below the precision setting for the currency display (see options)";

@@ -258,2 +263,3 @@ const intrinsicMsg = "Execution gas for this method does not include intrinsic gas overhead ";

l2gweiNote,
l1GweiBlobBaseFee,
network,

@@ -260,0 +266,0 @@ rate,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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