From 4ecb44e1c993d2e8974c1a495453cebb3c3f3528 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Fri, 27 Jul 2018 13:06:36 -0400 Subject: [PATCH] prepare to make it a module --- lib/contracts/deploy_manager.js | 8 ++++---- lib/core/engine.js | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/contracts/deploy_manager.js b/lib/contracts/deploy_manager.js index 8f9d6abc3..fc6b23748 100644 --- a/lib/contracts/deploy_manager.js +++ b/lib/contracts/deploy_manager.js @@ -5,13 +5,13 @@ const utils = require('../utils/utils.js'); //require("../utils/debug_util.js")(__filename, async); class DeployManager { - constructor(options) { + constructor(embark, options) { const self = this; - this.config = options.config; - this.logger = options.logger; + this.config = embark.config; + this.logger = embark.logger; this.blockchainConfig = this.config.blockchainConfig; - this.events = options.events; + this.events = embark.events; this.plugins = options.plugins; this.blockchain = options.blockchain; this.gasLimit = false; diff --git a/lib/core/engine.js b/lib/core/engine.js index 9227b2fe8..0598077f7 100644 --- a/lib/core/engine.js +++ b/lib/core/engine.js @@ -218,11 +218,12 @@ class Engine { const DeployManager = require('../contracts/deploy_manager.js'); this.deployManager = new DeployManager({ - blockchain: this.blockchain, config: this.config, logger: this.logger, + events: this.events + }, { + blockchain: this.blockchain, plugins: this.plugins, - events: this.events, onlyCompile: options.onlyCompile });