Enum solana_sdk::transaction::TransactionError

source ·
pub enum TransactionError {
Show 37 variants AccountInUse, AccountLoadedTwice, AccountNotFound, ProgramAccountNotFound, InsufficientFundsForFee, InvalidAccountForFee, AlreadyProcessed, BlockhashNotFound, InstructionError(u8, InstructionError), CallChainTooDeep, MissingSignatureForFee, InvalidAccountIndex, SignatureFailure, InvalidProgramForExecution, SanitizeFailure, ClusterMaintenance, AccountBorrowOutstanding, WouldExceedMaxBlockCostLimit, UnsupportedVersion, InvalidWritableAccount, WouldExceedMaxAccountCostLimit, WouldExceedAccountDataBlockLimit, TooManyAccountLocks, AddressLookupTableNotFound, InvalidAddressLookupTableOwner, InvalidAddressLookupTableData, InvalidAddressLookupTableIndex, InvalidRentPayingAccount, WouldExceedMaxVoteCostLimit, WouldExceedAccountDataTotalLimit, DuplicateInstruction(u8), InsufficientFundsForRent { account_index: u8, }, MaxLoadedAccountsDataSizeExceeded, InvalidLoadedAccountsDataSizeLimit, ResanitizationNeeded, ProgramExecutionTemporarilyRestricted { account_index: u8, }, UnbalancedTransaction,
}
Expand description

Reasons a transaction might be rejected.

Variants§

§

AccountInUse

An account is already being processed in another transaction in a way that does not support parallelism

§

AccountLoadedTwice

A Pubkey appears twice in the transaction’s account_keys. Instructions can reference Pubkeys more than once but the message must contain a list with no duplicate keys

§

AccountNotFound

Attempt to debit an account but found no record of a prior credit.

§

ProgramAccountNotFound

Attempt to load a program that does not exist

§

InsufficientFundsForFee

The from Pubkey does not have sufficient balance to pay the fee to schedule the transaction

§

InvalidAccountForFee

This account may not be used to pay transaction fees

§

AlreadyProcessed

The bank has seen this transaction before. This can occur under normal operation when a UDP packet is duplicated, as a user error from a client not updating its recent_blockhash, or as a double-spend attack.

§

BlockhashNotFound

The bank has not seen the given recent_blockhash or the transaction is too old and the recent_blockhash has been discarded.

§

InstructionError(u8, InstructionError)

An error occurred while processing an instruction. The first element of the tuple indicates the instruction index in which the error occurred.

§

CallChainTooDeep

Loader call chain is too deep

§

MissingSignatureForFee

Transaction requires a fee but has no signature present

§

InvalidAccountIndex

Transaction contains an invalid account reference

§

SignatureFailure

Transaction did not pass signature verification

§

InvalidProgramForExecution

This program may not be used for executing instructions

§

SanitizeFailure

Transaction failed to sanitize accounts offsets correctly implies that account locks are not taken for this TX, and should not be unlocked.

§

ClusterMaintenance

§

AccountBorrowOutstanding

Transaction processing left an account with an outstanding borrowed reference

§

WouldExceedMaxBlockCostLimit

Transaction would exceed max Block Cost Limit

§

UnsupportedVersion

Transaction version is unsupported

§

InvalidWritableAccount

Transaction loads a writable account that cannot be written

§

WouldExceedMaxAccountCostLimit

Transaction would exceed max account limit within the block

§

WouldExceedAccountDataBlockLimit

Transaction would exceed account data limit within the block

§

TooManyAccountLocks

Transaction locked too many accounts

§

AddressLookupTableNotFound

Address lookup table not found

§

InvalidAddressLookupTableOwner

Attempted to lookup addresses from an account owned by the wrong program

§

InvalidAddressLookupTableData

Attempted to lookup addresses from an invalid account

§

InvalidAddressLookupTableIndex

Address table lookup uses an invalid index

§

InvalidRentPayingAccount

Transaction leaves an account with a lower balance than rent-exempt minimum

§

WouldExceedMaxVoteCostLimit

Transaction would exceed max Vote Cost Limit

§

WouldExceedAccountDataTotalLimit

Transaction would exceed total account data limit

§

DuplicateInstruction(u8)

Transaction contains a duplicate instruction that is not allowed

§

InsufficientFundsForRent

Transaction results in an account with insufficient funds for rent

Fields

§account_index: u8
§

MaxLoadedAccountsDataSizeExceeded

Transaction exceeded max loaded accounts data size cap

§

InvalidLoadedAccountsDataSizeLimit

LoadedAccountsDataSizeLimit set for transaction must be greater than 0.

§

ResanitizationNeeded

Sanitized transaction differed before/after feature activiation. Needs to be resanitized.

§

ProgramExecutionTemporarilyRestricted

Program execution is temporarily restricted on an account.

Fields

§account_index: u8
§

UnbalancedTransaction

The total balance before the transaction does not equal the total balance after the transaction

Trait Implementations§

source§

impl AbiEnumVisitor for TransactionError

source§

fn visit_for_abi(&self, digester: &mut AbiDigester) -> DigestResult

source§

impl AbiExample for TransactionError

source§

fn example() -> Self

source§

impl Clone for TransactionError

source§

fn clone(&self) -> TransactionError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TransactionError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TransactionError

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for TransactionError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for TransactionError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<AddressLoaderError> for TransactionError

source§

fn from(err: AddressLoaderError) -> Self

Converts to this type from the input type.
source§

impl From<SanitizeError> for TransactionError

source§

fn from(_: SanitizeError) -> Self

Converts to this type from the input type.
source§

impl From<SanitizeMessageError> for TransactionError

source§

fn from(err: SanitizeMessageError) -> Self

Converts to this type from the input type.
source§

impl From<TransactionError> for SignerError

source§

fn from(source: TransactionError) -> Self

Converts to this type from the input type.
source§

impl From<TransactionError> for TransportError

source§

fn from(source: TransactionError) -> Self

Converts to this type from the input type.
source§

impl PartialEq for TransactionError

source§

fn eq(&self, other: &TransactionError) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TransactionError

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TransactionError

source§

impl StructuralPartialEq for TransactionError

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> AbiEnumVisitor for T
where T: Serialize + ?Sized,

source§

default fn visit_for_abi( &self, _digester: &mut AbiDigester ) -> Result<AbiDigester, DigestError>

source§

impl<T> AbiEnumVisitor for T
where T: Serialize + AbiExample + ?Sized,

source§

default fn visit_for_abi( &self, digester: &mut AbiDigester ) -> Result<AbiDigester, DigestError>

source§

impl<T> AbiExample for T

source§

default fn example() -> T

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,