blocto / solana-go-sdk

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

How to get SOL transfers from a response getTransaction() #148

Open shinhagunn opened 8 months ago

shinhagunn commented 8 months ago

Hi I've a signature of Solana but I dunno how to extract to get all transfers from this signature My signature I want to read is: 5ma1GRnMsqGSJaNc1LuLaZyuG95gNeKCAHMVyGECFmbwan7vsdzMgpw6SRvchWa3J6upSjxzTSuYVMy5jZpatm7F

image

Thanks for Help

yihau commented 8 months ago

if you only care about balance changes, there are four fields, pre/post balance and pre/post tokenBalance. you can use them to get the effect of this transaction. if you would like to know more informations, you will need to parse instructions. there are two different instructions when you get a transaction: instruction and inner-instruction.

pengbotter commented 3 months ago

如果您只关心余额变化,则有四个字段,前/后余额和前/后 tokenBalance。您可以使用它们来获得此交易的效果。 如果您想了解更多信息,则需要解析说明。当你收到一笔交易时,有两种不同的指令:指令和内部指令。

if you only care about balance changes, there are four fields, pre/post balance and pre/post tokenBalance. you can use them to get the effect of this transaction. if you would like to know more informations, you will need to parse instructions. there are two different instructions when you get a transaction: instruction and inner-instruction.

Now if I want the sender, receiver and balance of USDT, how do I get it?