mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-02-08 21:34:55 +00:00
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:
parent
cbe9a47662
commit
8425e9b69b
@ -281,7 +281,10 @@ Config.prototype.loadNameSystemConfigFile = function() {
|
||||
"default": {
|
||||
"available_providers": ["ens"],
|
||||
"provider": "ens",
|
||||
"enabled": true
|
||||
"enabled": true,
|
||||
"register": {
|
||||
"rootDomain": "embark"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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 ||
|
||||
@ -312,6 +310,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) + ");";
|
||||
|
Loading…
x
Reference in New Issue
Block a user