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 utils = require('../../utils/utils.js');
|
||||
const namehash = require('eth-ens-namehash');
|
||||
const async = require('async');
|
||||
|
||||
class ENS {
|
||||
constructor(embark, _options) {
|
||||
|
@ -14,11 +15,24 @@ class ENS {
|
|||
this.addENSToEmbarkJS();
|
||||
this.configureContracts();
|
||||
|
||||
self.embark.registerActionForEvent("contracts:deploy:afterAll", (cb) => {
|
||||
self.events.request('contracts:contract', "ENSRegistry", (contract) => {
|
||||
self.embark.registerActionForEvent("contracts:deploy:afterAll", (cb) => {
|
||||
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 = {
|
||||
abi: contract.abiDefinition,
|
||||
address: contract.deployedAddress
|
||||
registryAbi: results[0].abiDefinition,
|
||||
registryAddress: results[0].deployedAddress,
|
||||
registrarAbi: results[1].abiDefinition,
|
||||
registrarAddress: results[1].deployedAddress
|
||||
};
|
||||
self.addSetProvider(config);
|
||||
cb();
|
||||
|
|
Loading…
Reference in New Issue