I want to add to my smart-contract tranfer SPL-tokens. How i can do that?If I have ATA, receiverATA, mint, amount, decimals.
use solana_program::{ account_info::{next_account_info, AccountInfo}, entrypoint, entrypoint::ProgramResult, program::invoke, program_error::ProgramError, pubkey::Pubkey, system_instruction,};entrypoint!(process_instruction);pub fn process_instruction( _program_id: &Pubkey, accounts: &[AccountInfo], instruction_data: &[u8],) -> ProgramResult { let accounts_iter = &mut accounts.iter();
How do I properly pass all data through JavaScript if I use TransactionInstruction
how do I properly pass amount
and decimals
to data: