Skip to content

Commit

Permalink
Merge pull request #12 from DaoCasino/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
alexstep authored May 23, 2018
2 parents a703bed + 6fa9f4d commit aaee7e7
Show file tree
Hide file tree
Showing 43 changed files with 14,030 additions and 849 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
data/*
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@

# dependencies
/node_modules
data/messaging/*

# misc
npm-debug.log
package-lock.json
yarn-error.log
yarn.lock
.DS_Store
4 changes: 1 addition & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
[submodule "packages/dc-messaging"]
path = packages/dc-messaging
url = [email protected]:DaoCasino/dc-messaging.git

8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ macOS Make sure you have the XCode Command Line Tools installed. These are neede
npm i -S DaoCasino/bankroller-core
```


preinstall (on ubuntu)
```
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get install -y build-essential
sudo apt-get install python2.7 git-all pkg-config libncurses5-dev libssl-dev libnss3-dev libexpat-dev
```
## Contribute

Feel free to dive in! [Open an issue](https://github.com/DaoCasino/bankroller-core/issues/new) or submit PRs.
Expand Down
22 changes: 18 additions & 4 deletions config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
const ropsten = require('./configs/ropsten/config.js')
const path = require('path')
const path = require('path')

let faucet_server = {}
let network
if (process.env.DC_NETWORK === 'local') {
network = require('./configs/local/config.js')
faucet_server.get_acc_url = 'http://localhost:8181/?get=account'
} else {
network = require('./configs/ropsten/config.js')
// faucet_server.get_acc_url = 'https://platform.dao.casino/faucet?get=account'
faucet_server.get_acc_url = 'https://platform.dao.casino/faucet2?get=account'
}


module.exports = {
wallet_pass : '1234',
loglevel: 'light',

faucet : faucet_server,

dapps_dir: path.join(path.resolve(),'./data/dapps/'),
network:ropsten
dapps_dir: path.join(path.resolve(), './data/dapps/'),
network: network
}
35 changes: 35 additions & 0 deletions configs/local/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import PayChannel from '../../lib/dapps/PayChannel'
const path = require('path')
const fs = require('fs')

const filpath = path.resolve('../protocol/build/contracts.json')
if (!fs.existsSync(filpath)) {
console.log('')
console.log('')
console.log('Cant find contracts_adressess ', filpath)
console.log('')
console.log('BANKROLLER NODE SHUT DOWN')
console.log('')
process.exit()
}

const conf = require(filpath)

const ERC20 = {
address: conf.ERC20,
abi: require( path.resolve('../protocol/build/contracts/ERC20.json') ).abi
}

module.exports = {
name : 'local',
rpc_url : 'http://localhost:9545/',

signal : '/ip4/127.0.0.1/tcp/9090/ws/p2p-websocket-star/',

contracts : {
erc20 : ERC20
},

gasPrice : 40 * 1000000000,
gasLimit : 40 * 100000
}
6 changes: 5 additions & 1 deletion configs/ropsten/config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@

module.exports = {
upd : '17.10.2017',
name : 'ropsten',
rpc_url : 'https://ropsten.infura.io/JCnK5ifEPH9qcQkX0Ahl',

// signal : '/dns4/ws-star.discovery.libp2p.io/tcp/443/wss/p2p-websocket-star',
// signal : '/ip4/46.101.244.101/tcp/9090/ws/p2p-websocket-star/',
// signal : '/ip4/146.185.173.84/tcp/9090/ws/p2p-websocket-star/',
signal : '/dns4/ws.dao.casino/tcp/443/wss/p2p-websocket-star/',

contracts: {
erc20 : require('./contracts/erc20.js'),
paychannel : require('./contracts/paychannel.js')
Expand Down
9 changes: 7 additions & 2 deletions configs/ropsten/contracts/erc20.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit aaee7e7

Please sign in to comment.