solana-go-sdk icon indicating copy to clipboard operation
solana-go-sdk copied to clipboard

How to get SOL transfers from a response getTransaction()

Open shinhagunn opened this issue 2 years ago • 2 comments
trafficstars

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

shinhagunn avatar Oct 24 '23 10:10 shinhagunn

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.

yihau avatar Oct 25 '23 04:10 yihau

如果您只关心余额变化,则有四个字段,前/后余额和前/后 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?

pengbotter avatar Mar 31 '24 07:03 pengbotter