move contract deployer to deploy manager

This commit is contained in:
Iuri Matias 2018-07-27 12:48:06 -04:00
parent 499a3b5609
commit be3a79ce39
2 changed files with 8 additions and 8 deletions

View File

@ -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;
});

View File

@ -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(() => {