-
Originally from Stack Overflow. Note that the original question was mostly focused on sequence numbers for events. This was a concept specific to events v1, which is now deprecated. Events v2 does not have sequence numbers. When I retrieve events via the API, what order will they be in? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The events emitted by a transaction are stored in the order they were emitted during execution (see this code pointer). Say for example your transaction emitted these events in this order during function execution:
This is the order they will be stored. The data returned by the node API, indexer API, and transaction stream service will also be in this order. Note that the order is specific to the transaction, there is no notion of event ordering within a block or anything else. |
Beta Was this translation helpful? Give feedback.
The events emitted by a transaction are stored in the order they were emitted during execution (see this code pointer).
Say for example your transaction emitted these events in this order during function execution:
This is the order they will be stored. The data returned by the node API, indexer API, and transaction stream service will also be in this order.
Note that the order is specific to the transaction, there is no notion of event ordering within a block or anything else.