generate storage and communication abi; disable deployment if config is disabled
This commit is contained in:
parent
0bdfda78ab
commit
e61f0f102d
|
@ -108,10 +108,8 @@ ABIGenerator.prototype.generateABI = function(options) {
|
||||||
|
|
||||||
result += this.generateProvider();
|
result += this.generateProvider();
|
||||||
result += this.generateContracts(options.useEmbarkJS);
|
result += this.generateContracts(options.useEmbarkJS);
|
||||||
|
result += this.generateStorageInitialization(options.useEmbarkJS);
|
||||||
// TODO: disable this for now until refactor is over
|
result += this.generateCommunicationInitialization(options.useEmbarkJS);
|
||||||
//result += this.generateStorageInitialization(options.useEmbarkJS);
|
|
||||||
//result += this.generateCommunicationInitialization(options.useEmbarkJS);
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,12 +8,19 @@ var ABIGenerator = require('./abi.js');
|
||||||
var DeployManager = function(options) {
|
var DeployManager = function(options) {
|
||||||
this.config = options.config;
|
this.config = options.config;
|
||||||
this.logger = options.logger;
|
this.logger = options.logger;
|
||||||
|
this.blockchainConfig = this.config.blockchainConfig;
|
||||||
this.plugins = options.plugins;
|
this.plugins = options.plugins;
|
||||||
this.events = options.events;
|
this.events = options.events;
|
||||||
};
|
};
|
||||||
|
|
||||||
DeployManager.prototype.deployContracts = function(done) {
|
DeployManager.prototype.deployContracts = function(done) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
if (self.blockchainConfig === {} || self.blockchainConfig.enabled === false) {
|
||||||
|
self.logger.info("Blockchain component is disabled in the config".underline);
|
||||||
|
return done();
|
||||||
|
}
|
||||||
|
|
||||||
async.waterfall([
|
async.waterfall([
|
||||||
function buildContracts(callback) {
|
function buildContracts(callback) {
|
||||||
var contractsManager = new ContractsManager({
|
var contractsManager = new ContractsManager({
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"default": {
|
"default": {
|
||||||
|
"enabled": false,
|
||||||
"provider": "whisper"
|
"provider": "whisper"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue