jpantunes / tcr-ui

Client-side shell to interact with token-curated registries

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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


Requirements

  • Node >= 8.0.0
  • Yarn >= 1.7.0* *npm is not supported for package management. tcr-ui uses yarn.lock to ensure sub-dependency versions are pinned. yarn is required to install node_modules

Getting started

NOTICE:

  1. This repo currently defaults to supporting the contracts compiled from this forked repo. The differences include: 1 additional string argument to both: the apply function and the _Application event emission. This means the event signature of an _Application event will ultimately be different, as the tightly-packed types are different. more details

  2. 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
  $ yarn
  $ yarn start

Tests

Run unit tests with Jest

  $ yarn test

Local blockchain/RPC (optional):

ganache-cli - localhost:8545

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

  # start local blockchain and rpc server
  $ yarn run rpc

TCR (optional):

  # clone tcr smart contracts
  > git clone https://github.com/kangarang/tcr.git
  > cd tcr

  # install node dependencies and ethpm dependencies
  > npm install

  # compile smart contracts
  > npm run compile

Deploy contracts (optional):

  # migrate contracts to local test network (port: 8545)
  > npm run deploy-ganache
  # migrate contracts to rinkeby test network (network_id: 4)
  > npm run deploy-rinkeby

Deployed TCRs

The Sunset Registry is deployed on the Rinkeby test network

The adChain Registry for publishers is deployed on Ethereum main network


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

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/config to the IPFS multihash

more info


Directory structure

|
├── design - Wireframes
├── 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
|  ├── api - Fetch data
|  ├── assets - Images, fonts, etc.
|  ├── components - Stateless, dumb components
|  ├── config - Config data
|  ├── containers - Stateful, smart containers
|  ├── 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 - Module 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
|  |  └── reducers - Reducer combiner
|  ├── stories - Storybook
|  ├── translations - Language JSON dictionaries
|  ├── utils - Common utility helper functions
|  ├── App.js - Root React component
|  ├── global-styles.js - Theme / colors
|  ├── index.js - Entry point for app
|  └── store.js - Redux reducer and middleware injector
|

Docs

Wireframes


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.

About

Client-side shell to interact with token-curated registries

License:MIT License


Languages

Language:JavaScript 99.3%Language:CSS 0.4%Language:HTML 0.3%