Closed ionutRD closed 1 year ago
Can you try with the latest? go get github.com/gagliardetto/solana-go@3d8aa7fccde7cefdc0b9c870e190e766a372eb7c
That should give you more verbose errors.
That's very strange; the data is probably malformed because solana.TransactionFromDecoder
is instruction-agnostic.
Can you share the base64 of the data that it fails to parse?
Is that maybe the new transaction format?
I am trying the latest now.
The base64 is this one Alkhq/BfGdBeok4oBP21xAwT4oO/R5PvkKqbCTq4sHHRsto+uDQCFcdp8hXh1g5D3mTh8GAJW8xE+EDD27f9IweTkH2Afiu4h5aM+Xbo0mklc0/Vi1xawd7SZVbstXDLtWdoJaf4Zt+20F/SasURzw/P4dkD+Q6BjgUNHT+vg5gOgAIBAQUaJV0Ch/DG6XwNcizWbI7STLgSbIOrg0Dl67Oo30WU1uA/NIbYLPRmuLarIJ4J0CcN3IWEm4Gf8675KhnXef2LaDXzjFgWVSbAO2yyTF6dK1oO3gTExie957LXDwu6oJMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVKU1qZKSEGTSTocWDaOHx8NbXdvJK7geQfqEBBBUSNlyFnQmYh1aMkGtq3c6TIOsk32S6XMUnN9DQgFGQq4lwEAwIAAgwCAAAAgJaYAAAAAAADAgAFDAIAAACAlpgAAAAAAAMCAAYMAgAAAICWmAAAAAAABAAMSGVsbG8gRmFiaW8hAX5s37FH6IeB4QeMYxD4LtpXf1DaupH/ro7W+kEQnofaAgECAQA=
Thanks!
Do you also have a transaction sig for that?
This is the signature 2nMjR8mdczMJZZ1XeQ5Y37GxfrRQmaV74eypnD9ggpQMmaWfETq9C5DoGKha4bMamu9tFQQArBAgxzQ5vnng1ZdG
the error becomes
unable to decode tx.Message: unable to decode accountIndex for ix[0].Accounts[228]: required [1] byte, remaining [0]
when I try with the latest version
I think this is not working because this is a v0 tx.
The old transaction version is called LEGACY
.
I'm gonna add support for the new tx version soon.
do you have a rough timeline on when this is going to be available?
I'll try to get that done this week.
thanks for the update.
Does it work with https://github.com/gagliardetto/solana-go/releases/tag/v1.7.1 ?
it's working thanks
I noticed that certain type of Solana programs are not supported, one example being Memos. Is there a way to tell whether a transaction has instructions that are not supported such as Memos? I am asking because when parsing a transaction that has memos, I get this rather vague error,
required [X] byte, remaining [Y]
. Skipping these errors seems a bit risky because it doesn't tell much about what kind of instructions/programs are in the transaction.The only solution that I found for identifying whether a transactions has memo instructions/programs is to look at
Meta
field, and more precisely in thelogMessages
field where I can see whether there areMemo
programs.While this option would work for Memos, it wouldn't work for other unsupported programs. Also, is there a list of unsupported Solana Programs/Instructions?
The code that I use to parse the transaction is this one:
This line
solana.TransactionFromDecoder(bin.NewBinDecoder(data))
returns an error of this kindrequired [X] byte, remaining [Y]
when there is at least one instruction/program that is a Memo.