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

hardhat-contract-sizer

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hardhat-contract-sizer - npm Package Compare versions

Comparing version 2.5.1 to 2.6.1

2

package.json
{
"name": "hardhat-contract-sizer",
"version": "2.5.1",
"version": "2.6.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Output Solidity contract sizes with Hardhat",

@@ -13,3 +13,3 @@ const fs = require('fs');

const formatSize = function (size) {
return (size / 1000).toFixed(3);
return (size / 1024).toFixed(3);
};

@@ -74,3 +74,3 @@

const table = new Table({
head: [chalk.bold('Contract Name'), chalk.bold('Size (KB)'), chalk.bold('Change (KB)')],
head: [chalk.bold('Contract Name'), chalk.bold('Size (KiB)'), chalk.bold('Change (KiB)')],
style: { head: [], border: [], 'padding-left': 2, 'padding-right': 2 },

@@ -111,11 +111,10 @@ chars: {

let diff = '';
let diff;
if (item.size < item.previousSize) {
diff = chalk.green(`-${ formatSize(item.previousSize - item.size) }`);
} else if (item.size > item.previousSize) {
diff = chalk.red(`+${ formatSize(item.size - item.previousSize) }`);
} else {
diff = '';
if (item.previousSize) {
if (item.size < item.previousSize) {
diff = chalk.green(`-${ formatSize(item.previousSize - item.size) }`);
} else if (item.size > item.previousSize) {
diff = chalk.red(`+${ formatSize(item.size - item.previousSize) }`);
}
}

@@ -122,0 +121,0 @@

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