use solana_sdk::pubkey::Pubkey;
#[derive(Debug, thiserror::Error)]
pub enum SdkError {
#[error("invalid input: {0}")]
InvalidInput(String),
#[error("invalid account: {0}")]
InvalidAccount(String),
#[error("account not found: {0}")]
AccountNotFound(Pubkey),
#[error("arithmetic overflow")]
MathOverflow,
#[error("oracle error: {0}")]
Oracle(String),
#[error("RPC error: {0}")]
Rpc(String),
#[error("simulation error: {0}")]
Simulation(String),
#[error(transparent)]
Program(#[from] crate::errors::ParsedSimulationProgramError),
#[error(transparent)]
Io(#[from] std::io::Error),
}
pub type Result<T, E = SdkError> = std::result::Result<T, E>;