CTokenInstruction

Enum CTokenInstruction 

Source
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)]

Fields

§amount: u64
§

Approve

Approve delegate for compressed tokens (discriminator 4) Data: amount (u64) [+ max_top_up (u16)]

Fields

§amount: u64
§

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)]

Fields

§amount: u64
§

Burn

Burn compressed tokens (discriminator 8) Data: amount (u64) [+ max_top_up (u16)]

Fields

§amount: u64
§

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)]

Fields

§amount: u64
§decimals: u8
§

MintToChecked

Mint compressed tokens with decimals check (discriminator 14) Data: amount (u64) + decimals (u8) [+ max_top_up (u16)]

Fields

§amount: u64
§decimals: u8
§

BurnChecked

Burn compressed tokens with decimals check (discriminator 15) Data: amount (u64) + decimals (u8) [+ max_top_up (u16)]

Fields

§amount: u64
§decimals: u8
§

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V