diff --git a/cmd/cmd.js b/cmd/cmd.js index aaea0c114..ea226f5c3 100644 --- a/cmd/cmd.js +++ b/cmd/cmd.js @@ -94,7 +94,7 @@ class Cmd { .description(__('New Application')) .option('--simple', __('create a barebones project meant only for contract development')) .option('--locale [locale]', __('language to use (default: en)')) - .option('--template [url]', __('download template from a GitHub repository')) + .option('--template [name/url]', __('download a template using a known name or a GitHub repository URL')) .action(function(name, options) { i18n.setOrDetectLocale(options.locale); if (name === undefined) { @@ -300,7 +300,7 @@ class Cmd { upload() { program .command('upload [environment]') - .option('--ens [ensDomain]', __('ENS domain to associate to')) + //.option('--ens [ensDomain]', __('ENS domain to associate to')) .option('--logfile [logfile]', __('filename to output logs (default: %s)', 'none')) .option('--loglevel [loglevel]', __('level of logging to display') + ' ["error", "warn", "info", "debug", "trace"]', /^(error|warn|info|debug|trace)$/i, 'debug') .option('--locale [locale]', __('language to use (default: en)')) @@ -401,7 +401,7 @@ class Cmd { .action(function(cmd) { console.log((__('unknown command') + ' "%s"').red, cmd); let utils = require('../lib/utils/utils.js'); - let dictionary = ['new', 'demo', 'build', 'run', 'blockchain', 'simulator', 'test', 'upload', 'version']; + let dictionary = ['new', 'demo', 'build', 'run', 'blockchain', 'simulator', 'test', 'upload', 'version', 'console', 'eject-webpack', 'graph', 'help', 'reset']; let suggestion = utils.proposeAlternative(cmd, dictionary); if (suggestion) { console.log((__('did you mean') + ' "%s"?').green, suggestion); diff --git a/lib/modules/blockchain_connector/index.js b/lib/modules/blockchain_connector/index.js index ce179cce5..8d81e48c4 100644 --- a/lib/modules/blockchain_connector/index.js +++ b/lib/modules/blockchain_connector/index.js @@ -140,7 +140,7 @@ class BlockchainConnector { self.web3._requestManager.send({method: 'web3_clientVersion', params: []}, (err, version) => { if (err) { self.isWeb3Ready = false; - return next(null, {name: "Ethereum node (version unknown)", status: 'on'}); + return next(null, {name: "Ethereum node not found", status: 'off'}); } if (version.indexOf("/") < 0) { self.events.emit(WEB3_READY); diff --git a/lib/modules/deployment/contract_deployer.js b/lib/modules/deployment/contract_deployer.js index fe41b3131..4a8c5ba36 100644 --- a/lib/modules/deployment/contract_deployer.js +++ b/lib/modules/deployment/contract_deployer.js @@ -245,7 +245,7 @@ class ContractDeployer { deployObject = self.blockchain.deployContractObject(contractObject, {arguments: contractParams, data: dataCode}); } catch(e) { if (e.message.indexOf('Invalid number of parameters for "undefined"') >= 0) { - return next(new Error(__("attempted to deploy %s without specifying parameters", contract.className))); + return next(new Error(__("attempted to deploy %s without specifying parameters", contract.className)) + ". " + __("check if there are any params defined for this contract in this environment in the contracts configuration file")); } return next(new Error(e)); } @@ -267,7 +267,6 @@ class ContractDeployer { let estimatedCost = contract.gas * contract.gasPrice; self.logFunction(contract)(__("deploying") + " " + contract.className.bold.cyan + " " + __("with").green + " " + contract.gas + " " + __("gas at the price of").green + " " + contract.gasPrice + " " + __("Wei, estimated cost:").green + " " + estimatedCost + " Wei".green); - self.blockchain.deployContractFromObject(deployObject, { from: contract.deploymentAccount, gas: contract.gas, @@ -276,6 +275,9 @@ class ContractDeployer { if (error) { contract.error = error.message; self.events.emit("deploy:contract:error", contract); + if (error.message && error.message.indexOf('replacement transaction underpriced')) { + self.logger.warn("replacement transaction underpriced: This warning typically means a transaction exactly like this one is still pending on the blockchain") + } return next(new Error("error deploying =" + contract.className + "= due to error: " + error.message)); } self.logFunction(contract)(contract.className.bold.cyan + " " + __("deployed at").green + " " + receipt.contractAddress.bold.cyan + " " + __("using").green + " " + receipt.gasUsed + " " + __("gas").green);