pub struct Processor {}
Expand description

Program state handler.

Implementations§

source§

impl Processor

source

pub fn process_initialize_mint( accounts: &[AccountInfo<'_>], decimals: u8, mint_authority: Pubkey, freeze_authority: COption<Pubkey> ) -> ProgramResult

Processes an InitializeMint instruction.

source

pub fn process_initialize_mint2( accounts: &[AccountInfo<'_>], decimals: u8, mint_authority: Pubkey, freeze_authority: COption<Pubkey> ) -> ProgramResult

Processes an InitializeMint2 instruction.

source

pub fn process_initialize_account(accounts: &[AccountInfo<'_>]) -> ProgramResult

Processes an InitializeAccount instruction.

source

pub fn process_initialize_account2( accounts: &[AccountInfo<'_>], owner: Pubkey ) -> ProgramResult

Processes an InitializeAccount2 instruction.

source

pub fn process_initialize_account3( accounts: &[AccountInfo<'_>], owner: Pubkey ) -> ProgramResult

Processes an InitializeAccount3 instruction.

source

pub fn process_initialize_multisig( accounts: &[AccountInfo<'_>], m: u8 ) -> ProgramResult

Processes a InitializeMultisig instruction.

source

pub fn process_initialize_multisig2( accounts: &[AccountInfo<'_>], m: u8 ) -> ProgramResult

Processes a InitializeMultisig2 instruction.

source

pub fn process_transfer( program_id: &Pubkey, accounts: &[AccountInfo<'_>], amount: u64, expected_decimals: Option<u8>, expected_fee: Option<u64> ) -> ProgramResult

Processes a Transfer instruction.

source

pub fn process_approve( program_id: &Pubkey, accounts: &[AccountInfo<'_>], amount: u64, expected_decimals: Option<u8> ) -> ProgramResult

Processes an Approve instruction.

source

pub fn process_revoke( program_id: &Pubkey, accounts: &[AccountInfo<'_>] ) -> ProgramResult

Processes an Revoke instruction.

source

pub fn process_set_authority( program_id: &Pubkey, accounts: &[AccountInfo<'_>], authority_type: AuthorityType, new_authority: COption<Pubkey> ) -> ProgramResult

Processes a SetAuthority instruction.

source

pub fn process_mint_to( program_id: &Pubkey, accounts: &[AccountInfo<'_>], amount: u64, expected_decimals: Option<u8> ) -> ProgramResult

Processes a MintTo instruction.

source

pub fn process_burn( program_id: &Pubkey, accounts: &[AccountInfo<'_>], amount: u64, expected_decimals: Option<u8> ) -> ProgramResult

Processes a Burn instruction.

source

pub fn process_close_account( program_id: &Pubkey, accounts: &[AccountInfo<'_>] ) -> ProgramResult

Processes a CloseAccount instruction.

source

pub fn process_toggle_freeze_account( program_id: &Pubkey, accounts: &[AccountInfo<'_>], freeze: bool ) -> ProgramResult

Processes a FreezeAccount or a ThawAccount instruction.

source

pub fn process_sync_native(accounts: &[AccountInfo<'_>]) -> ProgramResult

Processes a SyncNative instruction

source

pub fn process_initialize_mint_close_authority( accounts: &[AccountInfo<'_>], close_authority: COption<Pubkey> ) -> ProgramResult

Processes an InitializeMintCloseAuthority instruction

source

pub fn process_get_account_data_size( accounts: &[AccountInfo<'_>], new_extension_types: Vec<ExtensionType> ) -> ProgramResult

Processes a GetAccountDataSize instruction

source

pub fn process_initialize_immutable_owner( accounts: &[AccountInfo<'_>] ) -> ProgramResult

Processes an InitializeImmutableOwner instruction

source

pub fn process_amount_to_ui_amount( accounts: &[AccountInfo<'_>], amount: u64 ) -> ProgramResult

Processes an AmountToUiAmount instruction

source

pub fn process_ui_amount_to_amount( accounts: &[AccountInfo<'_>], ui_amount: &str ) -> ProgramResult

Processes an AmountToUiAmount instruction

source

pub fn process_create_native_mint(accounts: &[AccountInfo<'_>]) -> ProgramResult

Processes a CreateNativeMint instruction

source

pub fn process_initialize_non_transferable_mint( accounts: &[AccountInfo<'_>] ) -> ProgramResult

Processes an InitializeNonTransferableMint instruction

source

pub fn process_initialize_permanent_delegate( accounts: &[AccountInfo<'_>], delegate: Pubkey ) -> ProgramResult

Processes an InitializePermanentDelegate instruction

source

pub fn process_withdraw_excess_lamports( program_id: &Pubkey, accounts: &[AccountInfo<'_>] ) -> ProgramResult

Withdraw Excess Lamports is used to recover Lamports transfered to any TokenProgram owned account by moving them to another account of the source account.

source

pub fn process( program_id: &Pubkey, accounts: &[AccountInfo<'_>], input: &[u8] ) -> ProgramResult

Processes an Instruction.

source

pub fn validate_owner( program_id: &Pubkey, expected_owner: &Pubkey, owner_account_info: &AccountInfo<'_>, owner_account_data_len: usize, signers: &[AccountInfo<'_>] ) -> ProgramResult

Validates owner(s) are present. Used for Mints and Accounts only.

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> AbiExample for T

§

default fn example() -> T

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.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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

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

§

fn vzip(self) -> V