diff --git a/.changeset/moody-monkeys-jump.md b/.changeset/moody-monkeys-jump.md new file mode 100644 index 00000000000..8ae02861c22 --- /dev/null +++ b/.changeset/moody-monkeys-jump.md @@ -0,0 +1,5 @@ +--- +"hardhat": patch +--- + +Update `.gitignore` files in the sample projects to ignore snapshots and env files. diff --git a/packages/hardhat/templates/hardhat-3/01-node-test-runner-viem/gitignore b/packages/hardhat/templates/hardhat-3/01-node-test-runner-viem/gitignore index 991a319eb0b..8a0137f2762 100644 --- a/packages/hardhat/templates/hardhat-3/01-node-test-runner-viem/gitignore +++ b/packages/hardhat/templates/hardhat-3/01-node-test-runner-viem/gitignore @@ -16,5 +16,16 @@ # Typechain output /types +# Environment files +.env +.env.* +!.env.example + # Hardhat coverage reports /coverage + +# Gas snapshot files +/.gas-snapshot + +# Snapshot cheatcodes output +/snapshots diff --git a/packages/hardhat/templates/hardhat-3/02-mocha-ethers/gitignore b/packages/hardhat/templates/hardhat-3/02-mocha-ethers/gitignore index 991a319eb0b..8a0137f2762 100644 --- a/packages/hardhat/templates/hardhat-3/02-mocha-ethers/gitignore +++ b/packages/hardhat/templates/hardhat-3/02-mocha-ethers/gitignore @@ -16,5 +16,16 @@ # Typechain output /types +# Environment files +.env +.env.* +!.env.example + # Hardhat coverage reports /coverage + +# Gas snapshot files +/.gas-snapshot + +# Snapshot cheatcodes output +/snapshots diff --git a/packages/hardhat/templates/hardhat-3/03-minimal/gitignore b/packages/hardhat/templates/hardhat-3/03-minimal/gitignore index 991a319eb0b..8a0137f2762 100644 --- a/packages/hardhat/templates/hardhat-3/03-minimal/gitignore +++ b/packages/hardhat/templates/hardhat-3/03-minimal/gitignore @@ -16,5 +16,16 @@ # Typechain output /types +# Environment files +.env +.env.* +!.env.example + # Hardhat coverage reports /coverage + +# Gas snapshot files +/.gas-snapshot + +# Snapshot cheatcodes output +/snapshots