pub enum CTokenInstruction {
Show 18 variants
Transfer {
amount: u64,
},
Approve {
amount: u64,
},
Revoke,
MintTo {
amount: u64,
},
Burn {
amount: u64,
},
CloseTokenAccount,
FreezeAccount,
ThawAccount,
TransferChecked {
amount: u64,
decimals: u8,
},
MintToChecked {
amount: u64,
decimals: u8,
},
BurnChecked {
amount: u64,
decimals: u8,
},
CreateTokenAccount,
CreateAssociatedTokenAccount,
Transfer2,
CreateAssociatedTokenAccountIdempotent,
MintAction,
Claim,
WithdrawFundingPool,
}Expand description
Compressed Token (CToken) program instructions.
The CToken program uses non-sequential 1-byte discriminators. Each variant has an explicit #[discriminator = N] attribute.
Field definitions show the base required fields; max_top_up is optional.
Variants§
Transfer
Transfer compressed tokens (discriminator 3) Data: amount (u64) [+ max_top_up (u16)]
Approve
Approve delegate for compressed tokens (discriminator 4) Data: amount (u64) [+ max_top_up (u16)]
Revoke
Revoke delegate authority (discriminator 5) Data: [max_top_up (u16)]
MintTo
Mint compressed tokens to an account (discriminator 7) Data: amount (u64) [+ max_top_up (u16)]
Burn
Burn compressed tokens (discriminator 8) Data: amount (u64) [+ max_top_up (u16)]
CloseTokenAccount
Close a compressed token account (discriminator 9)
FreezeAccount
Freeze a compressed token account (discriminator 10)
ThawAccount
Thaw a frozen compressed token account (discriminator 11)
TransferChecked
Transfer compressed tokens with decimals check (discriminator 12) Data: amount (u64) + decimals (u8) [+ max_top_up (u16)]
MintToChecked
Mint compressed tokens with decimals check (discriminator 14) Data: amount (u64) + decimals (u8) [+ max_top_up (u16)]
BurnChecked
Burn compressed tokens with decimals check (discriminator 15) Data: amount (u64) + decimals (u8) [+ max_top_up (u16)]
CreateTokenAccount
Create a new compressed token account (discriminator 18)
CreateAssociatedTokenAccount
Create an associated compressed token account (discriminator 100)
Transfer2
Transfer v2 with additional options (discriminator 101) Uses dynamic account names resolver because the account layout depends on instruction data.
CreateAssociatedTokenAccountIdempotent
Create associated token account idempotently (discriminator 102)
MintAction
Mint action for compressed tokens (discriminator 103) Uses dynamic account names resolver because the account layout depends on instruction data.
Claim
Claim compressed tokens (discriminator 104)
WithdrawFundingPool
Withdraw from funding pool (discriminator 105)
Auto Trait Implementations§
impl Freeze for CTokenInstruction
impl RefUnwindSafe for CTokenInstruction
impl Send for CTokenInstruction
impl Sync for CTokenInstruction
impl Unpin for CTokenInstruction
impl UnwindSafe for CTokenInstruction
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
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>
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>
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