A quick template with everything you need to get started with frontend Ethereum projects.
I love using wagmi for Ethereum projects, but I got tired of creating repos from scratch over and over. So I decided to create a starter repo that sets a create-react-app project with some mundane tasks already done such as creating a login modal, setting up a provider and some styles.
wagmi is a React Hooks library for Ethereum, built on ethers.js. It provides lots of fun hooks that make interacting with the blockchain a breeze.
You can read their full documentation here
- You can clone or fork this repo.
- Install the dependencies.
cd wagmi-starter
yarn
- Add a
.env
file with the following values.
REACT_APP_ALCHEMY_ID=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
REACT_APP_INFURA_ID=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
REACT_APP_CHAIN_ID=1
REACT_APP_NETWORK=homestead
- Style your dapp however you want, feel free to delete anything you don't need.
Due to these packages relying on nodejs modules which are not supported anymore using webpack 5 (which comes with react-scripts 5) we have to do some hacky shit to be able to use them right now.
This starte takes care of all that for you but hopefully this is fixed soon and I can update this repo.
You can read more about the problem and the fix here
I also want to thank willisk for saving me hours of troubleshooting with this solution.
- A massive thank you to @awkweb for creating wagmi. I've loved using it thus far.
- MIT