{"id":28458211,"url":"https://github.com/solidstate-network/hardhat-git","last_synced_at":"2026-03-06T22:03:02.134Z","repository":{"id":292610040,"uuid":"978415215","full_name":"solidstate-network/hardhat-git","owner":"solidstate-network","description":"HRE initialization and execution at arbitrary Git revision 📦","archived":false,"fork":false,"pushed_at":"2025-09-18T18:10:04.000Z","size":676,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-18T21:10:03.095Z","etag":null,"topics":["checkout","clone","eth","ether","ethereum","git","hardhat","plugin","wow"],"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/solidstate-network.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-06T00:32:47.000Z","updated_at":"2025-09-18T18:10:07.000Z","dependencies_parsed_at":"2025-06-01T03:56:40.831Z","dependency_job_id":"13aaa85d-9c4b-409e-a6c3-fed236b16512","html_url":"https://github.com/solidstate-network/hardhat-git","commit_stats":null,"previous_names":["solidstate-network/hardhat-git"],"tags_count":9,"template":false,"template_full_name":"solidstate-network/hardhat-plugin-template","purl":"pkg:github/solidstate-network/hardhat-git","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidstate-network%2Fhardhat-git","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidstate-network%2Fhardhat-git/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidstate-network%2Fhardhat-git/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidstate-network%2Fhardhat-git/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solidstate-network","download_url":"https://codeload.github.com/solidstate-network/hardhat-git/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidstate-network%2Fhardhat-git/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281026266,"owners_count":26431753,"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","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["checkout","clone","eth","ether","ethereum","git","hardhat","plugin","wow"],"created_at":"2025-06-07T00:10:23.832Z","updated_at":"2025-10-25T21:36:35.062Z","avatar_url":"https://github.com/solidstate-network.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hardhat Git\n\nIsolated HRE execution based on Git revisions.\n\n## Installation\n\n```bash\nnpm install --save-dev @solidstate/hardhat-git\n# or\npnpm add -D @solidstate/hardhat-git\n```\n\n## Usage\n\nThis plugin is primarily intended to be a dependency for other plugins. It exposes a custom HRE factory which does the following:\n\n- Create a temporary clone of the current repository.\n- Check out the specified git revision.\n- Install NPM dependencies.\n\nThe returned HRE instance can be used just like a standard HRE.\n\nSee the [`@solidstate/hardhat-contract-sizer`](https://www.npmjs.com/package/@solidstate/hardhat-contract-sizer) and [`@solidstate/hardhat-storage-layout-diff`](https://www.npmjs.com/package/solidstate/hardhat-storage-layout-inspector) packages for implementation examples.\n\nLoad the factory and checkout a git revision:\n\n```typescript\nimport { createHardhatRuntimeEnvironmentAtGitRev } from '@solidstate/hardhat-git';\n\nconst gitHre = await createHardhatRuntimeEnvironmentAtGitRev(hre, 'HEAD~1');\n```\n\nOptionally declare the plugin as a dependency to expose the helper tasks:\n\n```typescript\nconst plugin: HardhatPlugin = {\n  dependencies: () =\u003e [import('@solidstate/hardhat-git')),\n};\n```\n\nLoad plugin standalone in Hardhat config:\n\n```typescript\nimport hardhatGit from '@solidstate/hardhat-git';\n\nconst config: HardhatUserConfig = {\n  plugins: [\n    hardhatGit,\n  ],\n  git: {\n    ... // see table for configuration options\n  },\n};\n```\n\nAdd configuration under the `git` key:\n\n| option       | description                                                   | default                                                               |\n| ------------ | ------------------------------------------------------------- | --------------------------------------------------------------------- |\n| `npmInstall` | Command used to install NPM dependencies in repository clones | inferred via `package-manager-detector`, falls back to`'npm install'` |\n\n## Development\n\nInstall dependencies via pnpm:\n\n```bash\npnpm install\n```\n\nSetup Husky to format code on commit:\n\n```bash\npnpm prepare\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidstate-network%2Fhardhat-git","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolidstate-network%2Fhardhat-git","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidstate-network%2Fhardhat-git/lists"}