-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Docs lack examples for "any-of" and "all-of" topic filters #188
Comments
Perhaps I misunderstood the functionality, and the filter matches messages with all of the specified topics, not any. This is also probably node-dependent. If so, OK to close. |
topics
to web3.eth.filter
gives empty list for past eventstopics
to web3.eth.filter
gives empty list for past events
Re-read the docs:
So, perhaps what I needed was [['<topic1>'], ['<topic2>'], ['<topic3>']] instead of ['<topic1>', '<topic2>', '<topic3>'] Even if this is dependent on the node backend, it may be useful to clarify that dense passage in the docs with an example. |
topics
to web3.eth.filter
gives empty list for past events
I think this would be a good idea. Docs could use a lot more examples surrounding filtering. |
web3.py
version: 3.8.1 (web3[gevent])geth 1.6.5-stable
, local (via IPC)What seems wrong?
Retrieving past log events while specifying
'topics'
gives an empty list, if value of'topics'
is a list with more than one element.I was under the impression that the filter will match any event that's in
'topics'
. This seems not to be the case - EDIT: perhaps it's all?..Details
Using these variables:
Not specifying
'topics'
does give a list of events (dict
s), as expected:The above shows that the topic
0xb556..
, which is part oflist(cancelot.handlers.keys())
, is present as the first event log entry.Giving a list of topics, though, doesn't work:
Providing topics manually
I know that the
0xb556..
topic is present for sure (it's the ENSNewBid
event):And
0x7b6c..
is for sure not present (ENSBidRevealed
event):Specifying both results in empty list behaviour:
Cute Animal Picture
Puffer fish can't believe it (via some random article):
The text was updated successfully, but these errors were encountered: