How to query for all Contract events? #1400
-
I need to index all the event logs from my contract every x seconds and sync them into a MongoDB instance. What's the best way to do this? I'm currently using Is there a way to get this info from each log entry? Is there an alternative way? How are others doing this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
You should be able to use use your contract object with the wildcard event: const events = await contract.queryFilter("*", fromBlock, toBlock) Let me know if that doesn't work for your purposes... |
Beta Was this translation helpful? Give feedback.
-
(moving to discussions) |
Beta Was this translation helpful? Give feedback.
You should be able to use use your contract object with the wildcard event:
Let me know if that doesn't work for your purposes...