Ethereum Storage Dumper is a simple command-line tool 🛠️ that utilizes the Hardhat framework to inspect and decode the storage values of a given Ethereum contract. It allows users to quickly and easily understand the values stored in a contract's storage slots. 💾
- Inspect storage values from slot 0 to a specified limit 🔍
- Decode storage values, including addresses, numbers, and strings 📚
- Optional tracing mode to log each checked storage slot 🔬
- Built using the Hardhat framework 🏗️
- Install the
ethereum-storage-dumper
plugin in your Hardhat project:
npm install --save-dev ethereum-storage-dumper
- Require the plugin in your
hardhat.config.js
:
require("ethereum-storage-dumper");
or, for hardhat.config.ts
:
import "ethereum-storage-dumper";
To dump the storage values of a contract, use the following command:
npx hardhat sd --address CONTRACT_ADDRESS [--to SLOT_LIMIT, --raw]
CONTRACT_ADDRESS
: The Ethereum address of the contract you want to inspect. 📝SLOT_LIMIT
: The maximum storage slot to check (default: 100, and you dont need to go deeper). 🔢--raw
: (Optional) Print all storage slots as-is in hex 📈
To dump storage values of a contract with the address 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
and a slot limit of 100, run:
npx hardhat sd --address 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
To enable raw mode, add the --raw
flag:
npx hardhat sd --address 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 --raw
This project is released under the MIT License.
Man, I love GPT4 generating, upgrading and fixing my stuff )