vechain / connex

The mono-repo contains libraries to help build dApps for VeChain.
https://docs.vechain.org/developer-resources/sdks-and-providers/connex
GNU Lesser General Public License v3.0
86 stars 3.58k forks source link

How to fetch events in the order that they were emitted from a specific Smart Contract? #116

Closed LinSays closed 2 years ago

LinSays commented 2 years ago

Hi. I want to fetch events emitted from the SC in VeChain using connex. But I have to use loop the abis of the SC to fetch all the events emitted from the SC since the events instance has parameter for only one abi. So this will result like this: [eventsFromAbi1, eventsFromAbi2 .....] However, even this way can't solve my problem. I have to get the events in the order that they were emitted. My solution is to sort the events by the order of blocknumber. But is there any smart way to handle this issue. Best regards.

libotony commented 2 years ago

Use the general filter https://docs.vechain.org/connex/api.html#filter