solana_binary_encoder/proto/
solana.storage.transaction_by_addr.rs

1#[allow(clippy::derive_partial_eq_without_eq)]
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct TransactionByAddr {
4    #[prost(message, repeated, tag = "1")]
5    pub tx_by_addrs: ::prost::alloc::vec::Vec<TransactionByAddrInfo>,
6}
7#[allow(clippy::derive_partial_eq_without_eq)]
8#[derive(Clone, PartialEq, ::prost::Message)]
9pub struct TransactionByAddrInfo {
10    #[prost(bytes = "vec", tag = "1")]
11    pub signature: ::prost::alloc::vec::Vec<u8>,
12    #[prost(message, optional, tag = "2")]
13    pub err: ::core::option::Option<TransactionError>,
14    #[prost(uint32, tag = "3")]
15    pub index: u32,
16    #[prost(message, optional, tag = "4")]
17    pub memo: ::core::option::Option<Memo>,
18    #[prost(message, optional, tag = "5")]
19    pub block_time: ::core::option::Option<UnixTimestamp>,
20}
21#[allow(clippy::derive_partial_eq_without_eq)]
22#[derive(Clone, PartialEq, ::prost::Message)]
23pub struct Memo {
24    #[prost(string, tag = "1")]
25    pub memo: ::prost::alloc::string::String,
26}
27#[allow(clippy::derive_partial_eq_without_eq)]
28#[derive(Clone, PartialEq, ::prost::Message)]
29pub struct TransactionError {
30    #[prost(enumeration = "TransactionErrorType", tag = "1")]
31    pub transaction_error: i32,
32    #[prost(message, optional, tag = "2")]
33    pub instruction_error: ::core::option::Option<InstructionError>,
34    #[prost(message, optional, tag = "3")]
35    pub transaction_details: ::core::option::Option<TransactionDetails>,
36}
37#[allow(clippy::derive_partial_eq_without_eq)]
38#[derive(Clone, PartialEq, ::prost::Message)]
39pub struct InstructionError {
40    #[prost(uint32, tag = "1")]
41    pub index: u32,
42    #[prost(enumeration = "InstructionErrorType", tag = "2")]
43    pub error: i32,
44    #[prost(message, optional, tag = "3")]
45    pub custom: ::core::option::Option<CustomError>,
46}
47#[allow(clippy::derive_partial_eq_without_eq)]
48#[derive(Clone, PartialEq, ::prost::Message)]
49pub struct TransactionDetails {
50    #[prost(uint32, tag = "1")]
51    pub index: u32,
52}
53#[allow(clippy::derive_partial_eq_without_eq)]
54#[derive(Clone, PartialEq, ::prost::Message)]
55pub struct UnixTimestamp {
56    #[prost(int64, tag = "1")]
57    pub timestamp: i64,
58}
59#[allow(clippy::derive_partial_eq_without_eq)]
60#[derive(Clone, PartialEq, ::prost::Message)]
61pub struct CustomError {
62    #[prost(uint32, tag = "1")]
63    pub custom: u32,
64}
65#[cfg_attr(test, derive(enum_iterator::Sequence))]
66#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
67#[repr(i32)]
68pub enum TransactionErrorType {
69    AccountInUse = 0,
70    AccountLoadedTwice = 1,
71    AccountNotFound = 2,
72    ProgramAccountNotFound = 3,
73    InsufficientFundsForFee = 4,
74    InvalidAccountForFee = 5,
75    AlreadyProcessed = 6,
76    BlockhashNotFound = 7,
77    InstructionError = 8,
78    CallChainTooDeep = 9,
79    MissingSignatureForFee = 10,
80    InvalidAccountIndex = 11,
81    SignatureFailure = 12,
82    InvalidProgramForExecution = 13,
83    SanitizeFailure = 14,
84    ClusterMaintenance = 15,
85    AccountBorrowOutstandingTx = 16,
86    WouldExceedMaxBlockCostLimit = 17,
87    UnsupportedVersion = 18,
88    InvalidWritableAccount = 19,
89    WouldExceedMaxAccountCostLimit = 20,
90    WouldExceedAccountDataBlockLimit = 21,
91    TooManyAccountLocks = 22,
92    AddressLookupTableNotFound = 23,
93    InvalidAddressLookupTableOwner = 24,
94    InvalidAddressLookupTableData = 25,
95    InvalidAddressLookupTableIndex = 26,
96    InvalidRentPayingAccount = 27,
97    WouldExceedMaxVoteCostLimit = 28,
98    WouldExceedAccountDataTotalLimit = 29,
99    DuplicateInstruction = 30,
100    InsufficientFundsForRent = 31,
101    MaxLoadedAccountsDataSizeExceeded = 32,
102    InvalidLoadedAccountsDataSizeLimit = 33,
103    ResanitizationNeeded = 34,
104    UnbalancedTransaction = 36,
105}
106impl TransactionErrorType {
107    /// String value of the enum field names used in the ProtoBuf definition.
108    ///
109    /// The values are not transformed in any way and thus are considered stable
110    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
111    pub fn as_str_name(&self) -> &'static str {
112        match self {
113            TransactionErrorType::AccountInUse => "ACCOUNT_IN_USE",
114            TransactionErrorType::AccountLoadedTwice => "ACCOUNT_LOADED_TWICE",
115            TransactionErrorType::AccountNotFound => "ACCOUNT_NOT_FOUND",
116            TransactionErrorType::ProgramAccountNotFound => "PROGRAM_ACCOUNT_NOT_FOUND",
117            TransactionErrorType::InsufficientFundsForFee => "INSUFFICIENT_FUNDS_FOR_FEE",
118            TransactionErrorType::InvalidAccountForFee => "INVALID_ACCOUNT_FOR_FEE",
119            TransactionErrorType::AlreadyProcessed => "ALREADY_PROCESSED",
120            TransactionErrorType::BlockhashNotFound => "BLOCKHASH_NOT_FOUND",
121            TransactionErrorType::InstructionError => "INSTRUCTION_ERROR",
122            TransactionErrorType::CallChainTooDeep => "CALL_CHAIN_TOO_DEEP",
123            TransactionErrorType::MissingSignatureForFee => "MISSING_SIGNATURE_FOR_FEE",
124            TransactionErrorType::InvalidAccountIndex => "INVALID_ACCOUNT_INDEX",
125            TransactionErrorType::SignatureFailure => "SIGNATURE_FAILURE",
126            TransactionErrorType::InvalidProgramForExecution => {
127                "INVALID_PROGRAM_FOR_EXECUTION"
128            }
129            TransactionErrorType::SanitizeFailure => "SANITIZE_FAILURE",
130            TransactionErrorType::ClusterMaintenance => "CLUSTER_MAINTENANCE",
131            TransactionErrorType::AccountBorrowOutstandingTx => {
132                "ACCOUNT_BORROW_OUTSTANDING_TX"
133            }
134            TransactionErrorType::WouldExceedMaxBlockCostLimit => {
135                "WOULD_EXCEED_MAX_BLOCK_COST_LIMIT"
136            }
137            TransactionErrorType::UnsupportedVersion => "UNSUPPORTED_VERSION",
138            TransactionErrorType::InvalidWritableAccount => "INVALID_WRITABLE_ACCOUNT",
139            TransactionErrorType::WouldExceedMaxAccountCostLimit => {
140                "WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT"
141            }
142            TransactionErrorType::WouldExceedAccountDataBlockLimit => {
143                "WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT"
144            }
145            TransactionErrorType::TooManyAccountLocks => "TOO_MANY_ACCOUNT_LOCKS",
146            TransactionErrorType::AddressLookupTableNotFound => {
147                "ADDRESS_LOOKUP_TABLE_NOT_FOUND"
148            }
149            TransactionErrorType::InvalidAddressLookupTableOwner => {
150                "INVALID_ADDRESS_LOOKUP_TABLE_OWNER"
151            }
152            TransactionErrorType::InvalidAddressLookupTableData => {
153                "INVALID_ADDRESS_LOOKUP_TABLE_DATA"
154            }
155            TransactionErrorType::InvalidAddressLookupTableIndex => {
156                "INVALID_ADDRESS_LOOKUP_TABLE_INDEX"
157            }
158            TransactionErrorType::InvalidRentPayingAccount => {
159                "INVALID_RENT_PAYING_ACCOUNT"
160            }
161            TransactionErrorType::WouldExceedMaxVoteCostLimit => {
162                "WOULD_EXCEED_MAX_VOTE_COST_LIMIT"
163            }
164            TransactionErrorType::WouldExceedAccountDataTotalLimit => {
165                "WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT"
166            }
167            TransactionErrorType::DuplicateInstruction => "DUPLICATE_INSTRUCTION",
168            TransactionErrorType::InsufficientFundsForRent => {
169                "INSUFFICIENT_FUNDS_FOR_RENT"
170            }
171            TransactionErrorType::MaxLoadedAccountsDataSizeExceeded => {
172                "MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED"
173            }
174            TransactionErrorType::InvalidLoadedAccountsDataSizeLimit => {
175                "INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT"
176            }
177            TransactionErrorType::ResanitizationNeeded => "RESANITIZATION_NEEDED",
178            TransactionErrorType::UnbalancedTransaction => "UNBALANCED_TRANSACTION",
179        }
180    }
181    /// Creates an enum from field names used in the ProtoBuf definition.
182    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
183        match value {
184            "ACCOUNT_IN_USE" => Some(Self::AccountInUse),
185            "ACCOUNT_LOADED_TWICE" => Some(Self::AccountLoadedTwice),
186            "ACCOUNT_NOT_FOUND" => Some(Self::AccountNotFound),
187            "PROGRAM_ACCOUNT_NOT_FOUND" => Some(Self::ProgramAccountNotFound),
188            "INSUFFICIENT_FUNDS_FOR_FEE" => Some(Self::InsufficientFundsForFee),
189            "INVALID_ACCOUNT_FOR_FEE" => Some(Self::InvalidAccountForFee),
190            "ALREADY_PROCESSED" => Some(Self::AlreadyProcessed),
191            "BLOCKHASH_NOT_FOUND" => Some(Self::BlockhashNotFound),
192            "INSTRUCTION_ERROR" => Some(Self::InstructionError),
193            "CALL_CHAIN_TOO_DEEP" => Some(Self::CallChainTooDeep),
194            "MISSING_SIGNATURE_FOR_FEE" => Some(Self::MissingSignatureForFee),
195            "INVALID_ACCOUNT_INDEX" => Some(Self::InvalidAccountIndex),
196            "SIGNATURE_FAILURE" => Some(Self::SignatureFailure),
197            "INVALID_PROGRAM_FOR_EXECUTION" => Some(Self::InvalidProgramForExecution),
198            "SANITIZE_FAILURE" => Some(Self::SanitizeFailure),
199            "CLUSTER_MAINTENANCE" => Some(Self::ClusterMaintenance),
200            "ACCOUNT_BORROW_OUTSTANDING_TX" => Some(Self::AccountBorrowOutstandingTx),
201            "WOULD_EXCEED_MAX_BLOCK_COST_LIMIT" => {
202                Some(Self::WouldExceedMaxBlockCostLimit)
203            }
204            "UNSUPPORTED_VERSION" => Some(Self::UnsupportedVersion),
205            "INVALID_WRITABLE_ACCOUNT" => Some(Self::InvalidWritableAccount),
206            "WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT" => {
207                Some(Self::WouldExceedMaxAccountCostLimit)
208            }
209            "WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT" => {
210                Some(Self::WouldExceedAccountDataBlockLimit)
211            }
212            "TOO_MANY_ACCOUNT_LOCKS" => Some(Self::TooManyAccountLocks),
213            "ADDRESS_LOOKUP_TABLE_NOT_FOUND" => Some(Self::AddressLookupTableNotFound),
214            "INVALID_ADDRESS_LOOKUP_TABLE_OWNER" => {
215                Some(Self::InvalidAddressLookupTableOwner)
216            }
217            "INVALID_ADDRESS_LOOKUP_TABLE_DATA" => {
218                Some(Self::InvalidAddressLookupTableData)
219            }
220            "INVALID_ADDRESS_LOOKUP_TABLE_INDEX" => {
221                Some(Self::InvalidAddressLookupTableIndex)
222            }
223            "INVALID_RENT_PAYING_ACCOUNT" => Some(Self::InvalidRentPayingAccount),
224            "WOULD_EXCEED_MAX_VOTE_COST_LIMIT" => Some(Self::WouldExceedMaxVoteCostLimit),
225            "WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT" => {
226                Some(Self::WouldExceedAccountDataTotalLimit)
227            }
228            "DUPLICATE_INSTRUCTION" => Some(Self::DuplicateInstruction),
229            "INSUFFICIENT_FUNDS_FOR_RENT" => Some(Self::InsufficientFundsForRent),
230            "MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED" => {
231                Some(Self::MaxLoadedAccountsDataSizeExceeded)
232            }
233            "INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT" => {
234                Some(Self::InvalidLoadedAccountsDataSizeLimit)
235            }
236            _ => None,
237        }
238    }
239}
240#[cfg_attr(test, derive(enum_iterator::Sequence))]
241#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
242#[repr(i32)]
243pub enum InstructionErrorType {
244    GenericError = 0,
245    InvalidArgument = 1,
246    InvalidInstructionData = 2,
247    InvalidAccountData = 3,
248    AccountDataTooSmall = 4,
249    InsufficientFunds = 5,
250    IncorrectProgramId = 6,
251    MissingRequiredSignature = 7,
252    AccountAlreadyInitialized = 8,
253    UninitializedAccount = 9,
254    UnbalancedInstruction = 10,
255    ModifiedProgramId = 11,
256    ExternalAccountLamportSpend = 12,
257    ExternalAccountDataModified = 13,
258    ReadonlyLamportChange = 14,
259    ReadonlyDataModified = 15,
260    DuplicateAccountIndex = 16,
261    ExecutableModified = 17,
262    RentEpochModified = 18,
263    NotEnoughAccountKeys = 19,
264    AccountDataSizeChanged = 20,
265    AccountNotExecutable = 21,
266    AccountBorrowFailed = 22,
267    AccountBorrowOutstanding = 23,
268    DuplicateAccountOutOfSync = 24,
269    Custom = 25,
270    InvalidError = 26,
271    ExecutableDataModified = 27,
272    ExecutableLamportChange = 28,
273    ExecutableAccountNotRentExempt = 29,
274    UnsupportedProgramId = 30,
275    CallDepth = 31,
276    MissingAccount = 32,
277    ReentrancyNotAllowed = 33,
278    MaxSeedLengthExceeded = 34,
279    InvalidSeeds = 35,
280    InvalidRealloc = 36,
281    ComputationalBudgetExceeded = 37,
282    PrivilegeEscalation = 38,
283    ProgramEnvironmentSetupFailure = 39,
284    ProgramFailedToComplete = 40,
285    ProgramFailedToCompile = 41,
286    Immutable = 42,
287    IncorrectAuthority = 43,
288    BorshIoError = 44,
289    AccountNotRentExempt = 45,
290    InvalidAccountOwner = 46,
291    ArithmeticOverflow = 47,
292    UnsupportedSysvar = 48,
293    IllegalOwner = 49,
294    MaxAccountsDataAllocationsExceeded = 50,
295    MaxAccountsExceeded = 51,
296    MaxInstructionTraceLengthExceeded = 52,
297    BuiltinProgramsMustConsumeComputeUnits = 53,
298}
299impl InstructionErrorType {
300    /// String value of the enum field names used in the ProtoBuf definition.
301    ///
302    /// The values are not transformed in any way and thus are considered stable
303    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
304    pub fn as_str_name(&self) -> &'static str {
305        match self {
306            InstructionErrorType::GenericError => "GENERIC_ERROR",
307            InstructionErrorType::InvalidArgument => "INVALID_ARGUMENT",
308            InstructionErrorType::InvalidInstructionData => "INVALID_INSTRUCTION_DATA",
309            InstructionErrorType::InvalidAccountData => "INVALID_ACCOUNT_DATA",
310            InstructionErrorType::AccountDataTooSmall => "ACCOUNT_DATA_TOO_SMALL",
311            InstructionErrorType::InsufficientFunds => "INSUFFICIENT_FUNDS",
312            InstructionErrorType::IncorrectProgramId => "INCORRECT_PROGRAM_ID",
313            InstructionErrorType::MissingRequiredSignature => {
314                "MISSING_REQUIRED_SIGNATURE"
315            }
316            InstructionErrorType::AccountAlreadyInitialized => {
317                "ACCOUNT_ALREADY_INITIALIZED"
318            }
319            InstructionErrorType::UninitializedAccount => "UNINITIALIZED_ACCOUNT",
320            InstructionErrorType::UnbalancedInstruction => "UNBALANCED_INSTRUCTION",
321            InstructionErrorType::ModifiedProgramId => "MODIFIED_PROGRAM_ID",
322            InstructionErrorType::ExternalAccountLamportSpend => {
323                "EXTERNAL_ACCOUNT_LAMPORT_SPEND"
324            }
325            InstructionErrorType::ExternalAccountDataModified => {
326                "EXTERNAL_ACCOUNT_DATA_MODIFIED"
327            }
328            InstructionErrorType::ReadonlyLamportChange => "READONLY_LAMPORT_CHANGE",
329            InstructionErrorType::ReadonlyDataModified => "READONLY_DATA_MODIFIED",
330            InstructionErrorType::DuplicateAccountIndex => "DUPLICATE_ACCOUNT_INDEX",
331            InstructionErrorType::ExecutableModified => "EXECUTABLE_MODIFIED",
332            InstructionErrorType::RentEpochModified => "RENT_EPOCH_MODIFIED",
333            InstructionErrorType::NotEnoughAccountKeys => "NOT_ENOUGH_ACCOUNT_KEYS",
334            InstructionErrorType::AccountDataSizeChanged => "ACCOUNT_DATA_SIZE_CHANGED",
335            InstructionErrorType::AccountNotExecutable => "ACCOUNT_NOT_EXECUTABLE",
336            InstructionErrorType::AccountBorrowFailed => "ACCOUNT_BORROW_FAILED",
337            InstructionErrorType::AccountBorrowOutstanding => {
338                "ACCOUNT_BORROW_OUTSTANDING"
339            }
340            InstructionErrorType::DuplicateAccountOutOfSync => {
341                "DUPLICATE_ACCOUNT_OUT_OF_SYNC"
342            }
343            InstructionErrorType::Custom => "CUSTOM",
344            InstructionErrorType::InvalidError => "INVALID_ERROR",
345            InstructionErrorType::ExecutableDataModified => "EXECUTABLE_DATA_MODIFIED",
346            InstructionErrorType::ExecutableLamportChange => "EXECUTABLE_LAMPORT_CHANGE",
347            InstructionErrorType::ExecutableAccountNotRentExempt => {
348                "EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT"
349            }
350            InstructionErrorType::UnsupportedProgramId => "UNSUPPORTED_PROGRAM_ID",
351            InstructionErrorType::CallDepth => "CALL_DEPTH",
352            InstructionErrorType::MissingAccount => "MISSING_ACCOUNT",
353            InstructionErrorType::ReentrancyNotAllowed => "REENTRANCY_NOT_ALLOWED",
354            InstructionErrorType::MaxSeedLengthExceeded => "MAX_SEED_LENGTH_EXCEEDED",
355            InstructionErrorType::InvalidSeeds => "INVALID_SEEDS",
356            InstructionErrorType::InvalidRealloc => "INVALID_REALLOC",
357            InstructionErrorType::ComputationalBudgetExceeded => {
358                "COMPUTATIONAL_BUDGET_EXCEEDED"
359            }
360            InstructionErrorType::PrivilegeEscalation => "PRIVILEGE_ESCALATION",
361            InstructionErrorType::ProgramEnvironmentSetupFailure => {
362                "PROGRAM_ENVIRONMENT_SETUP_FAILURE"
363            }
364            InstructionErrorType::ProgramFailedToComplete => "PROGRAM_FAILED_TO_COMPLETE",
365            InstructionErrorType::ProgramFailedToCompile => "PROGRAM_FAILED_TO_COMPILE",
366            InstructionErrorType::Immutable => "IMMUTABLE",
367            InstructionErrorType::IncorrectAuthority => "INCORRECT_AUTHORITY",
368            InstructionErrorType::BorshIoError => "BORSH_IO_ERROR",
369            InstructionErrorType::AccountNotRentExempt => "ACCOUNT_NOT_RENT_EXEMPT",
370            InstructionErrorType::InvalidAccountOwner => "INVALID_ACCOUNT_OWNER",
371            InstructionErrorType::ArithmeticOverflow => "ARITHMETIC_OVERFLOW",
372            InstructionErrorType::UnsupportedSysvar => "UNSUPPORTED_SYSVAR",
373            InstructionErrorType::IllegalOwner => "ILLEGAL_OWNER",
374            InstructionErrorType::MaxAccountsDataAllocationsExceeded => {
375                "MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED"
376            }
377            InstructionErrorType::MaxAccountsExceeded => "MAX_ACCOUNTS_EXCEEDED",
378            InstructionErrorType::MaxInstructionTraceLengthExceeded => {
379                "MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED"
380            }
381            InstructionErrorType::BuiltinProgramsMustConsumeComputeUnits => {
382                "BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS"
383            }
384        }
385    }
386    /// Creates an enum from field names used in the ProtoBuf definition.
387    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
388        match value {
389            "GENERIC_ERROR" => Some(Self::GenericError),
390            "INVALID_ARGUMENT" => Some(Self::InvalidArgument),
391            "INVALID_INSTRUCTION_DATA" => Some(Self::InvalidInstructionData),
392            "INVALID_ACCOUNT_DATA" => Some(Self::InvalidAccountData),
393            "ACCOUNT_DATA_TOO_SMALL" => Some(Self::AccountDataTooSmall),
394            "INSUFFICIENT_FUNDS" => Some(Self::InsufficientFunds),
395            "INCORRECT_PROGRAM_ID" => Some(Self::IncorrectProgramId),
396            "MISSING_REQUIRED_SIGNATURE" => Some(Self::MissingRequiredSignature),
397            "ACCOUNT_ALREADY_INITIALIZED" => Some(Self::AccountAlreadyInitialized),
398            "UNINITIALIZED_ACCOUNT" => Some(Self::UninitializedAccount),
399            "UNBALANCED_INSTRUCTION" => Some(Self::UnbalancedInstruction),
400            "MODIFIED_PROGRAM_ID" => Some(Self::ModifiedProgramId),
401            "EXTERNAL_ACCOUNT_LAMPORT_SPEND" => Some(Self::ExternalAccountLamportSpend),
402            "EXTERNAL_ACCOUNT_DATA_MODIFIED" => Some(Self::ExternalAccountDataModified),
403            "READONLY_LAMPORT_CHANGE" => Some(Self::ReadonlyLamportChange),
404            "READONLY_DATA_MODIFIED" => Some(Self::ReadonlyDataModified),
405            "DUPLICATE_ACCOUNT_INDEX" => Some(Self::DuplicateAccountIndex),
406            "EXECUTABLE_MODIFIED" => Some(Self::ExecutableModified),
407            "RENT_EPOCH_MODIFIED" => Some(Self::RentEpochModified),
408            "NOT_ENOUGH_ACCOUNT_KEYS" => Some(Self::NotEnoughAccountKeys),
409            "ACCOUNT_DATA_SIZE_CHANGED" => Some(Self::AccountDataSizeChanged),
410            "ACCOUNT_NOT_EXECUTABLE" => Some(Self::AccountNotExecutable),
411            "ACCOUNT_BORROW_FAILED" => Some(Self::AccountBorrowFailed),
412            "ACCOUNT_BORROW_OUTSTANDING" => Some(Self::AccountBorrowOutstanding),
413            "DUPLICATE_ACCOUNT_OUT_OF_SYNC" => Some(Self::DuplicateAccountOutOfSync),
414            "CUSTOM" => Some(Self::Custom),
415            "INVALID_ERROR" => Some(Self::InvalidError),
416            "EXECUTABLE_DATA_MODIFIED" => Some(Self::ExecutableDataModified),
417            "EXECUTABLE_LAMPORT_CHANGE" => Some(Self::ExecutableLamportChange),
418            "EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT" => {
419                Some(Self::ExecutableAccountNotRentExempt)
420            }
421            "UNSUPPORTED_PROGRAM_ID" => Some(Self::UnsupportedProgramId),
422            "CALL_DEPTH" => Some(Self::CallDepth),
423            "MISSING_ACCOUNT" => Some(Self::MissingAccount),
424            "REENTRANCY_NOT_ALLOWED" => Some(Self::ReentrancyNotAllowed),
425            "MAX_SEED_LENGTH_EXCEEDED" => Some(Self::MaxSeedLengthExceeded),
426            "INVALID_SEEDS" => Some(Self::InvalidSeeds),
427            "INVALID_REALLOC" => Some(Self::InvalidRealloc),
428            "COMPUTATIONAL_BUDGET_EXCEEDED" => Some(Self::ComputationalBudgetExceeded),
429            "PRIVILEGE_ESCALATION" => Some(Self::PrivilegeEscalation),
430            "PROGRAM_ENVIRONMENT_SETUP_FAILURE" => {
431                Some(Self::ProgramEnvironmentSetupFailure)
432            }
433            "PROGRAM_FAILED_TO_COMPLETE" => Some(Self::ProgramFailedToComplete),
434            "PROGRAM_FAILED_TO_COMPILE" => Some(Self::ProgramFailedToCompile),
435            "IMMUTABLE" => Some(Self::Immutable),
436            "INCORRECT_AUTHORITY" => Some(Self::IncorrectAuthority),
437            "BORSH_IO_ERROR" => Some(Self::BorshIoError),
438            "ACCOUNT_NOT_RENT_EXEMPT" => Some(Self::AccountNotRentExempt),
439            "INVALID_ACCOUNT_OWNER" => Some(Self::InvalidAccountOwner),
440            "ARITHMETIC_OVERFLOW" => Some(Self::ArithmeticOverflow),
441            "UNSUPPORTED_SYSVAR" => Some(Self::UnsupportedSysvar),
442            "ILLEGAL_OWNER" => Some(Self::IllegalOwner),
443            "MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED" => {
444                Some(Self::MaxAccountsDataAllocationsExceeded)
445            }
446            "MAX_ACCOUNTS_EXCEEDED" => Some(Self::MaxAccountsExceeded),
447            "MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED" => {
448                Some(Self::MaxInstructionTraceLengthExceeded)
449            }
450            _ => None,
451        }
452    }
453}