Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registry creation in ENS module throws an exception #2424

Closed
kelsos opened this issue Feb 26, 2019 · 1 comment · Fixed by #2425
Closed

Registry creation in ENS module throws an exception #2424

kelsos opened this issue Feb 26, 2019 · 1 comment · Fixed by #2425
Labels
Bug Addressing a bug

Comments

@kelsos
Copy link

kelsos commented Feb 26, 2019

All issues which aren't created with this template will get immediately closed.

It seems like EnsModuleFactory createENS method never passes the instance of contractModuleFactory to the constructor of Ens resulting in contractModuleFactory being undefined when createRegistry is called.

https://github.com/ethereum/web3.js/blob/2f0ada25b3988e67ec0d9a86a593146a57b43114/packages/web3-eth-ens/src/factories/EnsModuleFactory.js#L47

Expected behavior

Call getAddress to get the address of a register name on ens.

Actual behavior

Calling getAddress throws the following exception.

TypeError: "_this.contractModuleFactory is undefined"
    AbstractContract web3-eth-contract.umd.js:954
    Registry web3-eth-ens.umd.js:931
    createRegistry web3-eth-ens.umd.js:1070
    get web3-eth-ens.umd.js:408
    _callee2$ web3-eth-ens.umd.js:88
    tryCatch runtime.js:62
    invoke runtime.js:288
    method runtime.js:114
    node_modules asyncToGenerator.js:3
    node_modules asyncToGenerator.js:25
    node_modules asyncToGenerator.js:32
    Promise es6.promise.js:177
    node_modules asyncToGenerator.js:21
    getAddress web3-eth-ens.umd.js:100
    _callee$ HelloWorld.vue:17
    tryCatch runtime.js:62
    invoke runtime.js:288
    method runtime.js:114
    node_modules asyncToGenerator.js:9
    node_modules asyncToGenerator.js:31
    node_modules asyncToGenerator.js:38
    Promise es6.promise.js:177
    node_modules asyncToGenerator.js:27

Steps to reproduce the behavior

  1. Setup web3 with the http provider (the rpc provider is a geth client on rinkeby)
  2. Get the ens module web3.eth.ens
  3. ens.getAddress()

Error Logs

Versions

[NPM, Node, Web3.js, OS, device...]

  • npm: '6.4.1'
  • node: v10.13.0
  • web3.js: 1.0.0-beta.46
@nivida nivida added the Bug Addressing a bug label Feb 26, 2019
@nivida
Copy link
Contributor

nivida commented Feb 26, 2019

Thanks for opening this issue! I will fix and release it asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Addressing a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants