Skip to content

Commit e5b98bb

Browse files
authored
Merge pull request #154 from avianlabs/guillermo/dont-serialize-unparsed-data-as-any
don't serialize unparsed data as Any
2 parents 0098b42 + 35a7dc8 commit e5b98bb

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

solana-kotlin/src/commonMain/kotlin/net/avianlabs/solana/methods/simulateTransaction.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package net.avianlabs.solana.methods
22

33
import io.ktor.util.*
4-
import kotlinx.serialization.Contextual
54
import kotlinx.serialization.Serializable
65
import kotlinx.serialization.json.*
76
import net.avianlabs.solana.SolanaClient
@@ -62,7 +61,7 @@ public data class SimulateTransactionResponse(
6261
/**
6362
* Error if transaction failed, null if transaction succeeded.
6463
*/
65-
@Contextual val err: Any?,
64+
val err: JsonElement?,
6665
/**
6766
* Array of log messages the transaction instructions output during execution, null if simulation
6867
* failed before the transaction was able to execute (for example due to an invalid blockhash or
@@ -84,7 +83,7 @@ public data class SimulateTransactionResponse(
8483
/**
8584
* Defined only if innerInstructions was set to true
8685
*/
87-
@Contextual val innerInstructions: Any?,
86+
val innerInstructions: JsonElement?,
8887
) {
8988
@Serializable
9089
public data class AccountInfo(
@@ -99,7 +98,7 @@ public data class SimulateTransactionResponse(
9998
/**
10099
* Data associated with the account, either as encoded binary data or JSON format
101100
*/
102-
@Contextual val data: Any,
101+
val data: JsonElement,
103102
/**
104103
* Boolean indicating if the account contains a program (and is strictly read-only)
105104
*/
@@ -119,6 +118,6 @@ public data class SimulateTransactionResponse(
119118
/**
120119
* The return data itself, as base-64 encoded binary data
121120
*/
122-
@Contextual val data: Any,
121+
val data: String,
123122
)
124123
}

0 commit comments

Comments
 (0)