Socket
Socket
Sign inDemoInstall

hardhat-storage-layout

Package Overview
Dependencies
3
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.5 to 0.1.6

28

dist/storageLayout.js

@@ -31,3 +31,8 @@ "use strict";

const artifactJsonABI = JSON.parse(artifact.toString());
if (!artifactJsonABI.output.contracts[sourceName][contractName]) {
try {
if (!artifactJsonABI.output.contracts[sourceName][contractName]) {
continue;
}
}
catch (e) {
continue;

@@ -37,5 +42,2 @@ }

for (const stateVariable of artifactJsonABI.output.contracts[sourceName][contractName].storageLayout.storage) {
// if (!stateVariable.length) {
// continue;
// }
contract.stateVariables.push({

@@ -49,20 +51,2 @@ name: stateVariable.label,

data.contracts.push(contract);
// logger(
// artifactJsonABI.output.contracts[sourceName][contractName]
// .storageLayout.storage
// );
/**
* Example
* data = [
* { name: contractName,
* stateVariables: [
* {
* name: stateVariable
* slot: 0,
* offset" 0,
* type: t_mapping(t_address,t_uint256)'
* }
* ]
* ]
*/
// TODO: export the storage layout to the ./storageLayout/output.md

@@ -69,0 +53,0 @@ }

{
"name": "hardhat-storage-layout",
"version": "0.1.5",
"version": "0.1.6",
"description": "Hardhat plugin for exporting the contract storage layout",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -40,3 +40,7 @@ import fs from "fs";

const artifactJsonABI = JSON.parse(artifact.toString());
if (!artifactJsonABI.output.contracts[sourceName][contractName]) {
try {
if (!artifactJsonABI.output.contracts[sourceName][contractName]) {
continue;
}
} catch (e) {
continue;

@@ -49,6 +53,2 @@ }

][contractName].storageLayout.storage) {
// if (!stateVariable.length) {
// continue;
// }
contract.stateVariables.push({

@@ -62,23 +62,2 @@ name: stateVariable.label,

data.contracts.push(contract);
// logger(
// artifactJsonABI.output.contracts[sourceName][contractName]
// .storageLayout.storage
// );
/**
* Example
* data = [
* { name: contractName,
* stateVariables: [
* {
* name: stateVariable
* slot: 0,
* offset" 0,
* type: t_mapping(t_address,t_uint256)'
* }
* ]
* ]
*/
// TODO: export the storage layout to the ./storageLayout/output.md

@@ -85,0 +64,0 @@ }

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc