bare bones bulk registration example spec

Signed-off-by: VoR0220 <catalanor0220@gmail.com>

add registrars to system

Signed-off-by: VoR0220 <catalanor0220@gmail.com>
This commit is contained in:
VoR0220 2018-06-20 14:14:06 -05:00 committed by Iuri Matias
parent 019a564887
commit 1adb91ef65

View File

@ -14,8 +14,6 @@ class ENS {
this.namesConfig = embark.config.namesystemConfig;
this.registration = this.namesConfig.register || {};
this.embark = embark;
this.ensRegistry = null;
this.ensResolver = null;
if (this.namesConfig === {} ||
this.namesConfig.enabled !== true ||
@ -322,6 +320,22 @@ class ENS {
}
}
configureRootRegistrar() {
const self = this;
let rootNode = namehash.hash(self.registration.rootDomain);
self.embark.registerContractConfiguration({
"default": {
"gas": "auto",
"FIFSRegistrar": {
"deploy": true,
"args": ["$ENSRegistry", rootNode],
"onDeploy": ["ENSRegistry.methods.setOwner(0, FIFSRegistrar.options.address).send()"]
}
}
});
self.embark.events.request("config:contractsFiles:add", self.embark.pathToFile('./contracts/FIFSRegistrar.sol'));
}
addSetProvider(config) {
let code = "\nEmbarkJS.Names.setProvider('ens'," + JSON.stringify(config) + ");";