Skip to content

Latest commit

 

History

History
191 lines (128 loc) · 6.28 KB

README.md

File metadata and controls

191 lines (128 loc) · 6.28 KB

TCR UI (WIP)

FOSSA Status

Build Status

"Token-curated registries are decentrally-curated lists with intrinsic economic incentives for token holders to curate the list's contents judiciously" - Mike Goldin

TCRs use an intrinsic token to incentivize a community to reach decentralized consensus and curate a registry of high-quality entries


Getting started

NOTICE: commands prefixed with $ should be executed in this repo, while commands prefixed with > should be executed in a separate shell, in a cloned tcr repo

TCR-UI:

Clone & run app in dev mode in browser, rebuild on file changes - localhost:3000

  $ git clone https://github.com/kangarang/tcr-ui.git
  $ cd tcr-ui
  $ npm install
  $ npm run dev

Tests

Run unit tests with Jest

  $ npm test

Local blockchain/RPC (optional):

ganache-cli - localhost:8545

  $ npm run rpc

Warning: Do not use the mnemonic associated with this command on ethereum main network. You will lose your funds!

TCR (optional):

Clone & install/compile smart contracts

  > git clone https://github.com/kangarang/tcr.git
  > cd tcr
  > npm install
  > npm run compile

Deploy contracts (optional):

local test network

  > npm run deploy-ganache

rinkeby test network

  > npm run deploy-rinkeby

Application Binary Interfaces

tcr-ui retrieves ABIs from IPFS, then loads the tcr smart contracts using the current networkID of MetaMask. the ABIs retrieved from IPFS are the same ABIs as the ones located in /scripts/abis/

The registry MUST be deployed to a network. If you have a registry address that you want to force, hardcode it in /src/config/registry.json

If you do not want to rely on hardcoding the address, you can add a custom set of ABIs to IPFS:

  1. Edit the "address" of the appropriate "networks" section of /scripts/abis/Registry.json
  2. Run npm run update:abis to add your custom abis to IPFS. (note: a multihash starting with "Qm" will be printed)
  3. Update the ipfsABIsHash variable in /src/redux/libs/ipfs.js to the IPFS multihash

more info


Directory structure

|
├── docs - Documentation
├── public - Files that don't get compiled, just moved to build
|  └── index.html - Html template file
├── scripts
|  └── abis - TCR contract JSON ABIs
├── src
|  ├── config - Config data
|  ├── redux - Redux-related
|  |  ├── libs - Framework-agnostic libraries
|  |  ├── modules - Redux modules
|  |  |  ├── [module] - Single Redux module
|  |  |  |  ├── sagas - Asynchronous side-effects
|  |  |  |  ├── tests - Jest unit tests
|  |  |  |  ├── actions.js - Action creators / plain objects
|  |  |  |  ├── index.js - Duck root import / export
|  |  |  |  ├── reducers.js - Pure functions / immutable.js
|  |  |  |  ├── selectors.js - State selectors / reselect.js
|  |  |  |  ├── types.js - Action types / string constants
|  |  |  |  └── utils.js - Module-specific helpers
|  |  |  ├── index.js - Ducks root
|  |  |  └── reducers - Reducer combiner
|  |  ├── utils - Common utility helper functions
|  |  ├── store.js - Redux reducer and middleware injector
|  ├── views - React
|  |  ├── assets - Images, fonts, etc.
|  |  ├── components - Stateless, dumb components
|  |  ├── containers - Stateful, smart containers
|  |  ├── translations - Language JSON dictionaries
|  |  ├── App.js - Root React component
|  |  └── global-styles.js - Theme / colors
|  └── index.js - Entry point for app
└── server.js - Express.js app

Docs


Resources

Articles

Code

Community


Acknowledgements

Aragon-ui

0x.js

Augur

MyCrypto

UDAPP


Workflow diagrams

These workflow diagrams were created by our wonderful designer, Eva Shon

Simple overview

Detailed workflow


License

This project is licensed under the MIT license, Copyright (c) 2018 Isaac Kang. For more information see LICENSE.