Skip to content
This repository was archived by the owner on Mar 16, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
59586f0
docs(readme): update description
epiqueras Mar 15, 2018
7be4aac
feat: log error actions to console
epiqueras Mar 16, 2018
cd5666d
chore(dependencies): update create-redux-form
epiqueras Mar 16, 2018
f1a43fb
chore(dependencies): update lessdux
epiqueras Mar 16, 2018
6eed010
chore(dependencies): upgrade and migrate to ganache-cli
epiqueras Mar 16, 2018
b429394
chore(setup): finish setting up project
epiqueras Mar 20, 2018
ab15efa
docs(contributing): add current priorities
epiqueras Mar 20, 2018
373912d
chore(dependencies): update kleros-scripts
epiqueras Mar 26, 2018
42d90a6
feat(components): implement first components
epiqueras Mar 27, 2018
542d599
feat(components): implement toast
epiqueras Mar 27, 2018
75b8281
feat(components): implement Stat Block
epiqueras Mar 27, 2018
a7979a2
feat(components): implement Stat Row
epiqueras Mar 27, 2018
733d101
feat(components): implement typography
epiqueras Mar 27, 2018
7341539
feat(components): implement Valuation Pie Chart
epiqueras Mar 27, 2018
f2cb861
feat(components): implement Stat Block with no label
epiqueras Mar 28, 2018
4d985ce
feat(components): implement Circle
epiqueras Mar 28, 2018
4436d52
feat(components): implement Slider
epiqueras Mar 28, 2018
dc7cc5e
feat(components): clean up Slider
epiqueras Mar 28, 2018
421b38c
feat: fetch contract data and improve navbar
epiqueras Apr 18, 2018
8ac276e
feat(info): finish IICO info panels
epiqueras Apr 18, 2018
d6291de
feat(iico): new prop types
epiqueras Apr 18, 2018
57df9e6
feat(info): add current sale phase
epiqueras Apr 19, 2018
95d2b4c
feat(iico): fetch and display user's bids
epiqueras Apr 19, 2018
f32635a
feat(iico): submit bid flow
epiqueras Apr 20, 2018
eba22ab
feat(iico): finish functionality
epiqueras Apr 20, 2018
6b452c6
fix(iico): bid parsing
epiqueras Apr 20, 2018
ff97ada
feat(iico): bid withdrawal
epiqueras Apr 20, 2018
4bcad0f
feat(iico): better UX
epiqueras Apr 20, 2018
558084a
feat(iico): granular loading and errors on failed transactions
epiqueras Apr 22, 2018
6d4240e
feat(iico): add finalize sale flow
epiqueras Apr 22, 2018
5a1558f
feat: add nice loaders
epiqueras Apr 23, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .env
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Development
REACT_APP_DEV_ETHEREUM_PROVIDER=http://localhost:8545
REACT_APP_DEV_STORE_PROVIDER=https://kleros.in
REACT_APP_DEV_ARBITRATOR_ADDRESS=<address>

# Production
REACT_APP_PROD_ETHEREUM_PROVIDER=<provider>
REACT_APP_PROD_STORE_PROVIDER=<provider>
REACT_APP_PROD_ARBITRATOR_ADDRESS=<address>
8 changes: 6 additions & 2 deletions .storybook/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@ import { host } from 'storybook-host'
import { combineReducers, applyMiddleware, createStore } from 'redux'
import { Provider } from 'react-redux'
import { MemoryRouter } from 'react-router-dom'
import ReduxToastr, { reducer as toastr } from 'react-redux-toastr'

import GlobalComponents from '../src/bootstrap/global-components'

import '../src/bootstrap/app.css'

// Storybook Host
addDecorator(
host({
title: 'Dapp Front Boilerplate UI-Kit',
title: 'OpenIICO UI-Kit',
align: 'center middle'
})
)

// Integration Wrapper
const store = createStore(
combineReducers({}),
combineReducers({ toastr }),
applyMiddleware(store => next => action => {
console.log(action)
return next(action)
Expand All @@ -28,6 +31,7 @@ addDecorator(story => (
<div>
{console.log(store.getState())}
<MemoryRouter initialEntries={['/']}>{story()}</MemoryRouter>
<GlobalComponents />
</div>
</Provider>
))
Expand Down
4 changes: 1 addition & 3 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const { join } = require('path')

module.exports = {
module: {
rules: [
Expand All @@ -8,7 +6,7 @@ module.exports = {
use: ['style-loader', 'css-loader']
},
{
test: /\.png$/,
test: /\.(woff|woff2|png)$/,
use: ['url-loader']
}
]
Expand Down
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
See [kleros.md](https://kleros.gitbooks.io/kleros-md).

Additionally, This project also uses [lessdux](https://github.com/kleros/lessdux) and [create-redux-form](https://github.com/kleros/create-redux-form).

## Development Priorities

1. Deploy contracts on a test net and decide on where to fetch the ABI from. `easy to delegate`
2. Finish code for interfacing with a "standard" compliant contract and display all the raw data needed for visualizations.
3. Finish the code for all user actions, i.e. bid, withdraw, etc.
4. Use raw data to create nice data visualizations using WebGL, D3, etc; previews; and summaries. `easy to delegate`
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
<a href="https://github.com/prettier/prettier"><img src="https://img.shields.io/badge/styled_with-prettier-ff69b4.svg" alt="Styled with Prettier"></a>
</p>

A boilerplate for Ethereum dapps.
A dapp for participating in interactive coin offerings.

## Get Started

1. Clone this repo.
2. Install and set up the [MetaMask](https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en) chrome extension.
3. Configure MetaMask on the Kovan Test Network.
4. Run `yarn` to install dependencies and then `yarn start` to start the dev server.
1. Clone this repo.
2. Install and set up the [MetaMask](https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en) chrome extension.
3. Configure MetaMask on the Kovan Test Network.
4. Run `yarn` to install dependencies and then `yarn start` to start the dev server.

## Other Scripts

Expand Down
23 changes: 13 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
"start:scss": "yarn run build:scss && yarn run build:scss --watch",
"start:js": "react-scripts start",
"start:storybook": "start-storybook -p 9001 -c .storybook",
"storybook": "npm-run-all -p start:scss start:storybook",
"storybook": "run-p start:scss start:storybook",
"build:scss": "node-sass-chokidar ./src -o ./src",
"build:js": "react-scripts build",
"start": "npm-run-all -p start:scss start:js",
"build": "npm-run-all build:scss build:js",
"start": "run-p start:scss start:js",
"build": "yarn run build:scss && yarn run build:js",
"build:analyze": "source-map-explorer build/static/js/main.*"
},
"jest": {
Expand All @@ -41,9 +41,9 @@
},
"devDependencies": {
"@dump247/storybook-state": "^1.2.1",
"@storybook/addon-actions": "^3.3.11",
"@storybook/addon-actions": "^3.3.10",
"@storybook/addon-storyshots": "^3.3.10",
"@storybook/addons": "^3.3.11",
"@storybook/addons": "^3.3.10",
"@storybook/react": "^3.3.10",
"@storybook/storybook-deployer": "^2.2.0",
"coveralls": "^3.0.0",
Expand All @@ -53,10 +53,10 @@
"esdoc-ecmascript-proposal-plugin": "^1.0.0",
"esdoc-standard-plugin": "^1.0.0",
"eslint-plugin-react": "^7.6.1",
"ethereumjs-testrpc": "^6.0.3",
"ganache-cli": "^6.1.0",
"husky": "^0.14.3",
"jest-enzyme": "^4.0.2",
"kleros-scripts": "^0.4.0",
"kleros-scripts": "^0.5.0",
"node-sass-chokidar": "^0.0.3",
"npm-run-all": "^4.1.2",
"prettier": "^1.10.2",
Expand All @@ -70,21 +70,24 @@
"timezone-mock": "^0.0.7"
},
"dependencies": {
"create-redux-form": "^0.1.1",
"create-redux-form": "^0.1.2",
"ethjs": "^0.3.3",
"ethjs-unit": "^0.1.6",
"history": "^4.7.2",
"lessdux": "^0.1.2",
"lessdux": "^0.4.1",
"normalize.css": "^7.0.0",
"react": "^16.2.0",
"react-addons-css-transition-group": "^15.6.2",
"react-blockies": "^1.2.2",
"react-dom": "^16.2.0",
"react-helmet": "^5.2.0",
"react-minimal-pie-chart": "^3.0.1",
"react-redux": "^5.0.6",
"react-redux-toastr": "^7.2.3",
"react-router-dom": "^4.2.2",
"react-router-redux": "^5.0.0-alpha.9",
"react-scripts": "1.1.0",
"react-spinners": "^0.3.2",
"react-tooltip": "^3.4.0",
"redux": "^3.7.2",
"redux-form": "^7.2.3",
"redux-saga": "^0.16.0"
Expand Down
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>Dapp Front Boilerplate</title>
<title>Open IICO</title>
</head>

<body>
Expand Down
4 changes: 2 additions & 2 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"short_name": "Dapp Front Boilerplate",
"name": "Dapp Front Boilerplate",
"short_name": "Open IICO",
"name": "Open IICO",
"icons": [
{
"src": "favicon.ico",
Expand Down
56 changes: 56 additions & 0 deletions src/actions/iico.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import { createActions } from 'lessdux'

/* Actions */

// IICO Data
export const IICOData = {
...createActions('$IICO$_DATA', { withUpdate: true }),
CLEAR: 'CLEAR_$IICO$_DATA',
FINALIZE: 'FINALIZE_$IICO$_DATA'
}

// IICO Bids
export const IICOBids = createActions('$IICO$_BIDS')

// IICO Bid
export const IICOBid = {
...createActions('$IICO$_BID', {
withCreate: true,
withUpdate: true
}),
WITHDRAW: 'WITHDRAW_$IICO$_BID',
REDEEM: 'REDEEM_$IICO$_BID'
}

/* Action Creators */

// IICO Data
export const clearIICOData = () => ({ type: IICOData.CLEAR })
export const fetchIICOData = address => ({
type: IICOData.FETCH,
payload: { address }
})
export const finalizeIICOData = (address, maxIterations) => ({
type: IICOData.FINALIZE,
payload: { address, maxIterations }
})

// IICO Bids
export const fetchIICOBids = address => ({
type: IICOBids.FETCH,
payload: { address }
})

// IICO Bid
export const createIICOBid = (address, amount, personalCap) => ({
type: IICOBid.CREATE,
payload: { address, amount, personalCap }
})
export const withdrawIICOBid = (address, contributorBidID) => ({
type: IICOBid.WITHDRAW,
payload: { address, contributorBidID }
})
export const redeemIICOBid = (address, contributorBidID) => ({
type: IICOBid.REDEEM,
payload: { address, contributorBidID }
})
Loading