diff --git a/lib/core/config.js b/lib/core/config.js index 3d76147a3..86a51df30 100644 --- a/lib/core/config.js +++ b/lib/core/config.js @@ -45,6 +45,7 @@ Config.prototype.loadConfigFiles = function(options) { this.loadBlockchainConfigFile(); this.loadStorageConfigFile(); this.loadCommunicationConfigFile(); + this.loadNameSystemConfigFile(); this.loadContractsConfigFile(); this.loadPipelineConfigFile(); @@ -61,6 +62,7 @@ Config.prototype.reloadConfig = function() { this.loadBlockchainConfigFile(); this.loadStorageConfigFile(); this.loadCommunicationConfigFile(); + this.loadNameSystemConfigFile(); this.loadContractsConfigFile(); this.loadPipelineConfigFile(); this.loadContractsConfigFile(); @@ -205,6 +207,16 @@ Config.prototype.loadStorageConfigFile = function() { this.storageConfig = this._mergeConfig(configFilePath, configObject, this.env); }; +Config.prototype.loadNameSystemConfigFile = function() { + // todo: spec out names for registration in the file itself for a dev chain + var configObject = { + "default": { + "available_providers": ["ens"], + "provider": "ens" + } + } +} + Config.prototype.loadCommunicationConfigFile = function() { var configObject = { "default": { diff --git a/lib/core/engine.js b/lib/core/engine.js index 37ca5c0ea..1c90f6933 100644 --- a/lib/core/engine.js +++ b/lib/core/engine.js @@ -105,6 +105,7 @@ class Engine { "deployment": this.deploymentService, "fileWatcher": this.fileWatchService, "webServer": this.webServerService, + "namingSystem": this.namingSystem, "ipfs": this.ipfsService, "web3": this.web3Service, "libraryManager": this.libraryManagerService, diff --git a/lib/index.js b/lib/index.js index 3245ac938..17895ffb1 100644 --- a/lib/index.js +++ b/lib/index.js @@ -135,6 +135,7 @@ class Embark { engine.startService("pipeline"); engine.startService("deployment"); engine.startService("codeGenerator"); + engine.startService("namingSystem"); // TODO: this should be just 'storage' and the storage should figure out the module engine.startService(engine.config.storageConfig.provider);