Set up an Ubuntu-based environment or use WSL 2 on Windows:
For Ubuntu: You can install Ubuntu directly on your machine or use a virtual machine software like VirtualBox to create an Ubuntu virtual machine. For Windows with WSL 2: Follow the official Microsoft documentation to install and set up WSL 2 on your Windows machine.
Install yarn
npm install -g yarn
yarn add --dev hardhat @openzeppelin/contracts typescript typechain ts-node @typechain/hardhat @types/chai @types/node hardhat-deploy @nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers ethers
yarn add --dev hardhat
npx hardhat
This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, and a script that deploys that contract.
Try running some of the following tasks:
npx hardhat help
npx hardhat test
REPORT_GAS=true npx hardhat test
npx hardhat node
npx hardhat run scripts/deploy.ts