HardHat
lily@57blocks.com
Hardhat is a development environment for Ethereum software. It consists of different components for editing, compiling, debugging and deploying your smart contracts and dApps, all of which work together to create a complete development environment.
Install Hardhat
Hardhat is used through a local installation in your project. This way your environment will be reproducible, and you will avoid future version conflicts.
npm install --save-dev hardhat
yarn add --dev hardhat
Core Tools of Hardhat
Hardhat Runner
Hardhat Runner is the main component you interact with when using Hardhat. It's a flexible and extensible task runner that helps you manage and automate the recurring tasks inherent to developing smart contracts and dApps.
Hardhat Runner is designed around the concepts of tasks and plugins. Every time you're running Hardhat from the command-line, you're running a task.Plugins are the backbone of Hardhat, and they're built using the same config API that you use in your Hardhat configuration. You can extend Hardhat's functionality with the plugins list here.
What can we do using Hardhat Runner?
Hardhat Network
Hardhat Network is a local Ethereum network node designed for development. It allows you to deploy your contracts, run your tests and debug your code, all within the confines of your local machine.
What can we do using Hardhat Runner?
Hardhat VSCode
Hardhat for Visual Studio Code is the official Hardhat extension that adds advanced support for Solidity to VSCode.
Hardhat Chai Matchers
Hardhat Chai Matchers adds Ethereum-specific capabilities to the Chai assertion library, making your smart contract tests easy to write and read.
Hardhat Network Helpers
Hardhat Network Helpers provides a convenient JavaScript interface to the JSON-RPC functionality of Hardhat Network.
Recommended Reading
Hardhat Explained – What is Hardhat?
What Is Hardhat – A Comprehensive Guide
Hardhat helps developers in testing, compiling, deploying, and debugging dApps on the Ethereum blockchain. It serves a crucial role in supporting coders and developers with the management of tasks, which are important for smart contract and dApp development. You can try it follow the official tutorial.
Last updated