Git Product home page Git Product logo

eth-react's Introduction

๐Ÿ• Ethereum and React: An introduction to building your first web dApp

Getting Started

  • Have node installed. If you run into trouble, this was created with v8.9.4
  • Install and run Ganache
  • Install MetaMask
    1. Create and connect to a custom RPC network using the Ganache RPC server (currently http://127.0.0.1:7545)
    2. Import a new account and use the private key provided by Ganache from account 1.
  • Install the Truffle Framework
    • npm install -g truffle
  • Clone or download the repo
  • Type npm install
    • If you get an error on install, don't panic. It should still work.
  • Type truffle compile and truffle migrate
  • Type npm run start
  • Put on a pair of sunglasses and bask in your blockchain glory. ๐Ÿบ

Remember these steps when starting a new development session.

  1. Start Ganache.
  2. Unlock MetaMask with local RPC network.
  3. Switch accounts to the one we imported.
  4. truffle compile
  5. truffle migrate
  6. npm run start

Testing

Type truffle test to test.

Security

Troubleshooting Tips

  • Is Ganache running?
  • Is your MetaMask account unlocked?
  • Are you using the MetaMask account associated with your Ganache account (the one we created above)?
  • Are you using your custom RPC network in MetaMask?
  • If MetaMask can't find your RPC network, try switching to the Main Ethereum Network and back.
  • Did you truffle compile and truffle migrate whenever starting your local network or making changes to your smart contract?
  • Transaction error? Try resetting the MetaMask account you created under settings.
  • Is truffle migrate showing stale settings? Try truffle migrate --reset

eth-react's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.