/hardhat

Primary LanguageSolidity

Sample Hardhat Project

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.js

Create new project

npm init --yes
npm install --save-dev hardhat
npm install @nomicfoundation/hardhat-toolbox

Install hardhat proxy
npm install --save-dev @openzeppelin/hardhat-upgrades
npm install --save-dev @nomiclabs/hardhat-ethers ethers # peer dependencies
register in hardhat.config.js
require('@openzeppelin/hardhat-upgrades');
use 
const { ethers, upgrades } = require("hardhat");

npx hardhat

Run project

npx hardhat run scripts/deploy.ts --network testnet

run task
npx hardhat taskName