{"id":15926566,"url":"https://github.com/zemse/hardhat-storage-layout-changes","last_synced_at":"2026-04-06T03:35:27.894Z","repository":{"id":65427669,"uuid":"539930527","full_name":"zemse/hardhat-storage-layout-changes","owner":"zemse","description":"💾 Check for storage layout changes","archived":false,"fork":false,"pushed_at":"2022-10-11T04:14:11.000Z","size":97,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-19T03:57:36.033Z","etag":null,"topics":["ethereum","hardhat","hardhat-plugin","smart-contracts","storage-layout","upgradable-contracts"],"latest_commit_sha":null,"homepage":"","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/zemse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-22T10:45:18.000Z","updated_at":"2023-09-27T22:56:20.000Z","dependencies_parsed_at":"2023-01-23T10:55:27.217Z","dependency_job_id":null,"html_url":"https://github.com/zemse/hardhat-storage-layout-changes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"NomicFoundation/hardhat-ts-plugin-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zemse%2Fhardhat-storage-layout-changes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zemse%2Fhardhat-storage-layout-changes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zemse%2Fhardhat-storage-layout-changes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zemse%2Fhardhat-storage-layout-changes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zemse","download_url":"https://codeload.github.com/zemse/hardhat-storage-layout-changes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245289778,"owners_count":20591131,"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":["ethereum","hardhat","hardhat-plugin","smart-contracts","storage-layout","upgradable-contracts"],"created_at":"2024-10-06T22:41:13.529Z","updated_at":"2026-04-06T03:35:22.862Z","avatar_url":"https://github.com/zemse.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hardhat-storage-layout-changes\n\n_Hardhat plugin to check for storage layout changes_\n\n## What\n\nWhen working with complex and upgradable contracts, it can be difficult to manually see whether some solidity changes broke the storage layout or not. A mistake can cause undefined behavior in deployed contracts. This plugin aims to help notice any storage layout breakings while dev works on solidity changes.\n\n## Installation\n\n```bash\nnpm install hardhat-storage-layout-changes\n```\n\nImport the plugin in your `hardhat.config.js`:\n\n```js\nrequire(\"hardhat-storage-layout-changes\");\n```\n\nOr if you are using TypeScript, in your `hardhat.config.ts`:\n\n```ts\nimport \"hardhat-storage-layout-changes\";\n```\n\n## Tasks\n\nThis plugin adds the _storage-layout_ task to Hardhat:\n\n```\nUsage: hardhat [GLOBAL OPTIONS] storage-layout [--check] [--update]\n\nOPTIONS:\n\n  --check       Checks if storage layout has changed\n  --update      Updates storage layout artifact\n```\n\n## Configuration\n\nThis plugin extends the `HardhatUserConfig`'s `ProjectPathsUserConfig` object with an optional\n`storageLayouts` field and also adds a `storageLayoutConfig`.\n\nThis is an example of how to set it:\n\n```js\nmodule.exports = {\n  paths: {\n    storageLayouts: \".storage-layouts\",\n  },\n  storageLayoutConfig: {\n    contracts: [\"Pool\"],\n    fullPath: false\n  };\n};\n```\n\n## Usage\n\n### `npx hardhat storage-layout --check`\n\n```\nContract: Pool\n   \"accounts\": at same location\n         \"user\": at same location\n         \"balance\": at same location\n   \"owner\": changed slot from 1 to 2\n   \"lastUpdate\": found new storage entry at slot 1 offset 0\n   \"owner\": found new storage entry at slot 2 offset 0\n\nError: Storage Layout Changed. If this was intentional, please update the storage layout files using \"npx hardhat storage-layout --update\".\n```\n\n### `npx hardhat storage-layout --update`\n\n```\nContract: Pool\nupdating Pool.json\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzemse%2Fhardhat-storage-layout-changes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzemse%2Fhardhat-storage-layout-changes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzemse%2Fhardhat-storage-layout-changes/lists"}