Skip to content

Commit

Permalink
Merge pull request #154 from avianlabs/guillermo/dont-serialize-unpar…
Browse files Browse the repository at this point in the history
…sed-data-as-any

don't serialize unparsed data as Any
  • Loading branch information
wiyarmir authored Nov 7, 2024
2 parents 0098b42 + 35a7dc8 commit e5b98bb
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package net.avianlabs.solana.methods

import io.ktor.util.*
import kotlinx.serialization.Contextual
import kotlinx.serialization.Serializable
import kotlinx.serialization.json.*
import net.avianlabs.solana.SolanaClient
Expand Down Expand Up @@ -62,7 +61,7 @@ public data class SimulateTransactionResponse(
/**
* Error if transaction failed, null if transaction succeeded.
*/
@Contextual val err: Any?,
val err: JsonElement?,
/**
* Array of log messages the transaction instructions output during execution, null if simulation
* failed before the transaction was able to execute (for example due to an invalid blockhash or
Expand All @@ -84,7 +83,7 @@ public data class SimulateTransactionResponse(
/**
* Defined only if innerInstructions was set to true
*/
@Contextual val innerInstructions: Any?,
val innerInstructions: JsonElement?,
) {
@Serializable
public data class AccountInfo(
Expand All @@ -99,7 +98,7 @@ public data class SimulateTransactionResponse(
/**
* Data associated with the account, either as encoded binary data or JSON format
*/
@Contextual val data: Any,
val data: JsonElement,
/**
* Boolean indicating if the account contains a program (and is strictly read-only)
*/
Expand All @@ -119,6 +118,6 @@ public data class SimulateTransactionResponse(
/**
* The return data itself, as base-64 encoded binary data
*/
@Contextual val data: Any,
val data: String,
)
}

0 comments on commit e5b98bb

Please sign in to comment.