{"id":18627283,"url":"https://github.com/itsnickbarry/hardhat-storage-layout-diff","last_synced_at":"2025-04-11T05:31:32.851Z","repository":{"id":45918624,"uuid":"401213902","full_name":"ItsNickBarry/hardhat-storage-layout-diff","owner":"ItsNickBarry","description":"Inspect and compare Solidity smart contract storage layouts 🔍","archived":false,"fork":false,"pushed_at":"2024-07-30T20:36:14.000Z","size":221,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T19:51:13.602Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/ItsNickBarry.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}},"created_at":"2021-08-30T04:18:34.000Z","updated_at":"2024-09-18T23:49:51.000Z","dependencies_parsed_at":"2024-06-21T03:56:08.308Z","dependency_job_id":"fc6ac137-9b36-4ce5-a717-c21f29056145","html_url":"https://github.com/ItsNickBarry/hardhat-storage-layout-diff","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":0.07692307692307687,"last_synced_commit":"6a6066d1a008d1976f05cfb56dd7dc284aa77966"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsNickBarry%2Fhardhat-storage-layout-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsNickBarry%2Fhardhat-storage-layout-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsNickBarry%2Fhardhat-storage-layout-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsNickBarry%2Fhardhat-storage-layout-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ItsNickBarry","download_url":"https://codeload.github.com/ItsNickBarry/hardhat-storage-layout-diff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248347451,"owners_count":21088655,"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":"2024-11-07T04:41:48.086Z","updated_at":"2025-04-11T05:31:32.591Z","avatar_url":"https://github.com/ItsNickBarry.png","language":"JavaScript","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 storage-layout-compare --a [CONTRACT_A_FULLY_QUALIFIED_NAME] --b [CONTRACT_B_FULLY_QUALIFIED_NAME]\n# or\nyarn run hardhat storage-layout-compare --a [CONTRACT_A_FULLY_QUALIFIED_NAME] --b [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%2Fitsnickbarry%2Fhardhat-storage-layout-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsnickbarry%2Fhardhat-storage-layout-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsnickbarry%2Fhardhat-storage-layout-diff/lists"}