GithubHelp home page GithubHelp logo

ethereact's Introduction

Ethereact

Reading blocks and transactions from the Ethereum blockchain with React/Redux.

Development

Install the dependencies: npm install

Tasks

See all available tasks in package.json at scripts:

  1. Run the watcher and the linter: npm run dev

  2. Run the development server: npm start

  3. If geth is installed, you can use this helper task to start your local RPC service: npm run geth

Material UI

See http://www.material-ui.com/#/customization/themes for other components example.

Web3

This trick helped a lot

Turning old school Web3 callback style function, into Promise for usage with redux-saga:

const createCallback = (resolve, reject) => (error, result) => {
  if (!error) {
    resolve(result);
  }
  reject(error);
};

function callWeb3MethodAsPromise(method, args = []) {
  return new Promise((resolve, reject) => {
    if (!Web3.hasOwnProperty(method)) {
      reject(new Error(`Method '${method} does'nt exists in Web3 API.`));
    }

    return Web3[method](...args, createCallback(resolve, reject));
  });
}

ethereact's People

Contributors

lutangar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

dabruhce

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.