Skip to content
This repository has been archived by the owner on Jun 10, 2019. It is now read-only.

Commit

Permalink
Update registry
Browse files Browse the repository at this point in the history
  • Loading branch information
karlfloersch committed Feb 1, 2019
1 parent d3f361d commit e4934dc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config.json
@@ -1,6 +1,6 @@
{
"dbDir": "./operator-db",
"plasmaRegistryAddress": "0xFD1c85D8D261eFcc627d87693fFd3fDfb205F9c3",
"plasmaRegistryAddress": "0x18d8BD44a01fb8D5f295a2B3Ab15789F26385df7",
"plasmaChainName": "I <3 Plasma",
"operatorIpAddress": "0.0.0.0",
"port": "3000",
Expand Down
4 changes: 2 additions & 2 deletions package.json
@@ -1,10 +1,10 @@
{
"name": "plasma-chain",
"version": "0.0.16",
"version": "0.0.17",
"description": "Plasma operator & simple REST server",
"main": "index.js",
"scripts": {
"start": "node src/run-server.js",
"plasma-chain": "./bin/plasma-chain.js",
"clean": "rm -rf db",
"interactive": "node",
"test": "env CONFIG='./config-test.json' NODE_ENV='test' mocha --timeout 200000 --recursive",
Expand Down
8 changes: 4 additions & 4 deletions src/eth-service.js
Expand Up @@ -106,9 +106,9 @@ async function initializeTestingEnv (config) {
async function deployNewPlasmaRegistry (config) {
// Deploy a new PlasmaRegistry. This requires first deploying a dummy Plasma Chain
// We have the compiled contracts, let's create objects for them...
const plasmaSerializerCt = new es.web3.eth.Contract(serializerCompiled.abi, es.operatorAddress, {from: es.operatorAddress, gas: 7000000, gasPrice: '50000000000'})
const plasmaChainCt = new es.web3.eth.Contract(plasmaChainCompiled.abi, es.operatorAddress, {from: es.operatorAddress, gas: 7000000, gasPrice: '50000000000'})
const plasmaRegistryCt = new es.web3.eth.Contract(plasmaRegistryCompiled.abi, es.operatorAddress, {from: es.operatorAddress, gas: 7000000, gasPrice: '50000000000'})
const plasmaSerializerCt = new es.web3.eth.Contract(serializerCompiled.abi, es.operatorAddress, {from: es.operatorAddress, gas: 7000000, gasPrice: '5000000000'})
const plasmaChainCt = new es.web3.eth.Contract(plasmaChainCompiled.abi, es.operatorAddress, {from: es.operatorAddress, gas: 7000000, gasPrice: '5000000000'})
const plasmaRegistryCt = new es.web3.eth.Contract(plasmaRegistryCompiled.abi, es.operatorAddress, {from: es.operatorAddress, gas: 7000000, gasPrice: '5000000000'})
const serializer = await plasmaSerializerCt.deploy({ data: serializerCompiled.bytecode }).send()
// To set up the Plasma Network, we need to first deploy a Plasma Chain contract
const plasmaChain = await plasmaChainCt.deploy({ data: plasmaChainCompiled.bytecode }).send()
Expand Down Expand Up @@ -162,7 +162,7 @@ async function deployNewPlasmaChain (web3, config) {
if (config.web3HttpProvider !== undefined && config.web3HttpProvider.includes('rinkeby')) {
console.log('View transaction progress on Etherscan:', 'https://rinkeby.etherscan.io/address/'.blue + es.operatorAddress.blue)
}
createPChainReciept = await plasmaRegistry.methods.createPlasmaChain(es.operatorAddress, Buffer.from(config.plasmaChainName), Buffer.from(config.operatorIpAddress)).send({ from: es.operatorAddress, gas: 7000000, gasPrice: '50000000000' })
createPChainReciept = await plasmaRegistry.methods.createPlasmaChain(es.operatorAddress, Buffer.from(config.plasmaChainName), Buffer.from(config.operatorIpAddress)).send({ from: es.operatorAddress, gas: 7000000, gasPrice: '5000000000' })
} catch (err) {
if (err.toString().includes('gas * price')) {
console.log('ERROR DEPLOYING CHAIN'.red, '\nYou do not have enough ETH to pay for the deployment.\nGet some using a faucet (https://faucet.rinkeby.io/)')
Expand Down

0 comments on commit e4934dc

Please sign in to comment.