This repo shows an example of how you can communicate with your smart contracts through front-end application. We use React.js
and useDapp
to showcase how this can be achieved.
Please go through Day 1 repo first since it is going to be needed.
This project was bootstrapped using simple creare-react-app
CLI.
git clone https://github.com/ironsoul0/n17r-web3-day2
cd n17r-web3-day2
yarn
In order to successfully run this application on your device, you have to correctly fill src/config/index.ts
file. Mainly you are interested in replacing config.multicall
and config.erc20
with respective addresses of contracts deployed to your local hardhat
chain.
Go through the README
of Day 1 to find out how to deploy your contracts.
This application assumes that you have Hardhat
chain configured in your Metamask with the following configs:
- RPC URL:
http://localhost:8545
- Chain ID:
31337
Please refer to these docs for further understanding of how to build frontend apps for Web3: