Skip to content

Commit

Permalink
Merge pull request #18 from renproject/dcc-update
Browse files Browse the repository at this point in the history
UI Update
  • Loading branch information
0x31 committed Feb 10, 2020
2 parents cdda4d4 + 3717f6a commit 9c0423c
Show file tree
Hide file tree
Showing 187 changed files with 14,950 additions and 13,849 deletions.
62 changes: 62 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2.1

executors:
default:
docker:
- image: circleci/node:10.16
working_directory: ~/command-center

commands:
install_deps:
description: "Install dependencies"
steps:
# Download and cache dependencies
- restore_cache:
name: Restore node_modules
keys:
- v1-dependencies-{{ checksum "yarn.lock" }}
- run:
name: Install dependencies
command: sudo npm install --global yarn && yarn version && yarn cache clean && (yarn install --network-concurrency 1 || yarn install --network-concurrency 1)
- run:
name: Install darknode-sol dependencies
command: cd ./node_modules/darknode-sol && (yarn install --network-concurrency 1 || yarn install --network-concurrency 1)
- save_cache:
name: Save node_modules
paths:
- node_modules
key: v1-dependencies-{{ checksum "yarn.lock" }}

test_on_local_network:
description: "Test on local network"
steps:
- run:
name: Migrate contracts
command: cd ./node_modules/darknode-sol && (yarn ganache-cli -d > /dev/null &) && sleep 5 && yarn truffle migrate && cd ../../ && yarn run test

jobs:
build:
executor: default
steps:
- checkout
- install_deps
- test_on_local_network
# - run:
# name: Build
# command: yarn run build
- run:
name: Lint
command: yarn run lint
- run:
name: Lint with warnings
command: yarn run lint:extra || true # FIXME

workflows:
build:
jobs:
- build

31 changes: 14 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
# Node / NPM / Yarn
node_modules

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Build / test artifacts
coverage
build
dist
coverageEnv
coverage.json
.coveralls.yml

# Configuration files
*.env
.env*

# OS files
.DS_Store
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--install.network-concurrency 1
37 changes: 34 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# `🎛️ Command Center`

[![Build Status](https://travis-ci.org/republicprotocol/darknode-command-center.svg?branch=master)](https://travis-ci.org/republicprotocol/darknode-command-center)
[![Build Status](https://circleci.com/gh/renproject/command-center/tree/master.svg)](https://circleci.com/gh/renproject/command-center/tree/master)

[chaosdex.renproject.io](https://chaosdex.renproject.io)
[chaosnet.renproject.io](https://chaosnet.renproject.io)

The Darknode Command Center is a front-end UI for registering, funding and monitoring darknodes, and for withdrawing rewards. It should be used along side the [Darknode CLI](https://github.com/renproject/darknode-cli).

For instructions on running a darknode, see [Darknode Rollout: Limited Participation Begins](https://medium.com/republicprotocol/a-sdarknode-rollout-limited-participation-begins-68f51d9bb865).
For instructions on running a darknode, see [Darknode Rollout: Limited Participation Begins](https://medium.com/renproject/a-sdarknode-rollout-limited-participation-begins-68f51d9bb865).

## Previews

Expand All @@ -17,3 +17,34 @@ All-darknodes page
Darknode page

![preview 2](./preview-2.png)

## Developer notes

### Project

The project is structured into [`components`](./src/components), [`store`](./src/store) and [`lib`](./src/lib).

The library (`lib`) files of note are:

* [`contractReads.ts`](./src/lib/ethereum/contractReads.ts)
* [`contractWrites.ts`](./src/lib/ethereum/contractWrites.ts)

### Tests

(see [CircleCI config](./.circleci/config.yml) for more details)

In one terminal, start a local Ethereum node by running:

```bash
cd ./node_modules/darknode-sol
yarn install
(yarn ganache-cli -d > /dev/null &)
sleep 5
yarn truffle migrate
```

In another, run:

```bash
yarn run test
```
139 changes: 82 additions & 57 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,81 +1,106 @@
{
"name": "darknode-command-center",
"name": "command-center",
"version": "0.1.0",
"private": true,
"scripts": {
"lint:unused-exports": "ts-unused-exports ./tsconfig.json",
"lint:outdated-imports": "ncu",
"lint:ts": "tslint --project ./ -t stylish --quiet",
"lint:extra": "$npm_execpath run --silent lint:unused-exports; $npm_execpath run --silent lint:outdated-imports",
"lint:all": "$npm_execpath run --silent lint:ts && $npm_execpath run --silent lint:extra",
"lint": "$npm_execpath run --silent lint:ts",
"test": "react-scripts test",
"start": "./.env || true; react-scripts start",
"build": "REACT_APP_SOURCE_VERSION=$SOURCE_VERSION react-scripts build",
"eject": "react-scripts eject"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.18",
"@fortawesome/free-brands-svg-icons": "^5.8.2",
"@fortawesome/free-regular-svg-icons": "^5.8.2",
"@fortawesome/free-solid-svg-icons": "^5.8.2",
"@fortawesome/react-fontawesome": "^0.1.4",
"@renex/fonts": "^1.0.1",
"@renex/react-components": "^1.0.21",
"@sentry/browser": "^5.4.0",
"@sentry/core": "^5.4.0",
"@types/bs58": "^4.0.0",
"@types/jest": "^24.0.13",
"@types/node": "^12.0.4",
"@fortawesome/fontawesome-svg-core": "^1.2.25",
"@fortawesome/free-brands-svg-icons": "^5.11.2",
"@fortawesome/free-regular-svg-icons": "^5.11.2",
"@fortawesome/free-solid-svg-icons": "^5.11.2",
"@fortawesome/react-fontawesome": "^0.1.7",
"@renproject/contracts": "0.3.28",
"@renproject/fonts": "^1.0.1",
"@renproject/react-components": "1.0.37",
"@renproject/ren": "^0.2.3",
"@sentry/browser": "^5.10.1",
"@sentry/core": "^5.10.1",
"@sentry/integrations": "^5.10.1",
"@types/bchaddrjs": "^0.4.0",
"@types/bs58": "^4.0.1",
"@types/filesize": "^5.0.0",
"@types/jest": "^24.0.23",
"@types/node": "^12.12.14",
"@types/query-string": "^6.3.0",
"@types/react": "^16.8.19",
"@types/react-dom": "^16.8.4",
"@types/react-redux": "^7.0.9",
"@types/react-router-dom": "^4.3.3",
"@types/underscore": "^1.8.18",
"@types/react": "^16.9.15",
"@types/react-dom": "^16.9.4",
"@types/react-redux": "^7.1.5",
"@types/react-router-dom": "^5.1.3",
"@types/react-simple-maps": "^0.12.2",
"@types/react-transition-group": "4.2",
"@types/underscore": "^1.9.4",
"axios": "^0.19.0",
"bchaddrjs": "^0.4.4",
"bignumber.js": "^9.0.0",
"bs58": "^4.0.1",
"chart.js": "^2.8.0",
"history": "^4.9.0",
"chart.js": "^2.9.3",
"filesize": "^6.0.1",
"history": "^4.10.1",
"immutable": "^4.0.0-rc.12",
"localforage": "^1.7.3",
"moment": "^2.24.0",
"node-sass": "^4.12.0",
"query-string": "^6.5.0",
"react": "^16.8.6",
"react-chartjs-2": "^2.7.6",
"react-dom": "^16.8.6",
"react-redux": "^7.0.3",
"react-router-dom": "^5.0.0",
"react-scripts": "^3.0.1",
"redux": "^4.0.1",
"redux-persist": "^5.10.0",
"node-sass": "^4.13.0",
"query-string": "^6.9.0",
"react": "^16.12.0",
"react-chartjs-2": "^2.8.0",
"react-dom": "^16.12.0",
"react-redux": "^7.1.3",
"react-router-dom": "^5.1.2",
"react-scripts": "^3.3.0",
"react-simple-maps": "^0.12.1",
"react-transition-group": "4.3",
"redux": "^4.0.4",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0",
"typesafe-actions": "^4.4.0",
"typescript": "^3.5.1",
"scrypt": "https://github.com/ren-forks/node-scrypt",
"sha3": "^2.0.0",
"typesafe-actions": "^5.1.0",
"typescript": "^3.7.3",
"unstated-next": "^1.1.0",
"wallet-address-validator": "^0.2.4",
"web3": "^1.0.0-beta.55",
"web3-core": "^1.0.0-beta.55",
"web3-eth-contract": "^1.0.0-beta.55",
"web3-provider-engine": "^15.0.0",
"web3-utils": "^1.0.0-beta.55"
"web3": "2.0.0-alpha.1",
"web3-core": "2.0.0-alpha.1",
"web3-eth": "2.0.0-alpha.1",
"web3-eth-contract": "2.0.0-alpha.1",
"web3-providers": "2.0.0-alpha.1",
"web3-utils": "2.0.0-alpha.1"
},
"devDependencies": {
"@truffle/hdwallet-provider": "^1.0.26",
"@types/chai": "^4.2.6",
"any-promise": "^1.3.0",
"npm-check-updates": "^3.1.10",
"ts-unused-exports": "^2.0.11",
"tslint": "^5.17.0",
"chai": "^4.2.0",
"darknode-sol": "https://github.com/renproject/darknode-sol#f60d23ffa59203ae13a3d99688f12fdf704eb095",
"npm-check-updates": "^3.2.2",
"ts-unused-exports": "^5.1.0",
"tslint": "^5.20.1",
"tslint-microsoft-contrib": "^6.2.0",
"tslint-react": "^4.0.0",
"underscore": "^1.9.1",
"web3-core-promievent": "^1.0.0-beta.48",
"web3-core-requestmanager": "^1.0.0-beta.37",
"web3-core-subscriptions": "^1.0.0-beta.55"
"tslint-react": "^4.1.0",
"underscore": "^1.9.1"
},
"scripts": {
"lint:unused-exports": "ts-unused-exports ./tsconfig.json",
"lint:outdated-imports": "ncu",
"lint:ts": "tslint --project ./ -t stylish --quiet",
"lint:extra": "$npm_execpath run --silent lint:unused-exports; $npm_execpath run --silent lint:outdated-imports",
"lint:all": "$npm_execpath run --silent lint:ts && $npm_execpath run --silent lint:extra",
"lint": "$npm_execpath run --silent lint:ts",
"test": "react-scripts test",
"start": "./.env || true; react-scripts start",
"build": "REACT_APP_SOURCE_VERSION=$SOURCE_VERSION react-scripts build",
"eject": "react-scripts eject"
"resolutions": {
"scrypt": "https://github.com/ren-forks/node-scrypt",
"sha3": "^2.0.0"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
],
"jest": {
"globalSetup": "./src/test/globalSetup.ts",
"globalTeardown": "./src/test/globalTeardown.ts"
}
}
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Darknode Command Center</title>
<title>Command Center</title>
</head>

<body>
Expand Down
Loading

0 comments on commit 9c0423c

Please sign in to comment.