blocto / solana-go-sdk

Solana Golang SDK
https://blocto.github.io/solana-go-sdk/
MIT License
410 stars 109 forks source link

Hope to help solve it #180

Closed AbSomeone closed 1 week ago

AbSomeone commented 1 week ago

I want to parse the transaction message instruction data and the information and bytes I get are very long (0c000000699d0112000000001f011f011e011d011c011b011a0119011801170116011501140113011201110110010f010e010d 0 10c010b010a010901080107010601050104010301020101899a48ebcbcb3c3c 22cd0d885a90b8a7eb4a40200259c1fde5f73df3422bd27d0135ee3a67000000 0 0)

The code is: for _, ins := range tx.Transaction.Message.Instructions { fmt.Printf("Transaction message instruction ProgramIDIndex: %d\n", ins.ProgramIDIndex) fmt.Printf("Trading message instruction account:%d\n", ins.Accounts) fmt.Printf("Transaction message instruction data:%x\n", ins.Data) }

I don't know if the value obtained by this data is correct. Also, I want to parse this data, please tell me how. Thanks