generate storage and communication abi; disable deployment if config is disabled

This commit is contained in:
Iuri Matias 2017-02-28 20:42:03 -05:00
parent 0bdfda78ab
commit e61f0f102d
3 changed files with 10 additions and 4 deletions

View File

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

View File

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

View File

@ -1,5 +1,6 @@
{ {
"default": { "default": {
"enabled": false,
"provider": "whisper" "provider": "whisper"
} }
} }