Hardhat

Sep 5
·

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.

Requirements:

Create a new node project

Lets create an empty node project

Terminal
mkdir hardhat-tutorial
cd hardhat-tutorial

Then initialize an npm project as shown below. You'll be prompted to answer some questions.

Terminal
npm init

Now we can install hardhat

Terminal
npm install --save-dev hardhat

Add the following code in index.html

Terminal
  $ npx hardhat
  888    888                      888 888               888
  888    888                      888 888               888
  888    888                      888 888               888
  8888888888  8888b.  888d888 .d88888 88888b.   8888b.  888888
  888    888     "88b 888P"  d88" 888 888 "88b     "88b 888
  888    888 .d888888 888    888  888 888  888 .d888888 888
  888    888 888  888 888    Y88b 888 888  888 888  888 Y88b.
  888    888 "Y888888 888     "Y88888 888  888 "Y888888  "Y888
 
  👷 Welcome to Hardhat v2.9.9 👷‍
 
  ? What do you want to do? …
    Create a JavaScript project
    Create a TypeScript project
  ❯ Create an empty hardhat.config.js
    Quit