Ethereum Fullstack Template
This repository contains a create-react-app
template that can be used to develop an ethereum dApp.
Quick Start
-
Create a project using this template
$ create-react-app project-name --template ethereum-fullstack
-
Switching to test network (RINKEBY)
- Change line -
const NETWORK = LOCAL_NETWORK
toconst NETWORK = TEST_NETWORK
inhardhat.config.js
- Replace
YOUR_ALCHEMY_API_KEY
with your api key from alchemy in.env
file - Replace
YOUR_WALLET_PRIVATE_KEY
with your wallet's private key from metamask wallet in.env
file
- Change line -
-
Running test for sample contract
npx hardhat test
-
Running your app
npm start
What’s Included?
Your environment will have following set up:
- A sample frontend: Sample application which uses Create React App along with its test.
- Common utilities: Utilities to plug into dApps.
- Hardhat: An Ethereum development task runner and testing network.
- Mocha: A JavaScript test runner.
- Chai: A JavaScript assertion library.
- ethers.js: A JavaScript library for interacting with Ethereum.
- Waffle: To have Ethereum-specific Chai assertions/mathers.
Trouble Shooting
-
Error HH8: There's one or more errors in your config file
error: If you get this error try setting up yourYOUR_ALCHEMY_API_KEY
andYOUR_WALLET_PRIVATE_KEY
in .env file