diff --git a/lib/modules/deployment/contract_deployer.js b/lib/modules/deployment/contract_deployer.js index 8c3a7afc..58cd3105 100644 --- a/lib/modules/deployment/contract_deployer.js +++ b/lib/modules/deployment/contract_deployer.js @@ -145,6 +145,7 @@ class ContractDeployer { let contractParams = (contract.realArgs || contract.args).slice(); let deploymentAccount = self.blockchain.defaultAccount(); let deployObject; + const logFunction = contract.silent ? self.logger.trace.bind(self.logger) : self.logger.info.bind(self.logger); async.waterfall([ // TODO: can potentially go to a beforeDeploy plugin @@ -241,7 +242,8 @@ class ContractDeployer { }, function deployTheContract(next) { let estimatedCost = contract.gas * contract.gasPrice; - self.logger.info(__("deploying") + " " + contract.className.bold.cyan + " " + __("with").green + " " + contract.gas + " " + __("gas at the price of").green + " " + contract.gasPrice + " " + __("Wei, estimated cost:").green + " " + estimatedCost + " Wei".green); + logFunction(__("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, @@ -253,7 +255,7 @@ class ContractDeployer { self.events.emit("deploy:contract:error", contract); return next(new Error("error deploying =" + contract.className + "= due to error: " + error.message)); } - self.logger.info(contract.className.bold.cyan + " " + __("deployed at").green + " " + receipt.contractAddress.bold.cyan + " " + __("using").green + " " + receipt.gasUsed + " " + __("gas").green); + logFunction(contract.className.bold.cyan + " " + __("deployed at").green + " " + receipt.contractAddress.bold.cyan + " " + __("using").green + " " + receipt.gasUsed + " " + __("gas").green); contract.deployedAddress = receipt.contractAddress; contract.transactionHash = receipt.transactionHash; receipt.className = contract.className; diff --git a/lib/modules/ens/index.js b/lib/modules/ens/index.js index 472ea316..0bf2f23e 100644 --- a/lib/modules/ens/index.js +++ b/lib/modules/ens/index.js @@ -216,10 +216,12 @@ class ENS { "contracts": { "ENSRegistry": { "deploy": true, + "silent": true, "args": [] }, "Resolver": { "deploy": true, + "silent": true, "args": ["$ENSRegistry"] }, "FIFSRegistrar": { @@ -230,7 +232,8 @@ class ENS { "ropsten": { "contracts": { "ENSRegistry": { - "address": "0x112234455c3a32fd11230c42e7bccd4a84e02010" + "address": "0x112234455c3a32fd11230c42e7bccd4a84e02010", + "silent": true }, "Resolver": { "deploy": false @@ -243,7 +246,8 @@ class ENS { "rinkeby": { "contracts": { "ENSRegistry": { - "address": "0xe7410170f87102DF0055eB195163A03B7F2Bff4A" + "address": "0xe7410170f87102DF0055eB195163A03B7F2Bff4A", + "silent": true }, "Resolver": { "deploy": false @@ -256,7 +260,8 @@ class ENS { "livenet": { "contracts": { "ENSRegistry": { - "address": "0x314159265dd8dbb310642f98f50c066173c1259b" + "address": "0x314159265dd8dbb310642f98f50c066173c1259b", + "silent": true }, "Resolver": { "deploy": false @@ -273,6 +278,7 @@ class ENS { const rootNode = namehash.hash(this.registration.rootDomain); config.development.contracts['FIFSRegistrar'] = { "deploy": true, + "silent": true, "args": ["$ENSRegistry", rootNode], "onDeploy": [ `ENSRegistry.methods.setOwner('${rootNode}', web3.eth.defaultAccount).send().then(() => {