diff --git a/README.md b/README.md index 53b700b33..b2ff32788 100644 --- a/README.md +++ b/README.md @@ -459,9 +459,9 @@ Working with different chains You can specify which environment to deploy to: -```$ embark blockchain production``` +```$ embark blockchain livenet``` -```$ embark run production``` +```$ embark run livenet``` The environment is a specific blockchain configuration that can be managed at config/blockchain.json @@ -474,7 +474,7 @@ The environment is a specific blockchain configuration that can be managed at co "rpcPort": 8545, "rpcCorsDomain": "http://localhost:8000", "account": { - "password": "config/production/password" + "password": "config/livenet/password" } }, ... @@ -505,7 +505,7 @@ Deploying to IPFS and Swarm ====== To deploy a dapp to IPFS, all you need to do is run a local IPFS node and then run ```embark upload ipfs```. -If you want to deploy to the livenet then after configuring you account on ```config/blockchain.json``` on the ```production``` environment then you can deploy to that chain by specifying the environment ```embark ipfs production```. +If you want to deploy to the livenet then after configuring you account on ```config/blockchain.json``` on the ```livenet``` environment then you can deploy to that chain by specifying the environment ```embark ipfs livenet```. To deploy a dapp to SWARM, all you need to do is run a local SWARM node and then run ```embark upload swarm```. diff --git a/boilerplate/.gitignore b/boilerplate/.gitignore index 0b313ff8e..77bcafb1a 100644 --- a/boilerplate/.gitignore +++ b/boilerplate/.gitignore @@ -2,3 +2,4 @@ node_modules/ dist/ config/production/password +config/livenet/password diff --git a/boilerplate/config/blockchain.json b/boilerplate/config/blockchain.json index fcecfbbea..854426125 100644 --- a/boilerplate/config/blockchain.json +++ b/boilerplate/config/blockchain.json @@ -24,7 +24,7 @@ "rpcPort": 8545, "rpcCorsDomain": "http://localhost:8000", "account": { - "password": "config/production/password" + "password": "config/livenet/password" } }, "privatenet": { diff --git a/demo/.gitignore b/demo/.gitignore index 0b313ff8e..77bcafb1a 100644 --- a/demo/.gitignore +++ b/demo/.gitignore @@ -2,3 +2,4 @@ node_modules/ dist/ config/production/password +config/livenet/password diff --git a/demo/config/blockchain.json b/demo/config/blockchain.json index fcecfbbea..854426125 100644 --- a/demo/config/blockchain.json +++ b/demo/config/blockchain.json @@ -24,7 +24,7 @@ "rpcPort": 8545, "rpcCorsDomain": "http://localhost:8000", "account": { - "password": "config/production/password" + "password": "config/livenet/password" } }, "privatenet": { diff --git a/demo/package.json b/demo/package.json index d478305a5..96fa50914 100644 --- a/demo/package.json +++ b/demo/package.json @@ -10,7 +10,7 @@ "license": "ISC", "homepage": "", "devDependencies": { - "embark": "^2.2.1", + "embark": "../", "mocha": "^2.2.5" } } diff --git a/docs/deploying-to-ipfs.rst b/docs/deploying-to-ipfs.rst index a0da4f722..cb5a20a9d 100644 --- a/docs/deploying-to-ipfs.rst +++ b/docs/deploying-to-ipfs.rst @@ -4,5 +4,5 @@ Deploying to IPFS To deploy a dapp to IPFS, all you need to do is run a local IPFS node and then run ``embark upload ipfs``. If you want to deploy to the livenet then after configuring you account on ``config/blockchain.json`` on the -``production`` environment then you can deploy to that chain by -specifying the environment ``embark ipfs production``. +``livenet`` environment then you can deploy to that chain by +specifying the environment ``embark ipfs livenet``. diff --git a/docs/working-with-different-chains.rst b/docs/working-with-different-chains.rst index 1f845f4a8..7a90ea13f 100644 --- a/docs/working-with-different-chains.rst +++ b/docs/working-with-different-chains.rst @@ -3,9 +3,9 @@ Working with different chains You can specify which environment to deploy to: -``$ embark blockchain production`` +``$ embark blockchain livenet`` -``$ embark run production`` +``$ embark run livenet`` The environment is a specific blockchain configuration that can be managed at config/blockchain.json @@ -20,7 +20,7 @@ managed at config/blockchain.json "rpcPort": 8545, "rpcCorsDomain": "http://localhost:8000", "account": { - "password": "config/production/password" + "password": "config/livenet/password" } }, ... diff --git a/lib/cmd.js b/lib/cmd.js index 9df0fdd79..2e9655e89 100644 --- a/lib/cmd.js +++ b/lib/cmd.js @@ -101,30 +101,9 @@ Cmd.prototype.simulator = function() { .command('simulator') .description('run a fast ethereum rpc simulator') .option('--testrpc', 'use testrpc as the rpc simulator [default]') - .option('--ethersim', 'use ethersim as the rpc simulator') .action(function(options) { - var Sim; - - if (options.ethersim) { - try { - Sim = require('ethersim'); - } catch(e) { - console.log('EtherSim not found; Please install it with "npm install ethersim --save"'); - console.log('For more information see https://github.com/iurimatias/ethersim'); - process.exit(1); - } - Sim.startServer(); - } - else { - try { - Sim = require('ethereumjs-testrpc'); - } catch(e) { - console.log('TestRPC not found; Please install it with "npm install -g ethereumjs-testrpc'); - console.log('For more information see https://github.com/ethereumjs/testrpc'); - process.exit(1); - } - exec('testrpc'); - } + //console.log('TestRPC not found; Please install it with "npm install -g ethereumjs-testrpc'); + exec('testrpc'); }); }; diff --git a/lib/template_generator.js b/lib/template_generator.js index d7784d3bd..038b3afdb 100644 --- a/lib/template_generator.js +++ b/lib/template_generator.js @@ -6,7 +6,11 @@ var wrench = require('wrench'); var run = function(cmd) { var result = exec(cmd, {silent: true}); if (result.code !== 0) { - console.log(result.stderr); + console.log("error doing.. " + cmd); + console.log(result.output); + if (result.stderr !== undefined) { + console.log(result.stderr); + } exit(); } }; diff --git a/test/contracts.js b/test/contracts.js index fee7c441f..54d0a464d 100644 --- a/test/contracts.js +++ b/test/contracts.js @@ -47,7 +47,7 @@ describe('embark.Contratcs', function() { assert.equal(contracts[0].deploy, true); assert.deepEqual(contracts[0].args, [100]); assert.equal(contracts[0].className, "Token"); - assert.deepEqual(contracts[0].gas, 700000); + assert.deepEqual(contracts[0].gas, 725000); //assert.equal(contracts[0].gasPrice, []); // TODO: test this one assert.equal(contracts[0].type, 'file'); //assert.equal(contracts[0].abiDefinition, ''); @@ -57,7 +57,7 @@ describe('embark.Contratcs', function() { assert.equal(contracts[1].deploy, true); assert.deepEqual(contracts[1].args, [200]); assert.equal(contracts[1].className, "SimpleStorage"); - assert.deepEqual(contracts[1].gas, 700000); + assert.deepEqual(contracts[1].gas, 725000); //assert.equal(contracts[1].gasPrice, []); // TODO: test this one assert.equal(contracts[1].type, 'file'); //assert.equal(contracts[1].abiDefinition, ''); @@ -120,7 +120,7 @@ describe('embark.Contratcs', function() { // TokenStorage assert.equal(contracts[3].deploy, true); assert.deepEqual(contracts[3].args, [100, '$SimpleStorage']); - assert.deepEqual(contracts[3].gas, 700000); + assert.deepEqual(contracts[3].gas, 725000); assert.equal(contracts[3].type, 'file'); //assert.equal(contracts[3].abiDefinition, ''); //assert.equal(contracts[3].code, ''); @@ -131,7 +131,7 @@ describe('embark.Contratcs', function() { //MySimpleStorage assert.equal(contracts[0].deploy, true); assert.deepEqual(contracts[0].args, [300]); - assert.deepEqual(contracts[0].gas, 700000); + assert.deepEqual(contracts[0].gas, 725000); assert.equal(contracts[0].type, 'instance'); assert.equal(contracts[0].abiDefinition, parentContract.abiDefinition); assert.equal(contracts[0].code, parentContract.code); @@ -140,7 +140,7 @@ describe('embark.Contratcs', function() { // SimpleStorage assert.equal(contracts[2].deploy, true); assert.deepEqual(contracts[2].args, [200]); - assert.deepEqual(contracts[2].gas, 700000); + assert.deepEqual(contracts[2].gas, 725000); assert.equal(contracts[2].type, 'file'); //assert.equal(contracts[2].abiDefinition, ''); //assert.equal(contracts[2].code, ''); @@ -149,7 +149,7 @@ describe('embark.Contratcs', function() { // AnotherSimpleStorage assert.equal(contracts[1].deploy, true); assert.deepEqual(contracts[1].args, [200]); - assert.deepEqual(contracts[1].gas, 700000); + assert.deepEqual(contracts[1].gas, 725000); assert.equal(contracts[1].type, 'instance'); assert.equal(contracts[1].abiDefinition, parentContract.abiDefinition); assert.equal(contracts[1].code, parentContract.code);