Enum common_types::transaction::Error
source · [−]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
Transaction’s gas price is below threshold.
GasPriceLowerThanBaseFee
Transaction’s max gas price is lower then block base fee.
TooCheapToReplace
Fields
Transaction has too low fee (there is already a transaction with the same sender-nonce but higher gas price)
InsufficientGas
Transaction’s gas is below currently set minimal gas requirement.
InsufficientBalance
Sender doesn’t have enough funds to pay for this transaction
GasLimitExceeded
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
sourceimpl Error for Error
impl Error for Error
sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourceimpl From<DecoderError> for Error
impl From<DecoderError> for Error
sourcefn from(err: DecoderError) -> Self
fn from(err: DecoderError) -> Self
Performs the conversion.
impl StructuralPartialEq for Error
Auto Trait Implementations
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more