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

myContract.events.MyEvent is broken in beta.49-51 #2611

Closed
sydneyitguy opened this issue Mar 29, 2019 · 2 comments · Fixed by #2613
Closed

myContract.events.MyEvent is broken in beta.49-51 #2611

sydneyitguy opened this issue Mar 29, 2019 · 2 comments · Fixed by #2613
Labels
Bug Addressing a bug

Comments

@sydneyitguy
Copy link

sydneyitguy commented Mar 29, 2019

Description

I think this issue is related to #2563 but the fix #2574 didn't apply on contract.events methods.

This issue has appeared on beta.49, and still existing on beta.51

Expected behavior

contract.events.Transfer({ fromBlock: fromBlock }, function(error, event) {
  console.log(event);
});

should log events.

Actual behavior

Error log

Cannot read property 'currentProvider' of undefined
    at GetPastLogsMethod._callee$ (/node_modules/web3-core-method/dist/web3-core-method.cjs.js:97:44)
    at tryCatch (/node_modules/regenerator-runtime/runtime.js:45:40)
    at Generator.invoke [as _invoke] (/node_modules/regenerator-runtime/runtime.js:271:22)
    at Generator.prototype.(anonymous function) [as next] (/node_modules/regenerator-runtime/runtime.js:97:21)
    at asyncGeneratorStep (/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
    at _next (/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
    at /node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7
    at new Promise (<anonymous>)
    at GetPastLogsMethod.<anonymous> (/node_modules/@babel/runtime/helpers/asyncToGenerator.js:21:12)
    at GetPastLogsMethod.execute (/node_modules/web3-core-method/dist/web3-core-method.cjs.js:122:25)
    at EventLogSubscription.subscribe (/node_modules/web3-core-subscriptions/dist/web3-core-subscriptions.cjs.js:106:32)
    at EventSubscriptionsProxy.subscribe (/node_modules/web3-eth-contract/dist/web3-eth-contract.cjs.js:602:189)
    at Proxy.<anonymous> (/node_modules/web3-eth-contract/dist/web3-eth-contract.cjs.js:583:27)

Versions

  • web3.js: 1.0.0-beta.51
  • nodejs: v11.7.0
  • browser: console
  • ethereum node: Infura
@nivida nivida added the Bug Addressing a bug label Mar 29, 2019
@nivida
Copy link
Contributor

nivida commented Mar 29, 2019

Thanks for opening this issue! Will fix and release it next week.

@sydneyitguy
Copy link
Author

Thank you for your fast response always :)

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