Giter Site home page Giter Site logo

ico_truffle's Introduction

Truffle Box (React)

This box comes with everything you need to start using smart contracts from a react app. This is as barebones as it gets, so nothing stands in your way.

Installation

  1. Install truffle and an ethereum client. For local development, try EthereumJS TestRPC.

    npm install -g truffle // Version 3.0.5+ required.
    npm install -g ethereumjs-testrpc
  2. Downlaod box using Truffle.

    truffle unbox truffle-box-react
  3. Compile and migrate the contracts.

    truffle compile
    truffle migrate
  4. Run the webpack server for front-end hot reloading. For now, smart contract changes must be manually recompiled and migrated.

    npm run start
  5. Jest is included for testing React components and Truffle's own suite is incldued for smart contracts. Be sure you've compile your contracts before running jest, or you'll receive some file not found errors.

    // Runs Jest for component tests.
    npm run test
    
    // Runs Truffle's test suite for smart contract tests.
    truffle test
  6. To build the application for production, use the build command. A production build will be in the build_webpack folder.

    npm run build

FAQ

  • Why is there both a truffle.js file and a truffle-config.js file?

    Truffle requires the truffle.js file be named truffle-config on Windows machines. Feel free to delete the file that doesn't correspond to your platform.

  • Where is my production build?

    The production build will be in the build_webpack folder. This is because Truffle outputs contract compilations to the build folder.

  • Where can I find more documentation?

    All truffle boxes are a marriage of Truffle and a React setup created with create-react-app. Either one would be a great place to start!

ico_truffle's People

Contributors

gnidan avatar onlyonejmjq avatar rstormsf avatar zoyescreative avatar

Watchers

 avatar

Forkers

root-servers

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.