pub fn enable_required_transfer_memos(
    token_program_id: &Pubkey,
    account: &Pubkey,
    owner: &Pubkey,
    signers: &[&Pubkey],
) -> Result<Instruction, ProgramError> {
    check_program_account(token_program_id)?;
    let mut accounts = vec![
        AccountMeta::new(*account, false),
        AccountMeta::new_readonly(*owner, signers.is_empty()),
    ];
    for signer_pubkey in signers.iter() {
        accounts.push(AccountMeta::new_readonly(**signer_pubkey, true));
    }
    Ok(encode_instruction(
        token_program_id,
        accounts,
        RequiredMemoTransfersInstruction::Enable,
    ))
}
/// Create an `Enable` instruction
Create an `Enable` instruction
Create an ` Enable ` instruction
pub fn enable_required_transfer_memos(
    token_program_id: &Pubkey,
    account: &Pubkey,
    owner: &Pubkey,
    signers: &[&Pubkey],
) -> Result<Instruction, ProgramError> {
    check_program_account(token_program_id)?;
    let mut accounts = vec![
        AccountMeta::new(*account, false),
        AccountMeta::new_readonly(*owner, signers.is_empty()),
    ];
    for signer_pubkey in signers.iter() {
        accounts.push(AccountMeta::new_readonly(**signer_pubkey, true));
    }
    Ok(encode_instruction(
        token_program_id,
        accounts,
        RequiredMemoTransfersInstruction::Enable,
    ))
}
pub fn enable_required_transfer_memos ( token_program_id : & Pubkey , account : & Pubkey , owner : & Pubkey , signers : & [ & Pubkey ] , ) -> Result < Instruction , ProgramError > { check_program_account ( token_program_id ) ? ; let mut accounts = vec ! [ AccountMeta new ( account false ) AccountMeta new_readonly ( owner signers is_empty ( ) ) ] ; for signer_pubkey in signers . iter ( ) { accounts . push ( AccountMeta :: new_readonly ( * * signer_pubkey , true ) ) ; } Ok ( encode_instruction ( token_program_id , accounts , RequiredMemoTransfersInstruction :: Enable , ) ) }
Create an `Enable` instruction
Create an ` Enable ` instruction
token_program_id
&Pubkey
account
&Pubkey
owner
&Pubkey
signers
&[&Pubkey]
token_program_id
&Pubkey
account
&Pubkey
owner
&Pubkey
signers
&[&Pubkey]