|
|
@ -128,9 +128,16 @@ class App { |
|
|
|
launchTestrpc() { |
|
|
|
launchTestrpc() { |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
if (!this.norpc) { |
|
|
|
if (!this.norpc) { |
|
|
|
|
|
|
|
let command; |
|
|
|
|
|
|
|
|
|
|
|
const defaultRpcOptions = `--gasLimit ${gasLimitHex} --accounts ${this.accounts} --port ${this.port}`; |
|
|
|
const defaultRpcOptions = `--gasLimit ${gasLimitHex} --accounts ${this.accounts} --port ${this.port}`; |
|
|
|
const options = this.testrpcOptions || defaultRpcOptions; |
|
|
|
const options = this.testrpcOptions || defaultRpcOptions; |
|
|
|
const command = './node_modules/ethereumjs-testrpc-sc/build/cli.node.js '; |
|
|
|
const npm = './node_modules/.bin/testrpc-sc'; |
|
|
|
|
|
|
|
const yarn = './node_modules/ethereumjs-testrpc-sc/build/cli.node.js'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
shell.test('-e', yarn) |
|
|
|
|
|
|
|
? command = `${yarn} ` |
|
|
|
|
|
|
|
: command = `${npm} `; |
|
|
|
|
|
|
|
|
|
|
|
// Launch
|
|
|
|
// Launch
|
|
|
|
this.testrpcProcess = childprocess.exec(command + options, null, (err, stdout, stderr) => { |
|
|
|
this.testrpcProcess = childprocess.exec(command + options, null, (err, stdout, stderr) => { |
|
|
|