Transfer (Token)

Token Program - Transfer Checked

tokenprog.TransferChecked(tokenprog.TransferCheckedParam{
	From:     aliceTokenRandomTokenPubkey,
	To:       aliceTokenATAPubkey,
	Mint:     mintPubkey,
	Auth:     alice.PublicKey,
	Signers:  []common.PublicKey{},
	Amount:   1e8,
	Decimals: 8,
}),

From a token account to give token

To a token account to receive token

Mint which token wants to transfer

Auth the owner of from, need to sign the tx

Singers we pass empty first, I will write a another chapter to discuss it.

Amount the number you want to transfer

Decimals the decimals of mint

circle-info

There is an instruction call Transferin tokenprog also can transfer token.

Last updated