mirror of https://github.com/embarklabs/embark.git
only add & deploy fifs register if it's actually a non live env
This commit is contained in:
parent
3b6251eeb1
commit
78814dc9d6
|
@ -286,21 +286,23 @@ class ENS {
|
||||||
|
|
||||||
if (this.registration && this.registration.rootDomain) {
|
if (this.registration && this.registration.rootDomain) {
|
||||||
// Register root domain if it is defined
|
// Register root domain if it is defined
|
||||||
const rootNode = namehash.hash(this.registration.rootDomain);
|
if (this.isDev || this.env === 'privatenet' || this.env ==='development') {
|
||||||
config.default.contracts['FIFSRegistrar'] = {
|
const rootNode = namehash.hash(this.registration.rootDomain);
|
||||||
"deploy": true,
|
config.default.contracts['FIFSRegistrar'] = {
|
||||||
"silent": true,
|
"deploy": true,
|
||||||
"args": ["$ENSRegistry", rootNode],
|
"silent": true,
|
||||||
"onDeploy": [
|
"args": ["$ENSRegistry", rootNode],
|
||||||
`ENSRegistry.methods.setOwner('${rootNode}', web3.eth.defaultAccount).send({from: web3.eth.defaultAccount}).then(() => {
|
"onDeploy": [
|
||||||
|
`ENSRegistry.methods.setOwner('${rootNode}', web3.eth.defaultAccount).send({from: web3.eth.defaultAccount}).then(() => {
|
||||||
ENSRegistry.methods.setResolver('${rootNode}', "$Resolver").send({from: web3.eth.defaultAccount});
|
ENSRegistry.methods.setResolver('${rootNode}', "$Resolver").send({from: web3.eth.defaultAccount});
|
||||||
var reverseNode = web3.utils.soliditySha3(web3.eth.defaultAccount.toLowerCase().substr(2) + '${reverseAddrSuffix}');
|
var reverseNode = web3.utils.soliditySha3(web3.eth.defaultAccount.toLowerCase().substr(2) + '${reverseAddrSuffix}');
|
||||||
ENSRegistry.methods.setResolver(reverseNode, "$Resolver").send({from: web3.eth.defaultAccount});
|
ENSRegistry.methods.setResolver(reverseNode, "$Resolver").send({from: web3.eth.defaultAccount});
|
||||||
Resolver.methods.setAddr('${rootNode}', web3.eth.defaultAccount).send({from: web3.eth.defaultAccount});
|
Resolver.methods.setAddr('${rootNode}', web3.eth.defaultAccount).send({from: web3.eth.defaultAccount});
|
||||||
Resolver.methods.setName(reverseNode, '${this.registration.rootDomain}').send({from: web3.eth.defaultAccount});
|
Resolver.methods.setName(reverseNode, '${this.registration.rootDomain}').send({from: web3.eth.defaultAccount});
|
||||||
})`
|
})`
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
config.privatenet = config.development;
|
config.privatenet = config.development;
|
||||||
this.embark.registerContractConfiguration(config);
|
this.embark.registerContractConfiguration(config);
|
||||||
|
|
Loading…
Reference in New Issue