This repository contains a full stack web project built using React.js for the front end, Ethereum smart contracts for the backend, and Hardhat for smart contract development and testing. The project utilizes the Ethers.js library for interacting with Ethereum smart contracts.
The React Dapp in this repo looks like this:
- React.js: A popular JavaScript library for building user interfaces.
- Ethers.js: A JavaScript library for interacting with the Ethereum blockchain and smart contracts.
- Hardhat: A development environment to compile, deploy, test, and debug Ethereum smart contracts.
- Smart Contracts: Ethereum smart contracts written in Solidity, deployed on the Ethereum blockchain.
- Node.js and npm installed on your machine.
- An Ethereum client such as MetaMask installed in your browser for interacting with Ethereum networks.
-
Clone this repository:
git clone https://github.com/Ne3mah/Simple-React-DApp-Project.git
-
Navigate into the React project directory:
cd Simple-React-DApp-Project/client
-
Install dependencies:
npm install
-
Start the React.js front end:
npm run dev
-
Navigate into the smart contract project directory:
cd Simple-React-DApp-Project/smart_contract
-
Install dependencies:
npm install
-
Run a local blockchain network using Hardhat for testing:
npx hardhat node
This command will start a local Ethereum node for testing purposes.
-
Deploy smart contracts using Hardhat:
npx hardhat ignition deploy ./ignition/modules/Message.js --network localhost
-
Install MetaMask
-
Add Local Network to MetaMask
-
Importing Test Accounts