You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
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

to
2.1.0

6

index.d.ts

@@ -7,4 +7,5 @@ import 'hardhat/types/config';

alphaSort?: boolean,
disambiguatePaths?: boolean,
runOnCompile?: boolean,
disambiguatePaths: boolean,
strict?: boolean,
}

@@ -16,6 +17,7 @@ }

alphaSort: boolean,
disambiguatePaths: boolean,
runOnCompile: boolean,
disambiguatePaths: boolean,
strict: boolean
}
}
}

@@ -5,2 +5,4 @@ const { extendConfig } = require('hardhat/config');

const { HardhatPluginError } = require('hardhat/plugins');
const {

@@ -14,4 +16,5 @@ TASK_COMPILE,

alphaSort: false,
disambiguatePaths: false,
runOnCompile: false,
disambiguatePaths: false,
strict: false,
},

@@ -95,5 +98,12 @@ userConfig.contractSizer

if (largeContracts) {
if (largeContracts > 0) {
console.log();
console.log(colors.red(`Warning: ${ largeContracts } contracts exceed the size limit for mainnet deployment.`));
const message = `Warning: ${ largeContracts } contracts exceed the size limit for mainnet deployment.`;
if (hre.config.contractSizer.strict) {
throw new HardhatPluginError(message);
} else {
console.log(colors.red(message));
}
}

@@ -100,0 +110,0 @@ });

{
"name": "hardhat-contract-sizer",
"version": "2.0.3",
"version": "2.1.0",
"license": "MIT",

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

@@ -28,2 +28,3 @@ # Hardhat Contract Sizer

| `disambiguatePaths` | whether to output the full path to the compilation artifact (relative to the Hardhat root directory) | `false` |
| `strict` | whether to throw an error if any contracts exceed the size limit | `false` |

@@ -33,4 +34,5 @@ ```javascript

alphaSort: true,
disambiguatePaths: false,
runOnCompile: true,
disambiguatePaths: false,
strict: true,
}

@@ -37,0 +39,0 @@ ```