Move ProgramError into sdk/
This commit is contained in:
@ -28,3 +28,24 @@ macro_rules! solana_entrypoint(
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
/// Reasons a program might have rejected an instruction.
|
||||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
pub enum ProgramError {
|
||||
/// Contract's transactions resulted in an account with a negative balance
|
||||
/// The difference from InsufficientFundsForFee is that the transaction was executed by the
|
||||
/// contract
|
||||
ResultWithNegativeTokens,
|
||||
|
||||
/// The program returned an error
|
||||
GenericError,
|
||||
|
||||
/// Program's instruction token balance does not equal the balance after the instruction
|
||||
UnbalancedInstruction,
|
||||
|
||||
/// Program modified an account's program id
|
||||
ModifiedProgramId,
|
||||
|
||||
/// Program spent the tokens of an account that doesn't belong to it
|
||||
ExternalAccountTokenSpend,
|
||||
}
|
||||
|
Reference in New Issue
Block a user