Hardhat: Ethereum development environment
Development environment for compiling, deploying, testing, and debugging Ethereum smart contracts and dApps.
Learn more about Hardhat
Hardhat is a development environment designed for Ethereum blockchain development workflows. It provides a comprehensive toolkit that includes a local Ethereum network simulation, smart contract compilation, automated testing framework, and debugging capabilities. The platform is built with JavaScript and TypeScript support, offering a task runner architecture that integrates various development tools. Developers use Hardhat to build, test, and deploy smart contracts and decentralized applications on the Ethereum blockchain.
Built-in Network
Includes a local Ethereum network simulation for testing and development without requiring external blockchain connections.
Task Runner Architecture
Provides a plugin-based task runner system that allows developers to automate and customize their development workflows.
Integrated Debugging
Features built-in debugging tools specifically designed for Ethereum smart contract development and troubleshooting.
// hardhat.config.js
require("@nomicfoundation/hardhat-toolbox");
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: {
version: "0.8.19",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
},
networks: {
hardhat: {
chainId: 1337
},
sepolia: {
url: process.env.SEPOLIA_URL || "",
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : []
}
},
gasReporter: {
enabled: process.env.REPORT_GAS !== undefined,
currency: "USD"
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY
}
};Hardhat v2.28.4
- –Fixed bug in `hardhat_reset` when switching from local to fork mode (#7834)
Hardhat v3.1.5
- –Improve how solidity tests are displayed, making it more consistent with the js reporters #7867.
- –Bumped `viem` version across all packages 7861.
- –Updated the incorrect JSDOC against the `preprocessProjectFileBeforeBuilding` Solidity Hook (#7870)
- –Added `invokeSolc` in `SolidityHooks` to allow plugins to respond to the input/output from solc (#7646)
Hardhat v3.1.4
- –Fixes a bug in how code coverage for Solidity tests is calculated (7767).
- –Hardhat tries to use the latest Solidity version supported by Slang in case the a newer, unsupported version is selected (7846).
- –Added HTML coverage report for solidity tests (7787).
Related Repositories
Discover similar tools and frameworks used by developers
Substrate
A modular framework for building custom blockchains with configurable consensus and runtime logic.
Freqtrade
Python trading bot with backtesting, strategy optimization, and live trading across crypto exchanges.
Solmate
A collection of gas-optimized Solidity contracts including ERC token implementations and utility libraries.
MetaMask Extension
Browser extension that provides wallet functionality for interacting with Ethereum blockchain applications.
Lotus
Go-based reference implementation of the Filecoin distributed storage network protocol.