Hardhat Setup
Project scaffolding.
What Is Hardhat
Hardhat is a development environment for Ethereum that helps you compile, test, deploy, and debug smart contracts.
- Written in JavaScript/TypeScript and run with Node.js.
- Ships with a built-in local Ethereum network.
- Has a rich plugin ecosystem (ethers, waffle, gas reporter).
It is the most popular alternative to Truffle and Foundry for JS-centric teams.
Prerequisites
Before installing Hardhat you need Node.js (LTS recommended) and a package manager such as npm or yarn.
Check your versions to make sure the toolchain is ready:
node -v
npm -vHardhat targets Node.js LTS releases, so avoid odd-numbered experimental versions.
node -v
npm -v