pub struct TransferCheckedWithFee<'a> {
pub source: &'a AccountView<'a>,
pub mint: &'a AccountView<'a>,
pub destination: &'a AccountView<'a>,
pub authority: &'a AccountView<'a>,
pub amount: u64,
pub decimals: u8,
pub fee: u64,
}Expand description
TransferFeeExtension::TransferCheckedWithFee (26/1): a
TransferChecked that also states the fee the caller expects, which
the program refuses to exceed.
Fields§
§source: &'a AccountView<'a>§mint: &'a AccountView<'a>§destination: &'a AccountView<'a>§amount: u64§decimals: u8§fee: u64Implementations§
Source§impl TransferCheckedWithFee<'_>
impl TransferCheckedWithFee<'_>
Sourcepub fn invoke(&self) -> ProgramResult
pub fn invoke(&self) -> ProgramResult
Send this instruction to Token-2022 with the authority
signed directly. Fails with MissingRequiredSignature
before the CPI if it is not.
Sourcepub fn invoke_signed(&self, signers: &[Signer<'_, '_>]) -> ProgramResult
pub fn invoke_signed(&self, signers: &[Signer<'_, '_>]) -> ProgramResult
Send this instruction to Token-2022 with PDA signers.
Sourcepub fn invoke_multisig(
&self,
multisig_signers: &[&AccountView<'_>],
) -> ProgramResult
pub fn invoke_multisig( &self, multisig_signers: &[&AccountView<'_>], ) -> ProgramResult
Send this instruction to Token-2022 with a multisig authority whose signers signed directly.
Sourcepub fn invoke_signed_multisig(
&self,
multisig_signers: &[&AccountView<'_>],
signers: &[Signer<'_, '_>],
) -> ProgramResult
pub fn invoke_signed_multisig( &self, multisig_signers: &[&AccountView<'_>], signers: &[Signer<'_, '_>], ) -> ProgramResult
Send this instruction to Token-2022 with a multisig authority and PDA signers.
Trait Implementations§
Source§impl<'a, 'x: 'a> TokenInstruction<'a> for TransferCheckedWithFee<'x>
impl<'a, 'x: 'a> TokenInstruction<'a> for TransferCheckedWithFee<'x>
fn emit( &self, multisig_signers: &[&'a AccountView<'a>], sink: &mut impl TokenSink<'a>, ) -> ProgramResult
Auto Trait Implementations§
impl<'a> !Send for TransferCheckedWithFee<'a>
impl<'a> !Sync for TransferCheckedWithFee<'a>
impl<'a> Freeze for TransferCheckedWithFee<'a>
impl<'a> RefUnwindSafe for TransferCheckedWithFee<'a>
impl<'a> Unpin for TransferCheckedWithFee<'a>
impl<'a> UnsafeUnpin for TransferCheckedWithFee<'a>
impl<'a> UnwindSafe for TransferCheckedWithFee<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more