TransWikia.com

Filter past events with condition

Ethereum Asked by Simon Bachmann on December 25, 2021

Is it possible to filter past events with a boolean condition? For example I have the following event:

event ExampleEvent(uint256 exampleNumber);

In my js code I can filter these events with the == operator as follows:

const pastEvents = await exampleContract.getPastEvents("ExampleEvent", { filter: {exampleNumber: 10}, fromBlock: 1 });

Is it possible to filter with different operators? eg like this: exampleNumber>10

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP