Socket
Socket
Sign inDemoInstall

hardhat-storage-layout

Package Overview
Dependencies
265
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    hardhat-storage-layout

Hardhat plugin for exporting the contract storage layout


Version published
Maintainers
1
Created

Readme

Source

hardhat-storage-layout

Generate Ethereum smart contract storage layout with Hardhat.

Installation

yarn add --dev hardhat-storage-layout

Configuration

In order to use this Hardhat plugin, you should update the solidity compiler configurations in hardhat.congig.js as follows:

module.exports = {
  solidity: {
    version: '0.8.3',
    settings: {
        optimizer: {
            enabled: true,
            runs: 1000,
        },
        outputSelection: {
            "*": {
                "*": ["storageLayout"],
            },
          },
    },
  },
  ....

Usage

  • Compile your contracts
  • Load plugin in your scripts/tasks as follows:
const hre = require("hardhat");
const storageLayout = await hre.exportStorageLayout();
console.log(storageLayout);

Keywords

FAQs

Last updated on 12 Jul 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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