Skip to content

PrivacyShell/healthchainrx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HOW TO

SCRIPT FOR ADDING FUNCTION TO SOLIDITY AND CONNECTING:

  • Update the contract.sol to add the function
  • run truffle compile
  • run truffle migrate
  • Go to middleware/ and find corresponding javascript
    • Add corresponding JS function that accepts any data to go to the solidity contract function
  • Go to /src/actions/index.js and create an action that will be called by GUI to invoke function
    • Make sure to export that actions
    • At top of file, import this from a reducer that will be created
  • Go to /reducers/ and open the file

react-redux-dapp

This is a template project that can be used as the basis for an Ethereum Dapp.

Prerequisites

You'll want to have the following installed globally

This is how to use it

In the project directory, run these commands:

 npm install
 npm start

Environment

This is an overview of the development environment I use.

General Redux Data Flows in react-redux-dapp

For reference, consider these depictions of generic redux flows taken from [ReachJS Issue #653](https://github.com/reactjs/redux/issues/653].

Redux Data Flows in react-redux-dapp

This section describes the reducers, state model and actions used in the YAEE sample application included in this project.

Reducers

The reducers maintain state

Middleware

Thunk

The redux-thunk middleware component is used to incercept the asynchronous server calls from web3.filter() events.

The redux-logger middleware component provides clean logging of state before, actions and state after for debugging.

State Model

The state model represents on-chain data including accounts and transactions transactions and off-chain data like the list of cryptos or tokens that can be transfered and transfer details captured from the view.

Actions

The application state is initialized by calling actions getAllAccounts, getCryptos and fetchTransactions. For now, fetchTransactions initalizes the web3.filter() to listen for the latest transacations.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages