Skip to content

Conversation

peterargue
Copy link
Contributor

Implement GetScheduledTransaction and GetScheduledTransactionResult endpoints which allow querying transactions and results for scheduled transactions by their uint64 id.

This PR also makes the following changes:

  1. Update GetTransaction, GetTransactionResult, and GetTransactionResultByIndex to allow querying scheduled and system transactions.
  2. Update GetSystemTransaction and GetSystemTransactionResult to not allow querying for scheduled transactions since scheduled tx are not system tx.
  3. Refactor the transactions endpoints to simplify the logic, which was needed to implement 1.
  4. Rewrite unit tests to align with changes from 3.
  5. Add functional tests using actual db implementations to test end-to-end flow.

@peterargue peterargue requested a review from a team as a code owner October 14, 2025 22:38
@peterargue peterargue requested review from UlyanaAndrukhiv and illia-malachyn and removed request for illia-malachyn October 14, 2025 22:39
@@ -1,68 +1,55 @@
package transactions
Copy link
Contributor Author

@peterargue peterargue Oct 17, 2025

Choose a reason for hiding this comment

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

these tests were completely rewritten, so you can ignore the diff and focus on the new content

Comment on lines +293 to +295
// Expected error returns during normal operation:
// - [codes.NotFound]: if the transaction is not a scheduled transaction was not found in the block
// - [codes.Internal]: if there was an error looking up the events
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: I took steps towards improving error docs and robust error handling, but didn't try to address everything. that will come as part of the optimistic sync API refactor.

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