mirror of https://github.com/embarklabs/embark.git
conflict in embark js
This commit is contained in:
parent
2d0f34f215
commit
1b55af3cb7
|
@ -1,6 +1,7 @@
|
||||||
const fs = require('../../core/fs.js');
|
const fs = require('../../core/fs.js');
|
||||||
const utils = require('../../utils/utils.js');
|
const utils = require('../../utils/utils.js');
|
||||||
const namehash = require('eth-ens-namehash');
|
const namehash = require('eth-ens-namehash');
|
||||||
|
const async = require('async');
|
||||||
|
|
||||||
class ENS {
|
class ENS {
|
||||||
constructor(embark, _options) {
|
constructor(embark, _options) {
|
||||||
|
@ -14,11 +15,24 @@ class ENS {
|
||||||
this.addENSToEmbarkJS();
|
this.addENSToEmbarkJS();
|
||||||
this.configureContracts();
|
this.configureContracts();
|
||||||
|
|
||||||
self.embark.registerActionForEvent("contracts:deploy:afterAll", (cb) => {
|
self.embark.registerActionForEvent("contracts:deploy:afterAll", (cb) => {
|
||||||
self.events.request('contracts:contract', "ENSRegistry", (contract) => {
|
async.parallel([
|
||||||
|
function getENSRegistry(paraCb) {
|
||||||
|
self.events.request('contracts:contract', "ENSRegistry", (contract) => {
|
||||||
|
paraCb(null, contract);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
function getRegistrar(paraCb) {
|
||||||
|
self.events.request('contracts:contract', "FIFSRegistrar", (contract) => {
|
||||||
|
paraCb(null, contract);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
], (err, results) => {
|
||||||
let config = {
|
let config = {
|
||||||
abi: contract.abiDefinition,
|
registryAbi: results[0].abiDefinition,
|
||||||
address: contract.deployedAddress
|
registryAddress: results[0].deployedAddress,
|
||||||
|
registrarAbi: results[1].abiDefinition,
|
||||||
|
registrarAddress: results[1].deployedAddress
|
||||||
};
|
};
|
||||||
self.addSetProvider(config);
|
self.addSetProvider(config);
|
||||||
cb();
|
cb();
|
||||||
|
|
Loading…
Reference in New Issue