This article is about configuration of your hardhat.config.js file . This file is normally located in the root of your project and is needed for Hardhat to work. Everything about your Hardhat setup (i.e. your config, plugins and custom tasks) are contained in this file.
An object is exported from hardhat.config.js to set up your project. This object can have entities like defaultNetwork, networks, solidity, paths and mocha.
A sample config file is shown below:
There are two kinds of networks in Hardhat: JSON-RPC based networks, and built-in Hardhat Network.
The default network is “hardhat” but you can…
This tutorial is about how to setup Hardhat and how to compile, test and deploy smart contract using this.
Firstly, Hardhat is basically a development environment to compile, deploy, test and debug Ethereum smart contracts. It serves as an alternative to truffle. However, it is a lot better than the latter. Hardhat had a built-in Hardhat Network (like Ganache, your local blockchain) designed for development. Its main functionality focuses around Solidity, debugging, featuring stack traces, console.log() and explicit error messages when transactions fail.
Hardhat is used through local installation in your project.
To install it, create an npm project by…