Skip to content

Add operation index to event result #383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 17, 2025
Merged

Add operation index to event result #383

merged 6 commits into from
Apr 17, 2025

Conversation

Shaptic
Copy link
Contributor

@Shaptic Shaptic commented Mar 21, 2025

What

See #371: events within a transaction no longer necessarily correspond to a single operation.

Why

Closes #371.

Known limitations

n/a

@@ -25,6 +25,7 @@ type EventInfo struct {
LedgerClosedAt string `json:"ledgerClosedAt"`
ContractID string `json:"contractId"`
ID string `json:"id"`
OpIndex uint32 `json:"operationIndex"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should also include the transaction index . With the ledger sequence, transaction index, and operation index I think we have all the information needed to sort events

Copy link
Contributor Author

@Shaptic Shaptic Apr 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might as well! Done in 49fd1e8. Thoughts on naming? I considered applicationOrder to match getTransaction...

@Shaptic Shaptic merged commit a488a9f into protocol-23 Apr 17, 2025
10 of 13 checks passed
@Shaptic Shaptic deleted the addOpIndex branch April 17, 2025 17:36
@Shaptic Shaptic mentioned this pull request Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants