{"id":29360017,"url":"https://github.com/solidstate-network/hardhat-storage-layout-inspector","last_synced_at":"2025-07-09T07:08:44.073Z","repository":{"id":45918624,"uuid":"401213902","full_name":"solidstate-network/hardhat-storage-layout-inspector","owner":"solidstate-network","description":"Inspect and compare Solidity smart contract storage layouts 🔍","archived":false,"fork":false,"pushed_at":"2025-06-08T19:27:38.000Z","size":518,"stargazers_count":8,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-08T20:29:03.135Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solidstate-network.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-08-30T04:18:34.000Z","updated_at":"2025-05-30T21:15:26.000Z","dependencies_parsed_at":"2024-06-21T03:56:08.308Z","dependency_job_id":"fc6ac137-9b36-4ce5-a717-c21f29056145","html_url":"https://github.com/solidstate-network/hardhat-storage-layout-inspector","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":0.07692307692307687,"last_synced_commit":"6a6066d1a008d1976f05cfb56dd7dc284aa77966"},"previous_names":["solidstate-network/hardhat-storage-layout-diff","itsnickbarry/hardhat-storage-layout-diff"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/solidstate-network/hardhat-storage-layout-inspector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidstate-network%2Fhardhat-storage-layout-inspector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidstate-network%2Fhardhat-storage-layout-inspector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidstate-network%2Fhardhat-storage-layout-inspector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidstate-network%2Fhardhat-storage-layout-inspector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solidstate-network","download_url":"https://codeload.github.com/solidstate-network/hardhat-storage-layout-inspector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidstate-network%2Fhardhat-storage-layout-inspector/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260791861,"owners_count":23064001,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-09T07:05:27.201Z","updated_at":"2025-07-09T07:08:44.050Z","avatar_url":"https://github.com/solidstate-network.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hardhat Storage Layout Diff\n\nInspect and compare Solidity smart contract storage layouts.\n\n## Installation\n\n```bash\nnpm install --save-dev hardhat-storage-layout-diff\n# or\nyarn add --dev hardhat-storage-layout-diff\n```\n\n## Usage\n\nLoad plugin in Hardhat config:\n\n```javascript\nrequire('hardhat-storage-layout-diff');\n```\n\nAdd configuration under the `storageLayoutDiff` key:\n\n| option    | description                                                                                                | default                                                        |\n| --------- | ---------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |\n| `path`    | path to HTML export directory (relative to Hardhat root)                                                   | `'./storage_layout'`                                           |\n| `clear`   | whether to delete old output in `path` on output generation                                                | `false`                                                        |\n| `flat`    | whether to flatten output directory (may cause name collisions)                                            | `false`                                                        |\n| `only`    | `Array` of `String` matchers used to select included contracts, defaults to all contracts if `length` is 0 | `['^contracts/']` (dependent on Hardhat `paths` configuration) |\n| `except`  | `Array` of `String` matchers used to exclude contracts                                                     | `[]`                                                           |\n| `spacing` | number of spaces per indentation level of formatted output                                                 | `2`                                                            |\n\nExport storage layouts:\n\n```bash\nnpx hardhat export-storage-layout\n# or\nyarn run hardhat export-storage-layout\n```\n\nCompare two contracts:\n\n```bash\nnpx hardhat diff-storage-layout [CONTRACT_A_FULLY_QUALIFIED_NAME] [CONTRACT_B_FULLY_QUALIFIED_NAME]\n# or\nyarn run hardhat diff-storage-layout [CONTRACT_A_FULLY_QUALIFIED_NAME] [CONTRACT_B_FULLY_QUALIFIED_NAME]\n```\n\nInclude the optional `--a-ref` and/or `--b-ref` arguments to specify the git reference where contracts `a` and `b` are defined, respectively.\n\nCompare a contract to an exported JSON layout:\n\n```bash\nnpx hardhat storage-layout-check --source [PATH_TO_LAYOUT_JSON] --b [CONTRACT_B_FULLY_QUALIFIED_NAME]\n# or\nyarn run hardhat storage-layout-check --source [PATH_TO_LAYOUT_JSON] --b [CONTRACT_B_FULLY_QUALIFIED_NAME]\n```\n\n## Development\n\nInstall dependencies via Yarn:\n\n```bash\nyarn install\n```\n\nSetup Husky to format code on commit:\n\n```bash\nyarn prepare\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidstate-network%2Fhardhat-storage-layout-inspector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolidstate-network%2Fhardhat-storage-layout-inspector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidstate-network%2Fhardhat-storage-layout-inspector/lists"}