I think this issue is related to https://github.com/ethereum/web3.js/issues/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
contract.events.Transfer({ fromBlock: fromBlock }, function(error, event) {
console.log(event);
});
should log events.
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 (
at GetPastLogsMethod.
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.
````
Thanks for opening this issue! Will fix and release it next week.
Thank you for your fast response always :)
Most helpful comment
Thanks for opening this issue! Will fix and release it next week.