From fda83e46355737e0700e4de7c17ea29f717a5e19 Mon Sep 17 00:00:00 2001 From: Lea Lobanov Date: Sat, 5 Oct 2024 00:58:53 +0800 Subject: [PATCH 01/10] Update docs for added examples --- java-example/README.md | 5 +++++ kotlin-example/README.md | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/java-example/README.md b/java-example/README.md index 38e0e32..e0d6654 100644 --- a/java-example/README.md +++ b/java-example/README.md @@ -11,6 +11,7 @@ This package contains runnable code examples that use the [Flow JVM SDK](https:/ - [Get accounts](#get-accounts) - [Get events](#get-events) - [Get collection](#get-collection) + - [Get execution data](#get-execution-data) - [Get network parameters](#get-network-parameters) - [Get transactions](#get-transactions) - [Sending transactions](#sending-transactions) @@ -65,6 +66,10 @@ Below is a list of all Java code examples currently supported in this repo: [Get collections by ID.](src/main/java/org/onflow/examples/java/getCollection/GetCollectionAccessAPIConnector.java) +#### Get Execution Data + +[Get execution data by block ID.](src/main/java/org/onflow/examples/java/getExecutionData/GetExecutionDataAccessAPIConnector.java) + #### Get Network Parameters [Get the current network parameters.](src/main/java/org/onflow/examples/java/getNetworkParams/GetNetworkParametersAccessAPIConnector.java) diff --git a/kotlin-example/README.md b/kotlin-example/README.md index 3c04f6f..d14b44b 100644 --- a/kotlin-example/README.md +++ b/kotlin-example/README.md @@ -11,6 +11,7 @@ This package contains runnable code examples that use the [Flow JVM SDK](https:/ - [Get accounts](#get-accounts) - [Get events](#get-events) - [Get collection](#get-collection) + - [Get execution data](#get-execution-data) - [Get network parameters](#get-network-parameters) - [Get transactions](#get-transactions) - [Sending transactions](#sending-transactions) @@ -20,6 +21,7 @@ This package contains runnable code examples that use the [Flow JVM SDK](https:/ - [Deploy contract](#deploy-contract) - [Transaction signing](#transaction-signing) - [Verifying signatures](#verifying-signatures) + - [Streaming events and execution data](#streaming-events-and-execution-data) ## Running the emulator with the Flow CLI @@ -65,6 +67,10 @@ Below is a list of all Kotlin code examples currently supported in this repo: [Get collections by ID.](src/main/kotlin/org/onflow/examples/kotlin/getCollection/GetCollectionAccessAPIConnector.kt) +#### Get Execution Data + +[Get execution data by block ID.](src/main/kotlin/org/onflow/examples/kotlin/getExecutionData/GetExecutionDataAccessAPIConnector.kt) + #### Get Network Parameters [Get the current network parameters.](src/main/kotlin/org/onflow/examples/kotlin/getNetworkParams/GetNetworkParametersAccessAPIConnector.kt) @@ -120,6 +126,10 @@ Below is a list of all Kotlin code examples currently supported in this repo: - Signing an arbitrary user message and verifying it using the public keys on an account, respecting the weights of each key. - Signing an arbitrary user message and verifying it using the public keys on an account. Return success if any public key on the account can sign the message. -#### Unsupported Features +#### Streaming Events and Execution Data + +[Utilizing the Access API subscription endpoints to stream event and execution data.](src/main/kotlin/org/onflow/examples/kotlin/streaming) -The JVM SDK code examples currently do not support the Access API subscription endpoints (streaming events and execution data), which depend on the Execution Data API (not supported in Flow Emulator). We intend to add these examples as soon as support for these methods is released on the Flow Emulator. \ No newline at end of file +- Streaming events. +- Streaming events and reconnecting in the event of a failure. +- Streaming execution data. \ No newline at end of file From 800323f90380f62278cd2b12cf12a198a142aa80 Mon Sep 17 00:00:00 2001 From: Lea Lobanov Date: Sat, 5 Oct 2024 02:06:54 +0800 Subject: [PATCH 02/10] Update FlowTransactionResult class --- sdk/src/main/kotlin/org/onflow/flow/sdk/models.kt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/sdk/src/main/kotlin/org/onflow/flow/sdk/models.kt b/sdk/src/main/kotlin/org/onflow/flow/sdk/models.kt index aa1970e..33b58df 100644 --- a/sdk/src/main/kotlin/org/onflow/flow/sdk/models.kt +++ b/sdk/src/main/kotlin/org/onflow/flow/sdk/models.kt @@ -267,7 +267,12 @@ data class FlowTransactionResult( val status: FlowTransactionStatus, val statusCode: Int, val errorMessage: String, - val events: List + val events: List, + val blockId: FlowId, + val blockHeight: Long, + val transactionId: FlowId, + val collectionId: FlowId, + val computationUsage: Long ) : Serializable { companion object { @JvmStatic @@ -275,7 +280,12 @@ data class FlowTransactionResult( status = FlowTransactionStatus.of(value.statusValue), statusCode = value.statusCode, errorMessage = value.errorMessage, - events = value.eventsList.map { FlowEvent.of(it) } + events = value.eventsList.map { FlowEvent.of(it) }, + blockId = FlowId.of(value.blockId.toByteArray()), + blockHeight = value.blockHeight, + transactionId = FlowId.of(value.transactionId.toByteArray()), + collectionId = FlowId.of(value.collectionId.toByteArray()), + computationUsage = value.computationUsage ) } From 6783a58fdb8a62ab2b32e5314883ecada46a11ae Mon Sep 17 00:00:00 2001 From: Lea Lobanov Date: Sat, 5 Oct 2024 23:27:19 +0800 Subject: [PATCH 03/10] Update unit tests with new fields --- .../org/onflow/flow/sdk/FlowAccessApiTest.kt | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/sdk/src/test/kotlin/org/onflow/flow/sdk/FlowAccessApiTest.kt b/sdk/src/test/kotlin/org/onflow/flow/sdk/FlowAccessApiTest.kt index cc22946..17dc28c 100644 --- a/sdk/src/test/kotlin/org/onflow/flow/sdk/FlowAccessApiTest.kt +++ b/sdk/src/test/kotlin/org/onflow/flow/sdk/FlowAccessApiTest.kt @@ -299,17 +299,37 @@ class FlowAccessApiTest { @Test fun `Test getTransactionResultsByBlockId with multiple results`() { val flowAccessApi = mock(FlowAccessApi::class.java) - val blockId = FlowId("01") - - val transactionResult1 = FlowTransactionResult(FlowTransactionStatus.SEALED, 1, "message1", emptyList()) + val flowId = FlowId("01") - val transactionResult2 = FlowTransactionResult(FlowTransactionStatus.SEALED, 2, "message2", emptyList()) + val transactionResult1 = FlowTransactionResult( + FlowTransactionStatus.SEALED, + 1, + "message1", + emptyList(), + flowId, + 1L, + flowId, + flowId, + 1 + ) + + val transactionResult2 = FlowTransactionResult( + FlowTransactionStatus.SEALED, + 2, + "message2", + emptyList(), + flowId, + 1L, + flowId, + flowId, + 1 + ) val transactions = listOf(transactionResult1, transactionResult2) - `when`(flowAccessApi.getTransactionResultsByBlockId(blockId)).thenReturn(FlowAccessApi.AccessApiCallResponse.Success(transactions)) + `when`(flowAccessApi.getTransactionResultsByBlockId(flowId)).thenReturn(FlowAccessApi.AccessApiCallResponse.Success(transactions)) - val result = flowAccessApi.getTransactionResultsByBlockId(blockId) + val result = flowAccessApi.getTransactionResultsByBlockId(flowId) assertEquals(FlowAccessApi.AccessApiCallResponse.Success(transactions), result) From d7053f31164cd5a3018250560778b51a0aea96b8 Mon Sep 17 00:00:00 2001 From: Lea Lobanov Date: Sat, 5 Oct 2024 23:30:19 +0800 Subject: [PATCH 04/10] Update unit tests with new fields --- .../sdk/models/FlowTransactionResultTest.kt | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/sdk/src/test/kotlin/org/onflow/flow/sdk/models/FlowTransactionResultTest.kt b/sdk/src/test/kotlin/org/onflow/flow/sdk/models/FlowTransactionResultTest.kt index 6defba5..9035f83 100644 --- a/sdk/src/test/kotlin/org/onflow/flow/sdk/models/FlowTransactionResultTest.kt +++ b/sdk/src/test/kotlin/org/onflow/flow/sdk/models/FlowTransactionResultTest.kt @@ -42,7 +42,19 @@ class FlowTransactionResultTest { val invalidStatusCode = 1 val errorMessage = "Error message" - val flowTransactionResult = FlowTransactionResult(status, invalidStatusCode, errorMessage, emptyList()) + val flowId = FlowId("0x1") + + val flowTransactionResult = FlowTransactionResult( + status, + invalidStatusCode, + errorMessage, + emptyList(), + flowId, + 1L, + flowId, + flowId, + 1L + ) assertThrows { flowTransactionResult.throwOnError() } } @@ -57,11 +69,18 @@ class FlowTransactionResultTest { val event2 = FlowEvent("type2", FlowId("0x2234"), 0, 0, FlowEventPayload(eventField2)) val event3 = FlowEvent("sub-type1", FlowId("0x3234"), 0, 0, FlowEventPayload(eventField3)) + val flowId = FlowId("0x1") + val flowTransactionResult = FlowTransactionResult( FlowTransactionStatus.SEALED, 0, "", - listOf(event1, event2, event3) + listOf(event1, event2, event3), + flowId, + 1L, + flowId, + flowId, + 1L ) // Events of a specific type From 1d206e26094542c6aeda9fe54bae6cd92f352057 Mon Sep 17 00:00:00 2001 From: Lea Lobanov Date: Sun, 6 Oct 2024 01:15:33 +0800 Subject: [PATCH 05/10] Update tests --- .../org/onflow/flow/sdk/impl/AsyncFlowAccessApiImplTest.kt | 2 +- .../kotlin/org/onflow/flow/sdk/impl/FlowAccessApiImplTest.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/src/test/kotlin/org/onflow/flow/sdk/impl/AsyncFlowAccessApiImplTest.kt b/sdk/src/test/kotlin/org/onflow/flow/sdk/impl/AsyncFlowAccessApiImplTest.kt index 5645677..86100f3 100644 --- a/sdk/src/test/kotlin/org/onflow/flow/sdk/impl/AsyncFlowAccessApiImplTest.kt +++ b/sdk/src/test/kotlin/org/onflow/flow/sdk/impl/AsyncFlowAccessApiImplTest.kt @@ -162,7 +162,7 @@ class AsyncFlowAccessApiImplTest { @Test fun `test getTransactionResultById`() { val flowId = FlowId.of("id".toByteArray()) - val flowTransactionResult = FlowTransactionResult(FlowTransactionStatus.SEALED, 1, "message", emptyList()) + val flowTransactionResult = FlowTransactionResult(FlowTransactionStatus.SEALED, 1, "message", emptyList(), flowId,1L, flowId, flowId,1L) val transactionResultResponse = Access.TransactionResultResponse.newBuilder().setStatus(TransactionOuterClass.TransactionStatus.SEALED).setStatusCode(1).setErrorMessage("message").setBlockId(ByteString.copyFromUtf8("id")).build() `when`(api.getTransactionResult(any())).thenReturn(setupFutureMock(transactionResultResponse)) diff --git a/sdk/src/test/kotlin/org/onflow/flow/sdk/impl/FlowAccessApiImplTest.kt b/sdk/src/test/kotlin/org/onflow/flow/sdk/impl/FlowAccessApiImplTest.kt index 4e2ffd0..3dc98ff 100644 --- a/sdk/src/test/kotlin/org/onflow/flow/sdk/impl/FlowAccessApiImplTest.kt +++ b/sdk/src/test/kotlin/org/onflow/flow/sdk/impl/FlowAccessApiImplTest.kt @@ -170,7 +170,7 @@ class FlowAccessApiImplTest { @Test fun `Test getTransactionResultById`() { val flowId = FlowId.of("id".toByteArray()) - val flowTransactionResult = FlowTransactionResult(FlowTransactionStatus.SEALED, 1, "message", emptyList()) + val flowTransactionResult = FlowTransactionResult(FlowTransactionStatus.SEALED, 1, "message", emptyList(), flowId,1L, flowId, flowId,1L) val response = Access.TransactionResultResponse.newBuilder().setStatus(TransactionOuterClass.TransactionStatus.SEALED).setStatusCode(1).setErrorMessage("message").setBlockId(ByteString.copyFromUtf8("id")).build() `when`(mockApi.getTransactionResult(any())).thenReturn(response) From 8e5d3eef6f399cfbce4959c768bcb0f2036cae65 Mon Sep 17 00:00:00 2001 From: Lea Lobanov Date: Sun, 6 Oct 2024 01:20:02 +0800 Subject: [PATCH 06/10] Linting --- .../org/onflow/flow/sdk/impl/AsyncFlowAccessApiImplTest.kt | 2 +- .../kotlin/org/onflow/flow/sdk/impl/FlowAccessApiImplTest.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/src/test/kotlin/org/onflow/flow/sdk/impl/AsyncFlowAccessApiImplTest.kt b/sdk/src/test/kotlin/org/onflow/flow/sdk/impl/AsyncFlowAccessApiImplTest.kt index 86100f3..da1a530 100644 --- a/sdk/src/test/kotlin/org/onflow/flow/sdk/impl/AsyncFlowAccessApiImplTest.kt +++ b/sdk/src/test/kotlin/org/onflow/flow/sdk/impl/AsyncFlowAccessApiImplTest.kt @@ -162,7 +162,7 @@ class AsyncFlowAccessApiImplTest { @Test fun `test getTransactionResultById`() { val flowId = FlowId.of("id".toByteArray()) - val flowTransactionResult = FlowTransactionResult(FlowTransactionStatus.SEALED, 1, "message", emptyList(), flowId,1L, flowId, flowId,1L) + val flowTransactionResult = FlowTransactionResult(FlowTransactionStatus.SEALED, 1, "message", emptyList(), flowId, 1L, flowId, flowId, 1L) val transactionResultResponse = Access.TransactionResultResponse.newBuilder().setStatus(TransactionOuterClass.TransactionStatus.SEALED).setStatusCode(1).setErrorMessage("message").setBlockId(ByteString.copyFromUtf8("id")).build() `when`(api.getTransactionResult(any())).thenReturn(setupFutureMock(transactionResultResponse)) diff --git a/sdk/src/test/kotlin/org/onflow/flow/sdk/impl/FlowAccessApiImplTest.kt b/sdk/src/test/kotlin/org/onflow/flow/sdk/impl/FlowAccessApiImplTest.kt index 3dc98ff..68713fa 100644 --- a/sdk/src/test/kotlin/org/onflow/flow/sdk/impl/FlowAccessApiImplTest.kt +++ b/sdk/src/test/kotlin/org/onflow/flow/sdk/impl/FlowAccessApiImplTest.kt @@ -170,7 +170,7 @@ class FlowAccessApiImplTest { @Test fun `Test getTransactionResultById`() { val flowId = FlowId.of("id".toByteArray()) - val flowTransactionResult = FlowTransactionResult(FlowTransactionStatus.SEALED, 1, "message", emptyList(), flowId,1L, flowId, flowId,1L) + val flowTransactionResult = FlowTransactionResult(FlowTransactionStatus.SEALED, 1, "message", emptyList(), flowId, 1L, flowId, flowId, 1L) val response = Access.TransactionResultResponse.newBuilder().setStatus(TransactionOuterClass.TransactionStatus.SEALED).setStatusCode(1).setErrorMessage("message").setBlockId(ByteString.copyFromUtf8("id")).build() `when`(mockApi.getTransactionResult(any())).thenReturn(response) From 122c4455bea8340bbe6c4f105cfdf9012183322e Mon Sep 17 00:00:00 2001 From: Lea Lobanov Date: Sun, 6 Oct 2024 01:34:44 +0800 Subject: [PATCH 07/10] Update tests --- .../flow/sdk/impl/AsyncFlowAccessApiImplTest.kt | 13 ++++++++++++- .../onflow/flow/sdk/impl/FlowAccessApiImplTest.kt | 12 +++++++++++- .../flow/sdk/models/FlowTransactionResultTest.kt | 5 +++-- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/sdk/src/test/kotlin/org/onflow/flow/sdk/impl/AsyncFlowAccessApiImplTest.kt b/sdk/src/test/kotlin/org/onflow/flow/sdk/impl/AsyncFlowAccessApiImplTest.kt index da1a530..3e54d24 100644 --- a/sdk/src/test/kotlin/org/onflow/flow/sdk/impl/AsyncFlowAccessApiImplTest.kt +++ b/sdk/src/test/kotlin/org/onflow/flow/sdk/impl/AsyncFlowAccessApiImplTest.kt @@ -163,7 +163,18 @@ class AsyncFlowAccessApiImplTest { fun `test getTransactionResultById`() { val flowId = FlowId.of("id".toByteArray()) val flowTransactionResult = FlowTransactionResult(FlowTransactionStatus.SEALED, 1, "message", emptyList(), flowId, 1L, flowId, flowId, 1L) - val transactionResultResponse = Access.TransactionResultResponse.newBuilder().setStatus(TransactionOuterClass.TransactionStatus.SEALED).setStatusCode(1).setErrorMessage("message").setBlockId(ByteString.copyFromUtf8("id")).build() + + val transactionResultResponse = Access.TransactionResultResponse.newBuilder() + .setStatus(TransactionOuterClass.TransactionStatus.SEALED) + .setStatusCode(1) + .setErrorMessage("message") + .setBlockId(ByteString.copyFromUtf8("id")) + .setBlockHeight(1L) + .setTransactionId(ByteString.copyFromUtf8("id")) + .setCollectionId(ByteString.copyFromUtf8("id")) + .setComputationUsage(1L) + .build() + `when`(api.getTransactionResult(any())).thenReturn(setupFutureMock(transactionResultResponse)) val result = asyncFlowAccessApi.getTransactionResultById(flowId).get() diff --git a/sdk/src/test/kotlin/org/onflow/flow/sdk/impl/FlowAccessApiImplTest.kt b/sdk/src/test/kotlin/org/onflow/flow/sdk/impl/FlowAccessApiImplTest.kt index 68713fa..b7e78f1 100644 --- a/sdk/src/test/kotlin/org/onflow/flow/sdk/impl/FlowAccessApiImplTest.kt +++ b/sdk/src/test/kotlin/org/onflow/flow/sdk/impl/FlowAccessApiImplTest.kt @@ -171,7 +171,17 @@ class FlowAccessApiImplTest { fun `Test getTransactionResultById`() { val flowId = FlowId.of("id".toByteArray()) val flowTransactionResult = FlowTransactionResult(FlowTransactionStatus.SEALED, 1, "message", emptyList(), flowId, 1L, flowId, flowId, 1L) - val response = Access.TransactionResultResponse.newBuilder().setStatus(TransactionOuterClass.TransactionStatus.SEALED).setStatusCode(1).setErrorMessage("message").setBlockId(ByteString.copyFromUtf8("id")).build() + + val response = Access.TransactionResultResponse.newBuilder() + .setStatus(TransactionOuterClass.TransactionStatus.SEALED) + .setStatusCode(1) + .setErrorMessage("message") + .setBlockId(ByteString.copyFromUtf8("id")) + .setBlockHeight(1L) + .setTransactionId(ByteString.copyFromUtf8("id")) + .setCollectionId(ByteString.copyFromUtf8("id")) + .setComputationUsage(1L) + .build() `when`(mockApi.getTransactionResult(any())).thenReturn(response) diff --git a/sdk/src/test/kotlin/org/onflow/flow/sdk/models/FlowTransactionResultTest.kt b/sdk/src/test/kotlin/org/onflow/flow/sdk/models/FlowTransactionResultTest.kt index 9035f83..841d1bb 100644 --- a/sdk/src/test/kotlin/org/onflow/flow/sdk/models/FlowTransactionResultTest.kt +++ b/sdk/src/test/kotlin/org/onflow/flow/sdk/models/FlowTransactionResultTest.kt @@ -28,6 +28,7 @@ class FlowTransactionResultTest { .setErrorMessage(errorMessage) .addAllEvents(events.map { it.builder().build() }) + val flowTransactionResult = FlowTransactionResult.of(responseBuilder.build()) assertEquals(status, flowTransactionResult.status) @@ -42,7 +43,7 @@ class FlowTransactionResultTest { val invalidStatusCode = 1 val errorMessage = "Error message" - val flowId = FlowId("0x1") + val flowId = FlowId("0x01") val flowTransactionResult = FlowTransactionResult( status, @@ -69,7 +70,7 @@ class FlowTransactionResultTest { val event2 = FlowEvent("type2", FlowId("0x2234"), 0, 0, FlowEventPayload(eventField2)) val event3 = FlowEvent("sub-type1", FlowId("0x3234"), 0, 0, FlowEventPayload(eventField3)) - val flowId = FlowId("0x1") + val flowId = FlowId("0x01") val flowTransactionResult = FlowTransactionResult( FlowTransactionStatus.SEALED, From 74c4941cac0ab5fd167ad08691be040b06a4cef8 Mon Sep 17 00:00:00 2001 From: Lea Lobanov Date: Sun, 6 Oct 2024 01:36:49 +0800 Subject: [PATCH 08/10] Update tests --- .../org/onflow/flow/sdk/models/FlowTransactionResultTest.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sdk/src/test/kotlin/org/onflow/flow/sdk/models/FlowTransactionResultTest.kt b/sdk/src/test/kotlin/org/onflow/flow/sdk/models/FlowTransactionResultTest.kt index 841d1bb..edf5556 100644 --- a/sdk/src/test/kotlin/org/onflow/flow/sdk/models/FlowTransactionResultTest.kt +++ b/sdk/src/test/kotlin/org/onflow/flow/sdk/models/FlowTransactionResultTest.kt @@ -1,5 +1,6 @@ package org.onflow.flow.sdk.models +import com.google.protobuf.ByteString import org.onflow.flow.sdk.* import org.onflow.flow.sdk.cadence.CompositeAttribute import org.onflow.flow.sdk.cadence.CompositeValue @@ -26,6 +27,11 @@ class FlowTransactionResultTest { .setStatus(TransactionOuterClass.TransactionStatus.EXECUTED) .setStatusCode(statusCode) .setErrorMessage(errorMessage) + .setBlockId(ByteString.copyFromUtf8("blockId")) + .setBlockHeight(1L) + .setTransactionId(ByteString.copyFromUtf8("transactionId")) + .setCollectionId(ByteString.copyFromUtf8("collectionId")) + .setComputationUsage(1L) .addAllEvents(events.map { it.builder().build() }) From 81f69ee0cd76cb183320ef9c3276c2c2b3ed19d1 Mon Sep 17 00:00:00 2001 From: Lea Lobanov Date: Sun, 6 Oct 2024 01:41:22 +0800 Subject: [PATCH 09/10] Linting --- .../org/onflow/flow/sdk/models/FlowTransactionResultTest.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/src/test/kotlin/org/onflow/flow/sdk/models/FlowTransactionResultTest.kt b/sdk/src/test/kotlin/org/onflow/flow/sdk/models/FlowTransactionResultTest.kt index edf5556..fd1ed36 100644 --- a/sdk/src/test/kotlin/org/onflow/flow/sdk/models/FlowTransactionResultTest.kt +++ b/sdk/src/test/kotlin/org/onflow/flow/sdk/models/FlowTransactionResultTest.kt @@ -34,7 +34,6 @@ class FlowTransactionResultTest { .setComputationUsage(1L) .addAllEvents(events.map { it.builder().build() }) - val flowTransactionResult = FlowTransactionResult.of(responseBuilder.build()) assertEquals(status, flowTransactionResult.status) From b1796ae866077ed9c26d838dc6b4e442095408c7 Mon Sep 17 00:00:00 2001 From: Lea Lobanov Date: Tue, 8 Oct 2024 21:41:48 +0800 Subject: [PATCH 10/10] Update builder --- sdk/src/main/kotlin/org/onflow/flow/sdk/models.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sdk/src/main/kotlin/org/onflow/flow/sdk/models.kt b/sdk/src/main/kotlin/org/onflow/flow/sdk/models.kt index 33b58df..0ec2c47 100644 --- a/sdk/src/main/kotlin/org/onflow/flow/sdk/models.kt +++ b/sdk/src/main/kotlin/org/onflow/flow/sdk/models.kt @@ -294,6 +294,11 @@ data class FlowTransactionResult( .setStatus(TransactionOuterClass.TransactionStatus.valueOf(status.name)) .setStatusCode(statusCode) .setErrorMessage(errorMessage) + .setBlockId(blockId.byteStringValue) + .setBlockHeight(blockHeight) + .setTransactionId(transactionId.byteStringValue) + .setCollectionId(collectionId.byteStringValue) + .setComputationUsage(computationUsage) .addAllEvents(events.map { it.builder().build() }) @JvmOverloads