Skip to content
Open
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
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion programs/memo/src/instructions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use core::mem::MaybeUninit;
use pinocchio::{
account_info::AccountInfo,
cpi::{slice_invoke_signed, MAX_CPI_ACCOUNTS},
error::ProgramError,
instruction::{AccountMeta, Instruction, Signer},
program_error::ProgramError,
ProgramResult,
};

Expand Down
2 changes: 1 addition & 1 deletion programs/system/src/instructions/create_account.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use pinocchio::{
account_info::AccountInfo,
error::ProgramError,
instruction::{AccountMeta, Instruction, Signer},
program::invoke_signed,
program_error::ProgramError,
pubkey::Pubkey,
sysvars::rent::Rent,
ProgramResult,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use pinocchio::{
account_info::AccountInfo,
error::ProgramError,
instruction::{AccountMeta, Instruction, Signer},
program::invoke_signed,
program_error::ProgramError,
pubkey::Pubkey,
sysvars::rent::Rent,
ProgramResult,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use core::{mem::MaybeUninit, slice};
use pinocchio::{
account_info::AccountInfo,
cpi::invoke_with_bounds,
error::ProgramError,
instruction::{AccountMeta, Instruction},
program_error::ProgramError,
pubkey::Pubkey,
ProgramResult,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use core::{mem::MaybeUninit, slice};
use pinocchio::{
account_info::AccountInfo,
cpi::invoke_with_bounds,
error::ProgramError,
instruction::{AccountMeta, Instruction},
program_error::ProgramError,
pubkey::Pubkey,
ProgramResult,
};
Expand Down
2 changes: 1 addition & 1 deletion programs/token-2022/src/state/mint.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use pinocchio::{
account_info::{AccountInfo, Ref},
program_error::ProgramError,
error::ProgramError,
pubkey::Pubkey,
};

Expand Down
2 changes: 1 addition & 1 deletion programs/token-2022/src/state/multisig.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use core::mem::size_of;
use pinocchio::{
account_info::{AccountInfo, Ref},
program_error::ProgramError,
error::ProgramError,
pubkey::Pubkey,
};

Expand Down
2 changes: 1 addition & 1 deletion programs/token-2022/src/state/token.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::AccountState;
use pinocchio::{
account_info::{AccountInfo, Ref},
program_error::ProgramError,
error::ProgramError,
pubkey::Pubkey,
};

Expand Down
2 changes: 1 addition & 1 deletion programs/token/src/instructions/initialize_multisig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use core::{mem::MaybeUninit, slice};
use pinocchio::{
account_info::AccountInfo,
cpi::invoke_with_bounds,
error::ProgramError,
instruction::{AccountMeta, Instruction},
program_error::ProgramError,
ProgramResult,
};

Expand Down
2 changes: 1 addition & 1 deletion programs/token/src/instructions/initialize_multisig_2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use core::{mem::MaybeUninit, slice};
use pinocchio::{
account_info::AccountInfo,
cpi::invoke_with_bounds,
error::ProgramError,
instruction::{AccountMeta, Instruction},
program_error::ProgramError,
ProgramResult,
};

Expand Down
2 changes: 1 addition & 1 deletion programs/token/src/state/mint.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use pinocchio::{
account_info::{AccountInfo, Ref},
program_error::ProgramError,
error::ProgramError,
pubkey::Pubkey,
};

Expand Down
2 changes: 1 addition & 1 deletion programs/token/src/state/multisig.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use core::mem::size_of;
use pinocchio::{
account_info::{AccountInfo, Ref},
program_error::ProgramError,
error::ProgramError,
pubkey::Pubkey,
};

Expand Down
2 changes: 1 addition & 1 deletion programs/token/src/state/token.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::AccountState;
use pinocchio::{
account_info::{AccountInfo, Ref},
program_error::ProgramError,
error::ProgramError,
pubkey::Pubkey,
};

Expand Down
3 changes: 3 additions & 0 deletions sdk/pinocchio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@ unexpected_cfgs = { level = "warn", check-cfg = [
[features]
std = []

[dependencies]
solana-program-error = "3.0"

[dev-dependencies]
five8_const = { workspace = true }
2 changes: 1 addition & 1 deletion sdk/pinocchio/src/account_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use core::{
use crate::syscalls::sol_memset_;

use crate::{
program_error::ProgramError,
error::ProgramError,
pubkey::{pubkey_eq, Pubkey},
ProgramResult,
};
Expand Down
2 changes: 1 addition & 1 deletion sdk/pinocchio/src/cpi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ use core::{mem::MaybeUninit, ops::Deref, slice::from_raw_parts};

use crate::{
account_info::{AccountInfo, BorrowState},
error::ProgramError,
hint::unlikely,
instruction::{Account, Instruction, Signer},
program_error::ProgramError,
pubkey::{pubkey_eq, Pubkey},
ProgramResult,
};
Expand Down
2 changes: 1 addition & 1 deletion sdk/pinocchio/src/entrypoint/lazy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use crate::{
account_info::{Account, AccountInfo},
entrypoint::{NON_DUP_MARKER, STATIC_ACCOUNT_DATA},
program_error::ProgramError,
error::ProgramError,
pubkey::Pubkey,
BPF_ALIGN_OF_U128,
};
Expand Down
6 changes: 2 additions & 4 deletions sdk/pinocchio/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,14 @@ pub mod memory;
pub mod program {
pub use crate::cpi::*;
}
pub mod program_error;
pub mod pubkey;
pub mod syscalls;
pub mod sysvars;

#[deprecated(since = "0.7.0", note = "Use the `entrypoint` module instead")]
pub use entrypoint::lazy as lazy_entrypoint;
pub use solana_program_error as error;
pub use solana_program_error::ProgramResult;

/// Maximum number of accounts that a transaction may process.
///
Expand All @@ -259,9 +260,6 @@ const BPF_ALIGN_OF_U128: usize = 8;
/// Return value for a successful program execution.
pub const SUCCESS: u64 = 0;

/// The result of a program execution.
pub type ProgramResult = Result<(), program_error::ProgramError>;

/// Module with functions to provide hints to the compiler about how code
/// should be optimized.
pub mod hint {
Expand Down
Loading