pub enum Error {
Show 20 variants AlreadyImported, Old, LimitReached, InsufficientGasPrice { minimal: U256, got: U256, }, GasPriceLowerThanBaseFee { gas_price: U256, base_fee: U256, }, TooCheapToReplace { prev: Option<U256>, new: Option<U256>, }, InsufficientGas { minimal: U256, got: U256, }, InsufficientBalance { balance: U256, cost: U256, }, GasLimitExceeded { limit: U256, got: U256, }, InvalidGasLimit(OutOfBounds<U256>), SenderBanned, RecipientBanned, CodeBanned, InvalidChainId, NotAllowed, InvalidSignature(String), TooBig, InvalidRlp(String), TransactionTypeNotEnabled, SenderIsNotEOA,
}
Expand description

Errors concerning transaction processing.

Variants

AlreadyImported

Transaction is already imported to the queue

Old

Transaction is not valid anymore (state already has higher nonce)

LimitReached

Transaction was not imported to the queue because limit has been reached.

InsufficientGasPrice

Fields

minimal: U256

Minimal expected gas price

got: U256

Transaction gas price

Transaction’s gas price is below threshold.

GasPriceLowerThanBaseFee

Fields

gas_price: U256

Transaction max gas price

base_fee: U256

Current block base fee

Transaction’s max gas price is lower then block base fee.

TooCheapToReplace

Fields

prev: Option<U256>

previous transaction’s gas price

new: Option<U256>

new transaction’s gas price

Transaction has too low fee (there is already a transaction with the same sender-nonce but higher gas price)

InsufficientGas

Fields

minimal: U256

Minimal expected gas

got: U256

Transaction gas

Transaction’s gas is below currently set minimal gas requirement.

InsufficientBalance

Fields

balance: U256

Senders balance

cost: U256

Transaction cost

Sender doesn’t have enough funds to pay for this transaction

GasLimitExceeded

Fields

limit: U256

Current gas limit

got: U256

Declared transaction gas

Transactions gas is higher then current gas limit

InvalidGasLimit(OutOfBounds<U256>)

Transaction’s gas limit (aka gas) is invalid.

SenderBanned

Transaction sender is banned.

RecipientBanned

Transaction receipient is banned.

CodeBanned

Contract creation code is banned.

InvalidChainId

Invalid chain ID given.

NotAllowed

Not enough permissions given by permission contract.

InvalidSignature(String)

Signature error

TooBig

Transaction too big

InvalidRlp(String)

Invalid RLP encoding

TransactionTypeNotEnabled

Transaciton is still not enabled.

SenderIsNotEOA

Transaction sender is not an EOA (see EIP-3607)

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

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

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.