Skip to content

How are events ordered within a transaction? #39

Answered by banool
banool asked this question in Questions
Discussion options

You must be logged in to vote

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:

  1. PlaceMarketOrderEvent
  2. FillEvent
  3. FillEvent
  4. FeeStatement

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.

Replies: 1 comment

Comment options

banool
Mar 7, 2024
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by banool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
event Questions related to on-chain events
1 participant