#[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
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 ExtraAccountMeta
s 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 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 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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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