Replies: 1 comment 2 replies
-
The JSON-RPC does not provide any means to order the logs. You will need to fetch the logs in the range you require and then sort through them manually (using .sort) or iterate over them backwards (i.e. Hope that helps. :) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I found that I can query event logs from some contracts with the
getLogs
method.But with this, I could receive logs with ascending order only.
I need to fetch the latest logs first, and It seems there are no ways to get.
How can I query event logs with descending order? When impossible I just want to know how to write code to imitate like getting logs with new logs first.
Beta Was this translation helpful? Give feedback.
All reactions