spl_token_2022::onchain

Function invoke_transfer_checked_with_fee

Source
pub fn invoke_transfer_checked_with_fee<'a>(
    token_program_id: &Pubkey,
    source_info: AccountInfo<'a>,
    mint_info: AccountInfo<'a>,
    destination_info: AccountInfo<'a>,
    authority_info: AccountInfo<'a>,
    additional_accounts: &[AccountInfo<'a>],
    amount: u64,
    decimals: u8,
    fee: u64,
    seeds: &[&[&[u8]]],
) -> ProgramResult
Expand description

Helper to CPI into token-2022 on-chain, looking through the additional account infos to create the proper instruction with the fee and proper account infos