cra-template-ethereum-fullstack

The base template for Ethereum fullstack app.

Usage no npm install needed!

<script type="module">
  import craTemplateEthereumFullstack from 'https://cdn.skypack.dev/cra-template-ethereum-fullstack';
</script>

README

Ethereum Fullstack Template

This repository contains a create-react-app template that can be used to develop an ethereum dApp.

Quick Start

  1. Create a project using this template

    $ create-react-app project-name --template ethereum-fullstack
    
  2. Switching to test network (RINKEBY)

    • Change line - const NETWORK = LOCAL_NETWORK to const NETWORK = TEST_NETWORK in hardhat.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
  3. Running test for sample contract

    npx hardhat test
    
  4. 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 your YOUR_ALCHEMY_API_KEY and YOUR_WALLET_PRIVATE_KEY in .env file