I want to fetch an account's data using [Metaplex KT Library][1].
I am still facing error while fetching an account: code:
try {
val serializer = SolanaAccountSerializer(BorshAsBase64JsonArraySerializer((ProgramInfo.serializer())))
val account = solana.api.getAccountInfo(serializer, getProgramInfoPda().address).getOrThrow()
Log.d(TAG, "fetchQuestionCount: ${account}")
} catch (e: Exception) {
Log.d(TAG, "fetchQuestionCount Error: ${e.message}")
}
Context: ProgramInfo is my own class:
@Serializable
data class ProgramInfo(var author: @Contextual PublicKey, var question_count: @Contextual Number, var bump: @Contextual Number) {
}
This is the error:
Error: Size must be known in advance when using READ_ALL