Trait InvalidTxError
pub trait InvalidTxError:
Error
+ Send
+ Sync
+ Any
+ 'static {
// Required method
fn as_invalid_tx_err(&self) -> Option<&InvalidTransaction>;
// Provided methods
fn is_nonce_too_low(&self) -> bool { ... }
fn is_gas_limit_too_high(&self) -> bool { ... }
fn is_gas_limit_too_low(&self) -> bool { ... }
}Expand description
Abstraction over transaction validation error.
Required Methods§
fn as_invalid_tx_err(&self) -> Option<&InvalidTransaction>
fn as_invalid_tx_err(&self) -> Option<&InvalidTransaction>
Returns the underlying InvalidTransaction if any.
This is primarily used for error conversions, e.g. for rpc responses.
Provided Methods§
fn is_nonce_too_low(&self) -> bool
fn is_nonce_too_low(&self) -> bool
Returns whether the error cause by transaction having a nonce lower than expected.
fn is_gas_limit_too_high(&self) -> bool
fn is_gas_limit_too_high(&self) -> bool
Returns whether the error is due to the transaction gas limit being higher than allowed.
fn is_gas_limit_too_low(&self) -> bool
fn is_gas_limit_too_low(&self) -> bool
Returns whether the error is due to the transaction gas limit being lower than required.
Implementors§
impl InvalidTxError for OpTransactionError
Available on crate feature
op only.