diff --git a/lib/contracts/deploy_manager.js b/lib/contracts/deploy_manager.js index d40aa13c..8f9d6abc 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 d480fc2c..9227b2fe 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(() => {