mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-10 05:56:00 +00:00
small cleanups
This commit is contained in:
parent
b7bb62b9ad
commit
95345e25e3
@ -5,6 +5,8 @@ const async = require('async');
|
|||||||
const embarkJsUtils = require('embarkjs').Utils;
|
const embarkJsUtils = require('embarkjs').Utils;
|
||||||
const reverseAddrSuffix = '.addr.reverse';
|
const reverseAddrSuffix = '.addr.reverse';
|
||||||
|
|
||||||
|
const reverseAddrSuffix = '.addr.reverse';
|
||||||
|
|
||||||
class ENS {
|
class ENS {
|
||||||
constructor(embark, _options) {
|
constructor(embark, _options) {
|
||||||
this.env = embark.env;
|
this.env = embark.env;
|
||||||
@ -223,7 +225,7 @@ class ENS {
|
|||||||
|
|
||||||
async.each(Object.keys(self.registration.subdomains), (subDomainName, eachCb) => {
|
async.each(Object.keys(self.registration.subdomains), (subDomainName, eachCb) => {
|
||||||
const address = self.registration.subdomains[subDomainName];
|
const address = self.registration.subdomains[subDomainName];
|
||||||
const reverseNode = utils.soliditySha3(address.toLowerCase().substr(2) + '.addr.reverse');
|
const reverseNode = utils.soliditySha3(address.toLowerCase().substr(2) + reverseAddrSuffix);
|
||||||
register(ens, registrar, resolver, defaultAccount, subDomainName, self.registration.rootDomain,
|
register(ens, registrar, resolver, defaultAccount, subDomainName, self.registration.rootDomain,
|
||||||
reverseNode, address, self.logger, eachCb);
|
reverseNode, address, self.logger, eachCb);
|
||||||
}, cb);
|
}, cb);
|
||||||
@ -427,7 +429,7 @@ class ENS {
|
|||||||
"onDeploy": [
|
"onDeploy": [
|
||||||
`ENSRegistry.methods.setOwner('${rootNode}', web3.eth.defaultAccount).send().then(() => {
|
`ENSRegistry.methods.setOwner('${rootNode}', web3.eth.defaultAccount).send().then(() => {
|
||||||
ENSRegistry.methods.setResolver('${rootNode}', "$Resolver").send();
|
ENSRegistry.methods.setResolver('${rootNode}', "$Resolver").send();
|
||||||
var reverseNode = web3.utils.soliditySha3(web3.eth.defaultAccount.toLowerCase().substr(2) + '.addr.reverse');
|
var reverseNode = web3.utils.soliditySha3(web3.eth.defaultAccount.toLowerCase().substr(2) + '${reverseAddrSuffix}');
|
||||||
ENSRegistry.methods.setResolver(reverseNode, "$Resolver").send();
|
ENSRegistry.methods.setResolver(reverseNode, "$Resolver").send();
|
||||||
Resolver.methods.setAddr('${rootNode}', web3.eth.defaultAccount).send();
|
Resolver.methods.setAddr('${rootNode}', web3.eth.defaultAccount).send();
|
||||||
Resolver.methods.setName(reverseNode, '${this.registration.rootDomain}').send();
|
Resolver.methods.setName(reverseNode, '${this.registration.rootDomain}').send();
|
||||||
|
@ -38,7 +38,7 @@ contract("ENS", function () {
|
|||||||
}
|
}
|
||||||
clearInterval(wait);
|
clearInterval(wait);
|
||||||
done();
|
done();
|
||||||
}, 100);
|
}, 500);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should have registered embark.eth", async function () {
|
it("should have registered embark.eth", async function () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user