poseidon_client/transactions/
errors.rs

1use borsh::{BorshDeserialize, BorshSerialize};
2use serde::{Deserialize, Serialize};
3
4#[derive(
5    Debug,
6    Serialize,
7    Deserialize,
8    Clone,
9    PartialEq,
10    PartialOrd,
11    Ord,
12    Eq,
13    BorshSerialize,
14    BorshDeserialize,
15)]
16pub enum TransactionError {
17    AccountInUse,
18    AccountLoadedTwice,
19    AccountNotFound,
20    ProgramAccountNotFound,
21    InsufficientFundsForFee,
22    InvalidAccountForFee,
23    AlreadyProcessed,
24    BlockhashNotFound,
25    InstructionError(u8, InstructionError),
26    CallChainTooDeep,
27    MissingSignatureForFee,
28    InvalidAccountIndex,
29    SignatureFailure,
30    InvalidProgramForExecution,
31    SanitizeFailure,
32    ClusterMaintenance,
33    AccountBorrowOutstanding,
34    WouldExceedMaxBlockCostLimit,
35    UnsupportedVersion,
36    InvalidWritableAccount,
37    WouldExceedMaxAccountCostLimit,
38    WouldExceedAccountDataBlockLimit,
39    TooManyAccountLocks,
40    AddressLookupTableNotFound,
41    InvalidAddressLookupTableOwner,
42    InvalidAddressLookupTableData,
43    InvalidAddressLookupTableIndex,
44    InvalidRentPayingAccount,
45    WouldExceedMaxVoteCostLimit,
46    WouldExceedAccountDataTotalLimit,
47}
48
49#[derive(
50    Debug,
51    Serialize,
52    Deserialize,
53    Clone,
54    PartialEq,
55    PartialOrd,
56    Ord,
57    Eq,
58    BorshSerialize,
59    BorshDeserialize,
60)]
61pub enum InstructionError {
62    GenericError,
63    InvalidArgument,
64    InvalidInstructionData,
65    InvalidAccountData,
66    AccountDataTooSmall,
67    InsufficientFunds,
68    IncorrectProgramId,
69    MissingRequiredSignature,
70    AccountAlreadyInitialized,
71    UninitializedAccount,
72    UnbalancedInstruction,
73    ModifiedProgramId,
74    ExternalAccountLamportSpend,
75    ExternalAccountDataModified,
76    ReadonlyLamportChange,
77    ReadonlyDataModified,
78    DuplicateAccountIndex,
79    ExecutableModified,
80    RentEpochModified,
81    NotEnoughAccountKeys,
82    AccountDataSizeChanged,
83    AccountNotExecutable,
84    AccountBorrowFailed,
85    AccountBorrowOutstanding,
86    DuplicateAccountOutOfSync,
87    Custom(u32),
88    InvalidError,
89    ExecutableDataModified,
90    ExecutableLamportChange,
91    ExecutableAccountNotRentExempt,
92    UnsupportedProgramId,
93    CallDepth,
94    MissingAccount,
95    ReentrancyNotAllowed,
96    MaxSeedLengthExceeded,
97    InvalidSeeds,
98    InvalidRealloc,
99    ComputationalBudgetExceeded,
100    PrivilegeEscalation,
101    ProgramEnvironmentSetupFailure,
102    ProgramFailedToComplete,
103    ProgramFailedToCompile,
104    Immutable,
105    IncorrectAuthority,
106    BorshIoError(String),
107    AccountNotRentExempt,
108    InvalidAccountOwner,
109    ArithmeticOverflow,
110    UnsupportedSysvar,
111    IllegalOwner,
112    MaxAccountsDataSizeExceeded,
113    ActiveVoteAccountClose,
114}