Struct safe_token_2022::processor::Processor
source · pub struct Processor {}
Expand description
Program state handler.
Implementations§
source§impl Processor
impl Processor
sourcepub fn process_initialize_mint(
accounts: &[AccountInfo<'_>],
decimals: u8,
mint_authority: Pubkey,
freeze_authority: COption<Pubkey>
) -> ProgramResult
pub fn process_initialize_mint( accounts: &[AccountInfo<'_>], decimals: u8, mint_authority: Pubkey, freeze_authority: COption<Pubkey> ) -> ProgramResult
Processes an InitializeMint instruction.
sourcepub fn process_initialize_mint2(
accounts: &[AccountInfo<'_>],
decimals: u8,
mint_authority: Pubkey,
freeze_authority: COption<Pubkey>
) -> ProgramResult
pub fn process_initialize_mint2( accounts: &[AccountInfo<'_>], decimals: u8, mint_authority: Pubkey, freeze_authority: COption<Pubkey> ) -> ProgramResult
Processes an InitializeMint2 instruction.
sourcepub fn process_initialize_account(accounts: &[AccountInfo<'_>]) -> ProgramResult
pub fn process_initialize_account(accounts: &[AccountInfo<'_>]) -> ProgramResult
Processes an InitializeAccount instruction.
sourcepub fn process_initialize_account2(
accounts: &[AccountInfo<'_>],
owner: Pubkey
) -> ProgramResult
pub fn process_initialize_account2( accounts: &[AccountInfo<'_>], owner: Pubkey ) -> ProgramResult
Processes an InitializeAccount2 instruction.
sourcepub fn process_initialize_account3(
accounts: &[AccountInfo<'_>],
owner: Pubkey
) -> ProgramResult
pub fn process_initialize_account3( accounts: &[AccountInfo<'_>], owner: Pubkey ) -> ProgramResult
Processes an InitializeAccount3 instruction.
sourcepub fn process_initialize_multisig(
accounts: &[AccountInfo<'_>],
m: u8
) -> ProgramResult
pub fn process_initialize_multisig( accounts: &[AccountInfo<'_>], m: u8 ) -> ProgramResult
Processes a InitializeMultisig instruction.
sourcepub fn process_initialize_multisig2(
accounts: &[AccountInfo<'_>],
m: u8
) -> ProgramResult
pub fn process_initialize_multisig2( accounts: &[AccountInfo<'_>], m: u8 ) -> ProgramResult
Processes a InitializeMultisig2 instruction.
sourcepub fn process_transfer(
program_id: &Pubkey,
accounts: &[AccountInfo<'_>],
amount: u64,
expected_decimals: Option<u8>,
expected_fee: Option<u64>
) -> ProgramResult
pub fn process_transfer( program_id: &Pubkey, accounts: &[AccountInfo<'_>], amount: u64, expected_decimals: Option<u8>, expected_fee: Option<u64> ) -> ProgramResult
Processes a Transfer instruction.
sourcepub fn process_approve(
program_id: &Pubkey,
accounts: &[AccountInfo<'_>],
amount: u64,
expected_decimals: Option<u8>
) -> ProgramResult
pub fn process_approve( program_id: &Pubkey, accounts: &[AccountInfo<'_>], amount: u64, expected_decimals: Option<u8> ) -> ProgramResult
Processes an Approve instruction.
sourcepub fn process_revoke(
program_id: &Pubkey,
accounts: &[AccountInfo<'_>]
) -> ProgramResult
pub fn process_revoke( program_id: &Pubkey, accounts: &[AccountInfo<'_>] ) -> ProgramResult
Processes an Revoke instruction.
Processes a SetAuthority instruction.
sourcepub fn process_mint_to(
program_id: &Pubkey,
accounts: &[AccountInfo<'_>],
amount: u64,
expected_decimals: Option<u8>
) -> ProgramResult
pub fn process_mint_to( program_id: &Pubkey, accounts: &[AccountInfo<'_>], amount: u64, expected_decimals: Option<u8> ) -> ProgramResult
Processes a MintTo instruction.
sourcepub fn process_burn(
program_id: &Pubkey,
accounts: &[AccountInfo<'_>],
amount: u64,
expected_decimals: Option<u8>
) -> ProgramResult
pub fn process_burn( program_id: &Pubkey, accounts: &[AccountInfo<'_>], amount: u64, expected_decimals: Option<u8> ) -> ProgramResult
Processes a Burn instruction.
sourcepub fn process_close_account(
program_id: &Pubkey,
accounts: &[AccountInfo<'_>]
) -> ProgramResult
pub fn process_close_account( program_id: &Pubkey, accounts: &[AccountInfo<'_>] ) -> ProgramResult
Processes a CloseAccount instruction.
sourcepub fn process_toggle_freeze_account(
program_id: &Pubkey,
accounts: &[AccountInfo<'_>],
freeze: bool
) -> ProgramResult
pub fn process_toggle_freeze_account( program_id: &Pubkey, accounts: &[AccountInfo<'_>], freeze: bool ) -> ProgramResult
Processes a FreezeAccount or a ThawAccount instruction.
sourcepub fn process_sync_native(accounts: &[AccountInfo<'_>]) -> ProgramResult
pub fn process_sync_native(accounts: &[AccountInfo<'_>]) -> ProgramResult
Processes a SyncNative instruction
Processes an InitializeMintCloseAuthority instruction
sourcepub fn process_get_account_data_size(
accounts: &[AccountInfo<'_>],
new_extension_types: Vec<ExtensionType>
) -> ProgramResult
pub fn process_get_account_data_size( accounts: &[AccountInfo<'_>], new_extension_types: Vec<ExtensionType> ) -> ProgramResult
Processes a GetAccountDataSize instruction
sourcepub fn process_initialize_immutable_owner(
accounts: &[AccountInfo<'_>]
) -> ProgramResult
pub fn process_initialize_immutable_owner( accounts: &[AccountInfo<'_>] ) -> ProgramResult
Processes an InitializeImmutableOwner instruction
sourcepub fn process_amount_to_ui_amount(
accounts: &[AccountInfo<'_>],
amount: u64
) -> ProgramResult
pub fn process_amount_to_ui_amount( accounts: &[AccountInfo<'_>], amount: u64 ) -> ProgramResult
Processes an AmountToUiAmount instruction
sourcepub fn process_ui_amount_to_amount(
accounts: &[AccountInfo<'_>],
ui_amount: &str
) -> ProgramResult
pub fn process_ui_amount_to_amount( accounts: &[AccountInfo<'_>], ui_amount: &str ) -> ProgramResult
Processes an AmountToUiAmount instruction
sourcepub fn process_create_native_mint(accounts: &[AccountInfo<'_>]) -> ProgramResult
pub fn process_create_native_mint(accounts: &[AccountInfo<'_>]) -> ProgramResult
Processes a CreateNativeMint instruction
sourcepub fn process_initialize_non_transferable_mint(
accounts: &[AccountInfo<'_>]
) -> ProgramResult
pub fn process_initialize_non_transferable_mint( accounts: &[AccountInfo<'_>] ) -> ProgramResult
Processes an InitializeNonTransferableMint instruction
sourcepub fn process_initialize_permanent_delegate(
accounts: &[AccountInfo<'_>],
delegate: Pubkey
) -> ProgramResult
pub fn process_initialize_permanent_delegate( accounts: &[AccountInfo<'_>], delegate: Pubkey ) -> ProgramResult
Processes an InitializePermanentDelegate instruction
sourcepub fn process(
program_id: &Pubkey,
accounts: &[AccountInfo<'_>],
input: &[u8]
) -> ProgramResult
pub fn process( program_id: &Pubkey, accounts: &[AccountInfo<'_>], input: &[u8] ) -> ProgramResult
Processes an Instruction.
sourcepub fn validate_owner(
program_id: &Pubkey,
expected_owner: &Pubkey,
owner_account_info: &AccountInfo<'_>,
owner_account_data_len: usize,
signers: &[AccountInfo<'_>]
) -> ProgramResult
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.