You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thank you for such a great package
I have a question about how to get the token name or mint address from
token_transfer instruction, I could get the amount, source address, destination address and owner address,
but I need the token name or mint address, I would appreciate it if you could help me with that.
tokenInst, _:=token.DecodeInstruction(instruction.ResolveInstructionAccounts(&solTx.Message), instruction.Data)
iftokenInst.TypeID.Uint8() ==token.Instruction_Transfer {
tokenTransfer, _:=tokenInst.Impl.(*token.Transfer)
fmt.Println("amount", *tokenTransfer.Amount)
fmt.Println("owner", tokenTransfer.GetOwnerAccount().PublicKey.String())
fmt.Println("sourceAccount", tokenTransfer.GetSourceAccount().PublicKey.String())
fmt.Println("DestinationAccount", tokenTransfer.GetDestinationAccount().PublicKey.String())
//TODO get the coin name or mint addressfmt.Println("mint address", "how to get this?")
fmt.Println("coin name", "how to get this?")
}
The text was updated successfully, but these errors were encountered:
Hi, thank you for such a great package
I have a question about how to get the token name or mint address from
token_transfer instruction, I could get the amount, source address, destination address and owner address,
but I need the token name or mint address, I would appreciate it if you could help me with that.
The text was updated successfully, but these errors were encountered: