mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-11 14:24:24 +00:00
remove contracts manager dependency from deploy manager
This commit is contained in:
parent
1d782c0e53
commit
45f7767313
@ -34,6 +34,13 @@ class ContractsManager {
|
||||
cb(self.getContract(contractName));
|
||||
});
|
||||
|
||||
self.events.setCommandHandler("contracts:build", (configOnly, cb) => {
|
||||
self.deployOnlyOnConfig = configOnly; // temporary, should refactor
|
||||
self.build(() => {
|
||||
cb();
|
||||
});
|
||||
});
|
||||
|
||||
self.events.on("deploy:contract:error", (_contract) => {
|
||||
self.events.emit('contractsState', self.contractsState());
|
||||
});
|
||||
@ -45,6 +52,7 @@ class ContractsManager {
|
||||
self.events.on("deploy:contract:undeployed", (_contract) => {
|
||||
self.events.emit('contractsState', self.contractsState());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
build(done) {
|
||||
|
@ -10,7 +10,6 @@ class DeployManager {
|
||||
this.events = options.events;
|
||||
this.plugins = options.plugins;
|
||||
this.blockchain = options.blockchain;
|
||||
this.contractsManager = options.contractsManager;
|
||||
this.gasLimit = false;
|
||||
this.fatalErrors = false;
|
||||
this.deployOnlyOnConfig = false;
|
||||
@ -63,8 +62,7 @@ class DeployManager {
|
||||
|
||||
async.waterfall([
|
||||
function buildContracts(callback) {
|
||||
self.contractsManager.deployOnlyOnConfig = self.deployOnlyOnConfig; // temporary, should refactor
|
||||
self.contractsManager.build(() => {
|
||||
self.events.request("contracts:build", self.deployOnlyOnConfig, (cb) => {
|
||||
callback();
|
||||
});
|
||||
},
|
||||
|
@ -234,12 +234,10 @@ class Engine {
|
||||
|
||||
this.deployManager = new DeployManager({
|
||||
blockchain: this.blockchain,
|
||||
trackContracts: options.trackContracts,
|
||||
config: this.config,
|
||||
logger: this.logger,
|
||||
plugins: this.plugins,
|
||||
events: this.events,
|
||||
contractsManager: this.contractsManager,
|
||||
onlyCompile: options.onlyCompile
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user