Skip to content

Commit

Permalink
Combine all contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
boczeratul committed Apr 12, 2019
1 parent 9028b5e commit 09ed38c
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 64 deletions.
2 changes: 1 addition & 1 deletion app/containers/App/Console.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Console extends PureComponent {

componentDidMount() {
this.updateList();
setInterval(this.updateList, 10000);
setInterval(this.updateList, 5000);
}

// setBodyRef = (ref) => {
Expand Down
8 changes: 3 additions & 5 deletions app/containers/App/Timer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ import styled from 'styled-components';
import moment from 'moment';

import { Container, Header } from '@/components/Mux';
import { times } from '../../../constants';

const LAUNCH_TIME = 1556164800000;
import { times, launchTime } from '../../../constants';

const HorizontalContainer = styled.div`
display: flex;
Expand All @@ -30,7 +28,7 @@ const findNext = () => times.find(time => time * 1000 > Date.now()) * 1000 || 0;

class Timer extends PureComponent {
state = {
mainnetDuration: LAUNCH_TIME - Date.now(),
mainnetDuration: launchTime - Date.now(),
drawDuration: findNext() - Date.now(),
};

Expand All @@ -42,7 +40,7 @@ class Timer extends PureComponent {
const nextTime = findNext();

this.setState({
mainnetDuration: LAUNCH_TIME - Date.now(),
mainnetDuration: launchTime - Date.now(),
drawDuration: nextTime - Date.now(),
});
}
Expand Down
134 changes: 77 additions & 57 deletions constants.js
Original file line number Diff line number Diff line change
@@ -1,65 +1,85 @@
const address = '0xccc538a0DceA6608F8F7EBF649cFB550f2223230';
const address = '0xe8caa1c171bf3eebb8c6ce0cc45c3d6498d73298';
// const times = [
// 1555570800, // 4/18 15:00
// 1555581600, // 4/18 18:00
// 1555592400, // 4/18 21:00
// 1555603200, // 4/19 0:00
// 1555614000, // 4/19 3:00
// 1555624800, // 4/19 6:00
// 1555635600, // 4/19 9:00
// 1555646400, // 4/19 12:00
// 1555657200, // 4/19 15:00
// 1555668000, // 4/19 18:00
// 1555678800, // 4/19 21:00
// 1555689600, // 4/20 0:00
// 1555700400, // 4/20 3:00
// 1555711200, // 4/20 6:00
// 1555722000, // 4/20 9:00
// 1555732800, // 4/20 12:00
// 1555743600, // 4/20 15:00
// 1555754400, // 4/20 18:00
// 1555765200, // 4/20 21:00
// 1555776000, // 4/21 0:00
// 1555786800, // 4/21 3:00
// 1555797600, // 4/21 6:00
// 1555808400, // 4/21 9:00
// 1555819200, // 4/21 12:00
// 1555830000, // 4/21 15:00
// 1555840800, // 4/21 18:00
// 1555851600, // 4/21 21:00
// 1555862400, // 4/22 0:00
// 1555873200, // 4/22 3:00
// 1555884000, // 4/22 6:00
// 1555894800, // 4/22 9:00
// 1555905600, // 4/22 12:00
// 1555916400, // 4/22 15:00
// 1555927200, // 4/22 18:00
// 1555938000, // 4/22 21:00
// 1555948800, // 4/23 0:00
// 1555959600, // 4/23 3:00
// 1555970400, // 4/23 6:00
// 1555981200, // 4/23 9:00
// 1555992000, // 4/23 12:00
// 1556002800, // 4/23 15:00
// 1556013600, // 4/23 18:00
// 1556024400, // 4/23 21:00
// 1556035200, // 4/24 0:00
// 1556046000, // 4/24 3:00
// 1556056800, // 4/24 6:00
// 1556067600, // 4/24 9:00
// 1556078400, // 4/24 12:00
// 1556089200, // 4/24 15:00
// 1556100000, // 4/24 18:00
// 1556110800, // 4/24 21:00
// 1556121600, // 4/25 0:00
// 1556132400, // 4/25 3:00
// 1556143200, // 4/25 6:00
// 1556154000, // 4/25 9:00
// 1556164800, // 4/25 12:00
// 1556596800,
// ];
// const launchTime = 1556164800000; // 4/25 12:00

const times = [
1555570800, // 4/18 15:00
1555581600, // 4/18 18:00
1555592400, // 4/18 21:00
1555603200, // 4/19 0:00
1555614000, // 4/19 3:00
1555624800, // 4/19 6:00
1555635600, // 4/19 9:00
1555646400, // 4/19 12:00
1555657200, // 4/19 15:00
1555668000, // 4/19 18:00
1555678800, // 4/19 21:00
1555689600, // 4/20 0:00
1555700400, // 4/20 3:00
1555711200, // 4/20 6:00
1555722000, // 4/20 9:00
1555732800, // 4/20 12:00
1555743600, // 4/20 15:00
1555754400, // 4/20 18:00
1555765200, // 4/20 21:00
1555776000, // 4/21 0:00
1555786800, // 4/21 3:00
1555797600, // 4/21 6:00
1555808400, // 4/21 9:00
1555819200, // 4/21 12:00
1555830000, // 4/21 15:00
1555840800, // 4/21 18:00
1555851600, // 4/21 21:00
1555862400, // 4/22 0:00
1555873200, // 4/22 3:00
1555884000, // 4/22 6:00
1555894800, // 4/22 9:00
1555905600, // 4/22 12:00
1555916400, // 4/22 15:00
1555927200, // 4/22 18:00
1555938000, // 4/22 21:00
1555948800, // 4/23 0:00
1555959600, // 4/23 3:00
1555970400, // 4/23 6:00
1555981200, // 4/23 9:00
1555992000, // 4/23 12:00
1556002800, // 4/23 15:00
1556013600, // 4/23 18:00
1556024400, // 4/23 21:00
1556035200, // 4/24 0:00
1556046000, // 4/24 3:00
1556056800, // 4/24 6:00
1556067600, // 4/24 9:00
1556078400, // 4/24 12:00
1556089200, // 4/24 15:00
1556100000, // 4/24 18:00
1556110800, // 4/24 21:00
1556121600, // 4/25 0:00
1556132400, // 4/25 3:00
1556143200, // 4/25 6:00
1556154000, // 4/25 9:00
1556164800, // 4/25 12:00
1555045200, // 4/12 13:00
1555045500, // 4/12 13:05
1555045800, // 4/12 13:10
1555045100, // 4/12 13:15
1555046400, // 4/12 13:20
1555046700, // 4/12 13:25
1555047000, // 4/12 13:30
1555047300, // 4/12 13:35
1555047600, // 4/12 13:40
1555047900, // 4/12 13:45
1555048800, // 4/12 14:00
1556596800,
];
const launchTime = 1555048800000;


module.exports = {
address,
times,
launchTime,
};

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"webapp:build": "NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p --progress --hide-modules --display-optimization-bailout",
"contract:compile": "dexon-truffle compile",
"contract:test": "dexon-truffle test",
"contract:deploy": "dexon-truffle migrate --network=testnet --reset"
"contract:deploy": "dexon-truffle migrate --network=testnet --reset",
"contract:run": "node ./runTimer.js"
},
"dependencies": {
"@cobinhood/eslint-config-cobinhood": "^0.2.0",
Expand Down

0 comments on commit 09ed38c

Please sign in to comment.