ability to create multiple contracts with a single password for testing purposes
This commit is contained in:
parent
775b043209
commit
6f808cfeb0
|
@ -7,20 +7,19 @@ development:
|
||||||
datadir: /tmp/embark
|
datadir: /tmp/embark
|
||||||
chains: config/chains/development.json
|
chains: config/chains/development.json
|
||||||
mine_when_needed: true
|
mine_when_needed: true
|
||||||
max_peers: 0
|
|
||||||
gas_limit: 500000
|
gas_limit: 500000
|
||||||
gas_price: 10000000000000
|
gas_price: 10000000000000
|
||||||
console: false
|
console: false
|
||||||
account:
|
account:
|
||||||
init: true
|
init: true
|
||||||
password: config/password
|
password: config/password
|
||||||
|
num: 1
|
||||||
staging:
|
staging:
|
||||||
rpc_host: localhost
|
rpc_host: localhost
|
||||||
rpc_port: 8101
|
rpc_port: 8101
|
||||||
rpc_whitelist: "*"
|
rpc_whitelist: "*"
|
||||||
datadir: default
|
datadir: default
|
||||||
network_id: 0
|
network_id: 0
|
||||||
max_peers: 4
|
|
||||||
console: true
|
console: true
|
||||||
account:
|
account:
|
||||||
init: false
|
init: false
|
||||||
|
@ -31,7 +30,6 @@ production:
|
||||||
rpc_whitelist: "*"
|
rpc_whitelist: "*"
|
||||||
datadir: default
|
datadir: default
|
||||||
network_id: 1
|
network_id: 1
|
||||||
max_peers: 4
|
|
||||||
console: true
|
console: true
|
||||||
account:
|
account:
|
||||||
init: false
|
init: false
|
||||||
|
|
|
@ -105,12 +105,15 @@ Blockchain.prototype.get_address = function() {
|
||||||
console.log("=== already initialized");
|
console.log("=== already initialized");
|
||||||
address = result.output.match(/{(\w+)}/)[1];
|
address = result.output.match(/{(\w+)}/)[1];
|
||||||
} else {
|
} else {
|
||||||
console.log("running: " + this.init_command());
|
console.log("running: " + this.init_command() + " " + this.account.num + " time(s)");
|
||||||
result = exec(this.init_command());
|
result = '';
|
||||||
address = result.output.match(/{(\w+)}/)[1];
|
for (var i = 0; i < this.account.num; i++){
|
||||||
|
result = exec(this.init_command()) + '\n';
|
||||||
|
address = result.output.match(/{(\w+)}/)[1]; //TODO: Write a proper reg expression to match multiple lines of output...not my forte
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (this.account.num > 1) return exec(this.list_command());
|
||||||
return address;
|
return address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,6 @@ BlockchainConfig.prototype.config = function(env) {
|
||||||
genesisBlock: config.genesis_block,
|
genesisBlock: config.genesis_block,
|
||||||
datadir: config.datadir,
|
datadir: config.datadir,
|
||||||
chains: config.chains,
|
chains: config.chains,
|
||||||
deployTimeout: config.deploy_timeout || 20,
|
|
||||||
networkId: networkId,
|
networkId: networkId,
|
||||||
maxPeers: 4,
|
maxPeers: 4,
|
||||||
port: config.port || "30303",
|
port: config.port || "30303",
|
||||||
|
|
Loading…
Reference in New Issue