#[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[]
Validation account 5..5+M[]
M
additional accounts, written in validation account data
InitializeExtraAccountMetaList
Fields
§
extra_account_metas: Vec<ExtraAccountMeta>
List of ExtraAccountMeta
s to write into the account
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
UpdateExtraAccountMetaList
Fields
§
extra_account_metas: Vec<ExtraAccountMeta>
The new list of ExtraAccountMetas
to overwrite the existing entry
in the account.
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
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 copy 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
source§fn eq(&self, other: &TransferHookInstruction) -> bool
fn eq(&self, other: &TransferHookInstruction) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for TransferHookInstruction
Auto Trait Implementations§
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