From be3a79ce39e5db41658ecfa2d31f594a4839c81b Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Fri, 27 Jul 2018 12:48:06 -0400 Subject: [PATCH] move contract deployer to deploy manager --- lib/contracts/deploy_manager.js | 8 ++++++++ lib/core/engine.js | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/contracts/deploy_manager.js b/lib/contracts/deploy_manager.js index d40aa13cb..8f9d6abc3 100644 --- a/lib/contracts/deploy_manager.js +++ b/lib/contracts/deploy_manager.js @@ -1,5 +1,6 @@ let async = require('async'); +const ContractDeployer = require('./contract_deployer.js'); const utils = require('../utils/utils.js'); //require("../utils/debug_util.js")(__filename, async); @@ -18,6 +19,13 @@ class DeployManager { this.deployOnlyOnConfig = false; this.onlyCompile = options.onlyCompile !== undefined ? options.onlyCompile : false; + this.contractDeployer = new ContractDeployer({ + blockchain: this.blockchain, + logger: this.logger, + events: this.events, + plugins: this.plugins + }); + this.events.setCommandHandler('deploy:setGasLimit', (gasLimit) => { self.gasLimit = gasLimit; }); diff --git a/lib/core/engine.js b/lib/core/engine.js index d480fc2c8..9227b2fe8 100644 --- a/lib/core/engine.js +++ b/lib/core/engine.js @@ -226,14 +226,6 @@ class Engine { onlyCompile: options.onlyCompile }); - const ContractDeployer = require('../contracts/contract_deployer.js'); - this.contractDeployer = new ContractDeployer({ - blockchain: this.blockchain, - logger: this.logger, - events: this.events, - plugins: this.plugins - }); - this.events.on('file-event', function (fileType) { clearTimeout(self.fileTimeout); self.fileTimeout = setTimeout(() => {