#[repr(u8)]
pub enum CpiGuardInstruction {
Enable,
Disable,
}
Expand description
CPI Guard extension instructions
Variants§
Enable
Lock certain token operations from taking place within CPI for this Account, namely:
- Transfer and Burn must go through a delegate.
- CloseAccount can only return lamports to owner.
- SetAuthority can only be used to remove an existing close authority.
- Approve is disallowed entirely.
In addition, CPI Guard cannot be enabled or disabled via CPI.
Accounts expected by this instruction:
[writable]
The account to update.[signer]
The account’s owner.
- Multisignature authority
[writable]
The account to update.[]
The account’s multisignature owner.- ..2+M
[signer]
M signer accounts.
Disable
Allow all token operations to happen via CPI as normal.
Implicitly initializes the extension in the case where it is not present.
Accounts expected by this instruction:
[writable]
The account to update.[signer]
The account’s owner.
- Multisignature authority
[writable]
The account to update.[]
The account’s multisignature owner.- ..2+M
[signer]
M signer accounts.
Trait Implementations§
source§impl Clone for CpiGuardInstruction
impl Clone for CpiGuardInstruction
source§fn clone(&self) -> CpiGuardInstruction
fn clone(&self) -> CpiGuardInstruction
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 CpiGuardInstruction
impl Debug for CpiGuardInstruction
source§impl From<CpiGuardInstruction> for u8
impl From<CpiGuardInstruction> for u8
source§fn from(enum_value: CpiGuardInstruction) -> Self
fn from(enum_value: CpiGuardInstruction) -> Self
Converts to this type from the input type.
source§impl PartialEq<CpiGuardInstruction> for CpiGuardInstruction
impl PartialEq<CpiGuardInstruction> for CpiGuardInstruction
source§fn eq(&self, other: &CpiGuardInstruction) -> bool
fn eq(&self, other: &CpiGuardInstruction) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<u8> for CpiGuardInstruction
impl TryFrom<u8> for CpiGuardInstruction
§type Error = TryFromPrimitiveError<CpiGuardInstruction>
type Error = TryFromPrimitiveError<CpiGuardInstruction>
The type returned in the event of a conversion error.