Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pinocchio/interface/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ pub enum TokenError {
/// Invalid number of required signers.
InvalidNumberOfRequiredSigners,
/// State is uninitialized.
///
/// This error is not currently returned by the program and is reserved
/// for compatibility.
UninitializedState,

// 10
Expand Down
13 changes: 12 additions & 1 deletion pinocchio/interface/src/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ pub enum TokenInstruction {

/// Sets a new authority of a mint or account.
///
/// Note that when setting a new account owner authority on a native
/// token account, the current close authority (if any) will be removed.
///
/// Accounts expected by this instruction:
///
/// * Single authority
Expand Down Expand Up @@ -550,7 +553,15 @@ pub enum TokenInstruction {
///
/// Both the number of accounts and instruction data length are used to
/// identify the slice of accounts and instruction data for each
/// instruction.
/// instruction. Since the instruction data length is specified as a `u8`,
/// the maximum instruction data length is 255 bytes, which is sufficient
/// for all current instructions in the program.
///
/// When one or more batched instructions write return data, the batch
/// instruction returns the data written by the last instruction that does
/// so. That instruction does not have to be the final instruction in the
/// batch: later instructions that do not write return data leave the last
/// written return data unchanged.
///
/// Note that it is not sound to have a `batch` instruction that contains
/// other `batch` instruction; an error will be raised when this is
Expand Down
6 changes: 5 additions & 1 deletion pinocchio/program/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,14 @@ pub fn process_instruction(accounts: &[AccountInfo], instruction_data: &[u8]) ->
/// - `1`: `InitializeAccount`
/// - `3`: `Transfer`
/// - `7`: `MintTo`
/// - `8`: `Burn`
/// - `9`: `CloseAccount`
/// - `16`: `InitializeAccount2`
/// - `12`: `TransferChecked`
/// - `15`: `BurnChecked`
/// - `17`: `SyncNative`
/// - `18`: `InitializeAccount3`
/// - `20`: `InitializeMint2`
/// - `22`: `InitializeImmutableOwner`
#[inline(always)]
pub(crate) fn inner_process_instruction(
accounts: &[AccountInfo],
Expand Down
Loading