Skip to content

Conversation

@overcat
Copy link
Member

@overcat overcat commented Jul 7, 2025

…d GetTransactionResponse

@overcat overcat requested a review from Copilot July 7, 2025 03:40
@codecov
Copy link

codecov bot commented Jul 7, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 6 lines in your changes missing coverage. Please review.

Please upload report for BASE (add-protocol23-support@a51c08b). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...a/org/stellar/sdk/responses/sorobanrpc/Events.java 66.66% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@                    Coverage Diff                    @@
##             add-protocol23-support     #706   +/-   ##
=========================================================
  Coverage                          ?   80.41%           
  Complexity                        ?     1269           
=========================================================
  Files                             ?      214           
  Lines                             ?     5030           
  Branches                          ?      421           
=========================================================
  Hits                              ?     4045           
  Misses                            ?      724           
  Partials                          ?      261           
Files with missing lines Coverage Δ
...k/responses/sorobanrpc/GetTransactionResponse.java 100.00% <ø> (ø)
.../responses/sorobanrpc/GetTransactionsResponse.java 81.81% <ø> (ø)
...a/org/stellar/sdk/responses/sorobanrpc/Events.java 66.66% <66.66%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances transaction response models by introducing a structured events field and updating JSON fixtures and deserializers to cover diagnostic, transaction, and contract events.

  • Added events object to JSON test fixtures for both bulk and single-transaction responses.
  • Introduced a new Events class with XDR parsing helpers and wired it into GetTransactionsResponse.Transaction and GetTransactionResponse.
  • Updated unit tests to assert presence and parsing of the new events data.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/test/resources/responses/sorobanrpc/get_transactions.json Added events block to each transaction entry
src/test/resources/responses/sorobanrpc/get_transaction_success.json Added events block to the single-transaction response
src/main/java/org/stellar/sdk/responses/sorobanrpc/Events.java New Events value class with parsing methods
src/main/java/org/stellar/sdk/responses/sorobanrpc/GetTransactionsResponse.java Deprecated old field and added new events field in Transaction
src/main/java/org/stellar/sdk/responses/sorobanrpc/GetTransactionResponse.java Added new events field to the response model
src/test/java/org/stellar/sdk/responses/sorobanrpc/GetTransactionsDeserializerTest.java Extended test to cover events parsing
src/test/java/org/stellar/sdk/responses/sorobanrpc/GetTransactionDeserializerTest.java Added null check for the new events field
CHANGELOG.md Documented the addition of events field and related deprecations
Comments suppressed due to low confidence (2)

src/test/java/org/stellar/sdk/responses/sorobanrpc/GetTransactionDeserializerTest.java:58

  • Extend this test to also verify that each sub-list (diagnostic, transaction, contract events) has the expected size and that their parsed XDR matches the raw Base64 strings, similar to the multi-transaction test.
    assertNotNull(getTransactionResponse.getResult().getEvents());

src/main/java/org/stellar/sdk/responses/sorobanrpc/GetTransactionResponse.java:46

  • Add a Javadoc comment describing the new events field and its role, mirroring the deprecation notice style used for diagnosticEventsXdr in the bulk response.
  Events events;

@overcat overcat merged commit 64214c6 into add-protocol23-support Jul 7, 2025
5 checks passed
@overcat overcat deleted the p23-events branch July 7, 2025 03:43
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