| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Hardhat (https://hardhat.org/) is a widely-used development environment for Ethereum smart contracts. Its default project layout generates several directories that should not be committed. This template mirrors the .gitignore that ships in Hardhat's own example-project (packages/example-project/.gitignore in NomicFoundation/hardhat), limited to Hardhat-specific paths (generic Node.js paths such as node_modules and dist are already covered by Node.gitignore). Rules: - /artifacts, /cache: compiled contract output and compilation cache - /types: TypeChain output for @nomicfoundation/hardhat-typechain (v3) - /typechain-types: TypeChain output for @typechain/hardhat (v2) - /ignition/deployments: Hardhat Ignition deployment output
There was a problem hiding this comment.
Adds a community .gitignore template for Hardhat projects.
Changes:
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What
Adds community/Hardhat.gitignore — a template for projects using Hardhat, the Ethereum smart-contract development environment maintained by Nomic Foundation.
Why
Hardhat is one of the two most widely-used Ethereum development environments (alongside Foundry). Every Hardhat project generates the same set of build artifacts, cache files, generated TypeScript types, and deployment records that should not be committed. There is currently no template in this repo covering these paths — Solidity-Remix.gitignore is scoped specifically to the Remix IDE plugin's artifacts/, deps/, and states/ folders and does not cover Hardhat's layout (cache/, types/, ignition/deployments/, etc.).
Scope
Per the contributing guidelines, the template is limited to Hardhat-specific paths only. Generic Node.js paths (node_modules, dist) and coverage output are intentionally excluded — they are already covered by Node.gitignore, which the template file itself recommends as the base:
Provenance for each rule
Every rule mirrors the .gitignore that ships in Hardhat's own packages/example-project/.gitignore:
All paths are anchored with a leading / to prevent accidentally matching similarly-named nested directories (e.g. hand-written src/types/).
Compliance with CONTRIBUTING.md