pub struct ApproveChecked<'a> {
pub source: &'a AccountView,
pub mint: &'a AccountView,
pub delegate: &'a AccountView,
pub authority: &'a AccountView,
pub amount: u64,
pub decimals: u8,
}Expand description
Builder for SPL Token ApproveChecked (instruction index 13).
Mint + decimals-verified approval. Same safety profile as the
other *Checked variants.
Fields§
§source: &'a AccountView§mint: &'a AccountView§delegate: &'a AccountView§amount: u64§decimals: u8Implementations§
Source§impl ApproveChecked<'_>
impl ApproveChecked<'_>
pub fn invoke(&self) -> Result<(), ProgramError>
Sourcepub fn invoke_strict(&self) -> Result<(), ProgramError>
pub fn invoke_strict(&self) -> Result<(), ProgramError>
Strict invoke: signer pre-check plus source-account ownership
verification. Ensures the authority granting the approval is
actually allowed to do so. See TransferChecked::invoke_strict
for the full rationale.
pub fn invoke_signed( &self, signers: &[Signer<'_, '_>], ) -> Result<(), ProgramError>
Sourcepub fn invoke_signed_strict(
&self,
signers: &[Signer<'_, '_>],
) -> Result<(), ProgramError>
pub fn invoke_signed_strict( &self, signers: &[Signer<'_, '_>], ) -> Result<(), ProgramError>
Strict PDA-signed invoke. Pre-check the source-account owner before the CPI.
Auto Trait Implementations§
impl<'a> Freeze for ApproveChecked<'a>
impl<'a> RefUnwindSafe for ApproveChecked<'a>
impl<'a> Send for ApproveChecked<'a>
impl<'a> Sync for ApproveChecked<'a>
impl<'a> Unpin for ApproveChecked<'a>
impl<'a> UnsafeUnpin for ApproveChecked<'a>
impl<'a> UnwindSafe for ApproveChecked<'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