Full stack dApp with React, Ethers.js, Solidity, and Hardhat
Basic Sample React DApp Project
This project demonstrates a basic dApp development with React, Ethers.js, Solidity, and Hardhat. I wanted to show you how to build full stack Ethereum dapps using the most up to date resources, libraries, and tooling.
How to install and run
- Clone the repo
git clone https://github.com/SmartCoding51/hardhat-react-dapp.git
- Set up keys.json file and install dependencies
cd hardhat-react-dapp
cp keys.example.json keys.json
npm install
- Set up .env file in react frontend directory, and install dependencies
cp env.example .env
npm install
- Run the app
npm start
How to start local test network and deploy contract
- Start the local test node
cd hardhat-react-dapp
npx hardhat node
- Deploy the contract
npx hardhat run scripts/deploy.js --network localhost
- Update src/App.js with the value of your contract address
- Run the app
cd frontend
npm start