Closed jerryji closed 4 years ago
Thanks for pointing this out @jerryji! In v5 we removed my_contract.eventFilter
for my_contract.events.<event_name>.createFilter()
. I can't link directly the the createFilter docs (which is another issue to address), but if you scroll down in this section you'll find the documentation, although it sounds like you've already seen it. I will update the example soon!
BTW, createFilter works fine with ganache-cli, but unfortunately is not supported by Infura websocket
I think createFilter should work with infura websockets... What error are you seeing?
I think createFilter should work with infura websockets... What error are you seeing?
As I tried to reproduce the issue today, all I got was --
ValueError: {'code': -32601, 'message': 'The method eth_newFilter does not exist/is not available'}
with Infura's https:// endpoint.
As of now createFilter works fine with Infura's wss:// endpoint -- it could well be that I messed up with their websocket url on Sunday.
Thank you @kclowes for looking into this case. I look forward to seeing the updated doc.
pip freeze
outputWhat was wrong?
when I run
my_contract.eventFilter('TokenTransfer', {'filter': {'fromBlock': 0}})
following the example in web3py latest doc https://web3py.readthedocs.io/en/latest/contracts.html#event-log-objectHow can it be fixed?
Please update doc with the correct example. BTW, createFilter works fine with ganache-cli, but unfortunately is not supported by Infura websocket