{"id":21180220,"url":"https://github.com/emretepedev/hardhat-storage-vault","last_synced_at":"2025-07-09T23:32:08.275Z","repository":{"id":65190565,"uuid":"580297819","full_name":"emretepedev/hardhat-storage-vault","owner":"emretepedev","description":"Hardhat plugin to check and lock the storage layout of contracts.","archived":false,"fork":false,"pushed_at":"2023-10-03T01:21:27.000Z","size":512,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-13T17:15:31.365Z","etag":null,"topics":["hardhat","hardhat-plugin"],"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/emretepedev.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-20T08:03:19.000Z","updated_at":"2023-09-27T22:57:29.000Z","dependencies_parsed_at":"2024-10-30T03:29:38.831Z","dependency_job_id":null,"html_url":"https://github.com/emretepedev/hardhat-storage-vault","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/emretepedev/hardhat-storage-vault","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emretepedev%2Fhardhat-storage-vault","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emretepedev%2Fhardhat-storage-vault/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emretepedev%2Fhardhat-storage-vault/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emretepedev%2Fhardhat-storage-vault/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emretepedev","download_url":"https://codeload.github.com/emretepedev/hardhat-storage-vault/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emretepedev%2Fhardhat-storage-vault/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261715355,"owners_count":23198746,"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":["hardhat","hardhat-plugin"],"created_at":"2024-11-20T17:42:07.460Z","updated_at":"2025-07-09T23:32:07.846Z","avatar_url":"https://github.com/emretepedev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hardhat-storage-vault\n\nHardhat plugin to check and lock the storage layout of contracts.\n\n## What\n\nThis plugin will help you avoid possible errors by checking and locking your storage layout.\n\n## Installation\n\nI recommend using npm 7 or later. If you do that, then you just need to install the plugin itself:\n\n```bash\nnpm install hardhat-storage-vault\n```\n\nIf you are using an older version of npm, you'll also need to install all the packages used by `hardhat-storage-vault`.\n\n```bash\nnpm install hardhat-storage-vault hardhat-finder\n```\n\nThat's also the case if you are using yarn.\n\n```bash\nyarn add hardhat-storage-vault hardhat-finder\n```\n\n---\n\nImport `hardhat-storage-vault` in your Hardhat config. This will make import of `hardhat-finder` redundant, so you can remove it if you want:\n\nImport the plugin in your `hardhat.config.js`:\n\n```js\nrequire(\"hardhat-storage-vault\");\nrequire(\"hardhat-finder\"); // you can remove this line\n```\n\nOr if you are using TypeScript, in your `hardhat.config.ts`:\n\n```ts\nimport \"hardhat-storage-vault\";\nimport \"hardhat-finder\"; // you can remove this line\n```\n\n## Tasks\n\nThis plugin adds `storage-check` and `storage-lock` tasks to Hardhat:\n\n```\nUsage: hardhat [GLOBAL OPTIONS] storage-lock [--overwrite] [--prettify] [--store-file \u003cSTRING\u003e] [...excludeContracts]\n$ hardhat storage-lock --prettify --overwrite\n\nSuccess in plugin hardhat-storage-vault:\nCreated storage-store-lock.json file.\n\n\nUsage: hardhat [GLOBAL OPTIONS] storage-check [--store-file \u003cINPUTFILE\u003e]\n$ hardhat storage-check --store-file custom-storage-store-lock.json\n\nError in plugin hardhat-storage-vault:\nInvalid slot value!\n  Contract path: contracts/Example.sol\n  Contract name: Example\n    Slot name: foo\n    Slot (Expected): 1\n    Slot (Actual): 0\n```\n\n## Configuration\n\nThis plugin extends the `HardhatUserConfig`'s `StorageVaultConfig` object with the `storageVault` field.\n\nThis is an example of how to set it:\n\n```js\nmodule.exports = {\n  storageVault: {\n    check: {\n      storeFile: \"storage-store-lock.json\",\n    },\n    lock: {\n      excludeContracts: [\n        \"^contracts-exposed/\", // exclude by directory\n        \"^contracts/Example.sol\", // exclude by file\n        \"Example$\", // exclude by contract name\n        \"^contracts/Example.sol:Example$\", // exclude by fully qualified name\n        \"Example.+\\\\.sol\", // regex search (exclude ExampleTwo.sol, ExampleThree.sol but not Example.sol)\n        \"Example.*\\\\.sol\", // regex search (exclude Example.sol, ExampleTwo.sol, ExampleThree.sol)\n      ],\n      storeFile: \"storage-store-lock.json\",\n      prettify: false,\n      overwrite: false,\n    },\n  },\n};\n```\n\n| Task  | Option           | Type       | Default                 | Description                                                      |\n| ----- | ---------------- | ---------- | ----------------------- | ---------------------------------------------------------------- |\n| Check | storeFile        | _String_   | storage-store-lock.json | Use a specific JSON file as a storage store.                     |\n| Vault | excludeContracts | _String[]_ | []                      | Regex string to ignore contracts.                                |\n| Vault | storeFile        | _String_   | storage-store-lock.json | Create or update a specific JSON file to save the storage store. |\n| Vault | prettify         | _Boolean_  | false                   | Save the file by formatting.                                     |\n| Vault | overwrite        | _Boolean_  | false                   | Overwrite if there is a store file with the same name.           |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femretepedev%2Fhardhat-storage-vault","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femretepedev%2Fhardhat-storage-vault","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femretepedev%2Fhardhat-storage-vault/lists"}