Skip to content

Commit 381896c

Browse files
committed
Merge branch 'develop'
2 parents 87a8fc7 + b383c24 commit 381896c

File tree

9 files changed

+26
-11
lines changed

9 files changed

+26
-11
lines changed

bin/embark

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var deploy = function(env, embarkConfig) {
2929
}
3030

3131
program
32-
.version('0.9.1')
32+
.version('0.9.2')
3333

3434
program.command('new [name]').description('New application').action(function(name) {
3535
if (name === undefined) {

boilerplate/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
node_modules/
2-
chains/development.json
2+
config/chains/development.json

boilerplate/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"license": "ISC",
1111
"homepage": "",
1212
"devDependencies": {
13-
"embark-framework": "^0.9.1",
14-
"grunt-embark": "^0.4.1",
13+
"embark-framework": "^0.9.2",
14+
"grunt-embark": "^0.4.3",
1515
"grunt-contrib-clean": "^0.6.0",
1616
"grunt-contrib-coffee": "^0.13.0",
1717
"grunt-contrib-concat": "^0.5.1",

demo/config/blockchain.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ staging:
1919
rpc_whitelist: "*"
2020
datadir: default
2121
network_id: 0
22+
deploy_timeout: 45
2223
console: true
2324
account:
2425
init: false

lib/compiler.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,20 @@ Compiler.prototype.init = function(env) {
2121
};
2222

2323
Compiler.prototype.compile_solidity = function(contractFile) {
24-
var cmd, result, output, json, compiled_object;
24+
var cmd, result, output, version, json, compiled_object;
25+
26+
cmd = "solc --version";
27+
28+
result = exec(cmd, {silent: true});
29+
output = result.output;
30+
version = output.split('\n')[1].split(' ')[1].slice(0,5);
2531

26-
cmd = "solc --input-file " + contractFile + " --combined-json binary,json-abi";
32+
if (version == '0.1.1') {
33+
cmd = "solc --input-file " + contractFile + " --combined-json binary,json-abi";
34+
}
35+
else {
36+
cmd = "solc --input-file " + contractFile + " --combined-json bin,abi";
37+
}
2738

2839
result = exec(cmd, {silent: true});
2940
output = result.output;
@@ -39,9 +50,9 @@ Compiler.prototype.compile_solidity = function(contractFile) {
3950
var contract = json[className];
4051

4152
compiled_object[className] = {};
42-
compiled_object[className].code = contract.binary;
53+
compiled_object[className].code = contract.binary || contact.bin;
4354
compiled_object[className].info = {};
44-
compiled_object[className].info.abiDefinition = JSON.parse(contract["json-abi"]);
55+
compiled_object[className].info.abiDefinition = JSON.parse(contract["abi"] || contract["json-abi"]);
4556
}
4657

4758
return compiled_object;

lib/config/blockchain.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ BlockchainConfig.prototype.config = function(env) {
4141
genesisBlock: config.genesis_block,
4242
datadir: config.datadir,
4343
chains: config.chains,
44+
deployTimeout: config.deploy_timeout || 20,
4445
networkId: networkId,
4546
maxPeers: 4,
4647
port: config.port || "30303",

lib/deploy.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Deploy.prototype.deploy_contract = function(contractObject, contractParams) {
3939
while ((receipt = web3.eth.getTransactionReceipt(transactionHash)) === null || receipt.contractAddress === null) {
4040
sleep(1000);
4141
time += 1;
42-
if (time >= 20) {
42+
if (time >= this.blockchainConfig.deployTimeout) {
4343
return false;
4444
}
4545
}
@@ -176,4 +176,3 @@ Deploy.prototype.generate_and_write_abi_file = function(destFile) {
176176
};
177177

178178
module.exports = Deploy;
179-

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "embark-framework",
3-
"version": "0.9.1",
3+
"version": "0.9.2",
44
"description": "",
55
"scripts": {
66
"test": "echo \"Error: no test specified\" && exit 1"

test/config.blockchain.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ describe('embark.config.blockchain', function() {
4444
genesis_block: 'config/genesis.json',
4545
datadir: '/tmp/embark',
4646
chains: 'chains_development.json',
47+
deploy_timeout: 45,
4748
mine_when_needed: true,
4849
gas_limit: 123,
4950
gas_price: 100,
@@ -69,6 +70,7 @@ describe('embark.config.blockchain', function() {
6970
genesisBlock: 'config/genesis.json',
7071
datadir: '/tmp/embark',
7172
chains: 'chains_development.json',
73+
deployTimeout: 45,
7274
networkId: 0,
7375
maxPeers: 4,
7476
port: "30303",
@@ -114,6 +116,7 @@ describe('embark.config.blockchain', function() {
114116
genesisBlock: undefined,
115117
datadir: '/tmp/embark',
116118
chains: undefined,
119+
deployTimeout: 20,
117120
networkId: 0,
118121
maxPeers: 4,
119122
port: "30303",

0 commit comments

Comments
 (0)