#[repr(C)]pub enum TransferHookInstruction {
Execute {
amount: u64,
},
InitializeExtraAccountMetaList {
extra_account_metas: Vec<ExtraAccountMeta>,
},
UpdateExtraAccountMetaList {
extra_account_metas: Vec<ExtraAccountMeta>,
},
}Expand description
Instructions supported by the transfer hook interface.
Variants§
Execute
Runs additional transfer logic.
Accounts expected by this instruction:
[]Source account[]Token mint[]Destination account[]Source account’s owner/delegate[](Optional) Validation account- ..
5+M[]Moptional additional accounts, written in validation account data
InitializeExtraAccountMetaList
Initializes the extra account metas on an account, writing into the first open TLV space.
Accounts expected by this instruction:
[w]Account with extra account metas[]Mint[s]Mint authority[]System program
Fields
§
extra_account_metas: Vec<ExtraAccountMeta>List of ExtraAccountMetas to write into the account
UpdateExtraAccountMetaList
Updates the extra account metas on an account by overwriting the existing list.
Accounts expected by this instruction:
[w]Account with extra account metas[]Mint[s]Mint authority
Fields
§
extra_account_metas: Vec<ExtraAccountMeta>The new list of ExtraAccountMetas to overwrite the existing entry
in the account.
Implementations§
Source§impl TransferHookInstruction
impl TransferHookInstruction
Sourcepub fn unpack(input: &[u8]) -> Result<Self, ProgramError>
pub fn unpack(input: &[u8]) -> Result<Self, ProgramError>
Unpacks a byte buffer into a
TransferHookInstruction.
Trait Implementations§
Source§impl Clone for TransferHookInstruction
impl Clone for TransferHookInstruction
Source§fn clone(&self) -> TransferHookInstruction
fn clone(&self) -> TransferHookInstruction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TransferHookInstruction
impl Debug for TransferHookInstruction
Source§impl PartialEq for TransferHookInstruction
impl PartialEq for TransferHookInstruction
impl StructuralPartialEq for TransferHookInstruction
Auto Trait Implementations§
impl Freeze for TransferHookInstruction
impl RefUnwindSafe for TransferHookInstruction
impl Send for TransferHookInstruction
impl Sync for TransferHookInstruction
impl Unpin for TransferHookInstruction
impl UnwindSafe for TransferHookInstruction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more