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));
|
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.on("deploy:contract:error", (_contract) => {
|
||||||
self.events.emit('contractsState', self.contractsState());
|
self.events.emit('contractsState', self.contractsState());
|
||||||
});
|
});
|
||||||
@ -45,6 +52,7 @@ class ContractsManager {
|
|||||||
self.events.on("deploy:contract:undeployed", (_contract) => {
|
self.events.on("deploy:contract:undeployed", (_contract) => {
|
||||||
self.events.emit('contractsState', self.contractsState());
|
self.events.emit('contractsState', self.contractsState());
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
build(done) {
|
build(done) {
|
||||||
|
@ -10,7 +10,6 @@ class DeployManager {
|
|||||||
this.events = options.events;
|
this.events = options.events;
|
||||||
this.plugins = options.plugins;
|
this.plugins = options.plugins;
|
||||||
this.blockchain = options.blockchain;
|
this.blockchain = options.blockchain;
|
||||||
this.contractsManager = options.contractsManager;
|
|
||||||
this.gasLimit = false;
|
this.gasLimit = false;
|
||||||
this.fatalErrors = false;
|
this.fatalErrors = false;
|
||||||
this.deployOnlyOnConfig = false;
|
this.deployOnlyOnConfig = false;
|
||||||
@ -63,8 +62,7 @@ class DeployManager {
|
|||||||
|
|
||||||
async.waterfall([
|
async.waterfall([
|
||||||
function buildContracts(callback) {
|
function buildContracts(callback) {
|
||||||
self.contractsManager.deployOnlyOnConfig = self.deployOnlyOnConfig; // temporary, should refactor
|
self.events.request("contracts:build", self.deployOnlyOnConfig, (cb) => {
|
||||||
self.contractsManager.build(() => {
|
|
||||||
callback();
|
callback();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -234,12 +234,10 @@ class Engine {
|
|||||||
|
|
||||||
this.deployManager = new DeployManager({
|
this.deployManager = new DeployManager({
|
||||||
blockchain: this.blockchain,
|
blockchain: this.blockchain,
|
||||||
trackContracts: options.trackContracts,
|
|
||||||
config: this.config,
|
config: this.config,
|
||||||
logger: this.logger,
|
logger: this.logger,
|
||||||
plugins: this.plugins,
|
plugins: this.plugins,
|
||||||
events: this.events,
|
events: this.events,
|
||||||
contractsManager: this.contractsManager,
|
|
||||||
onlyCompile: options.onlyCompile
|
onlyCompile: options.onlyCompile
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user