From 16275f13e5c446ddd18c9c60a774297a1afe589a Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sat, 4 Mar 2017 19:17:39 -0500 Subject: [PATCH] if any account is configured in blockchain.json then use it as the default account for deploying contracts --- lib/contracts/deploy_manager.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/contracts/deploy_manager.js b/lib/contracts/deploy_manager.js index 6ea9e98f..75eff869 100644 --- a/lib/contracts/deploy_manager.js +++ b/lib/contracts/deploy_manager.js @@ -62,7 +62,8 @@ DeployManager.prototype.deployContracts = function(done) { if (err) { return callback(new Error(err)); } - web3.eth.defaultAccount = accounts[0]; + var selectedAccount = self.config.blockchainConfig.account.address; + web3.eth.defaultAccount = (selectedAccount || accounts[0]); var deploy = new Deploy({ web3: web3,