Closed lealobanov closed 4 months ago
The recent update to the Flow SDK introduces new methods for retrieving transactions, transaction results, and execution results by block ID. Both synchronous and asynchronous versions of these methods have been added to their respective interfaces and implementations. Additionally, new data models for handling execution results, service events, and data chunks have been introduced. Comprehensive tests have been included to validate these new functionalities, ensuring robustness and reliability.
Files | Change Summary |
---|---|
src/main/kotlin/org/onflow/flow/sdk/AsyncFlowAccessApi.kt |
Added asynchronous methods for retrieving transactions, transaction results, and execution results by block ID. |
src/main/kotlin/org/onflow/flow/sdk/FlowAccessApi.kt |
Added synchronous methods for retrieving transactions, transaction results, and execution results by block ID. |
src/main/kotlin/org/onflow/flow/sdk/impl/... |
Implemented new methods in AsyncFlowAccessApiImpl and FlowAccessApiImpl for retrieving data by block ID. |
src/main/kotlin/org/onflow/flow/sdk/models.kt |
Added new data classes FlowChunk , FlowServiceEvent , and FlowExecutionResult with conversion and comparison methods. |
src/test/kotlin/org/onflow/flow/sdk/... |
Added and updated test cases for the new methods to ensure coverage for transactions, results retrieval by block ID, and handling of various scenarios. |
sequenceDiagram
participant Client
participant AsyncFlowAccessApi
participant FlowAccessApiImpl
participant FlowBlockchain
Note over Client,AsyncFlowAccessApi: Asynchronous API call to get transactions by block ID
Client->>AsyncFlowAccessApi: getTransactionsByBlockId(blockId)
AsyncFlowAccessApi->>FlowAccessApiImpl: getTransactionsByBlockId(blockId)
FlowAccessApiImpl->>FlowBlockchain: fetchTransactions(blockId)
FlowBlockchain->>FlowAccessApiImpl: List<FlowTransaction>
FlowAccessApiImpl->>AsyncFlowAccessApi: List<FlowTransaction>
AsyncFlowAccessApi->>Client: CompletableFuture<List<FlowTransaction>>
Note over Client,FlowAccessApiImpl: Synchronous API call to get execution result by block ID
Client->>FlowAccessApiImpl: getExecutionResultByBlockId(blockId)
FlowAccessApiImpl->>FlowBlockchain: fetchExecutionResult(blockId)
FlowBlockchain->>FlowAccessApiImpl: FlowExecutionResult
FlowAccessApiImpl->>Client: FlowExecutionResult
In the world of Flow, data streams anew,
Transactions and results by block ID, in full view.
Asynchronous calls, so swift and bright,
Ensure our blockchain flows just right.
Chunks and events, neatly in place,
Our tests ensure there's not a trace misplaced.
🐇🔍✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
0 files ±0 0 suites ±0 0s :stopwatch: ±0s 0 tests ±0 0 :heavy_check_mark: ±0 0 :zzz: ±0 0 :x: ±0
Results for commit 26af3e0a. ± Comparison against base commit 26af3e0a.
:recycle: This comment has been updated with latest results.
0 files ±0 0 suites ±0 0s :stopwatch: ±0s 0 tests ±0 0 :heavy_check_mark: ±0 0 :zzz: ±0 0 :x: ±0
Results for commit 26af3e0a. ± Comparison against base commit 26af3e0a.
Description
Pulls in changes from https://github.com/onflow/flow-jvm-sdk/pull/61 to main
For contributor use:
master
branchFiles changed
in the Github PR explorerSummary by CodeRabbit
New Features
FlowChunk
,FlowServiceEvent
,FlowExecutionResult
) for detailed execution result handling.Tests