我可以使用转账功能转账 solana 代币(如 RAY 代币)吗?
sdk/src/system_transaction.rs :
pub fn transfer(
from_keypair: &Keypair,
to: &Pubkey,
lamports: u64,
recent_blockhash: Hash,
) -> Transaction {
let from_pubkey = from_keypair.pubkey();
let instruction = system_instruction::transfer(&from_pubkey, to, lamports);
let message = Message::new(&[instruction], Some(&from_pubkey));
Transaction::new(&[from_keypair], message, recent_blockhash)
}
我必须使用另一个功能吗?
谢谢你的回答。