pub enum ExecutionError {
    NotEnoughBaseGas {
        required: U256,
        got: U256,
    },
    BlockGasLimitReached {
        gas_limit: U256,
        gas_used: U256,
        gas: U256,
    },
    GasPriceLowerThanBaseFee {
        gas_price: U256,
        base_fee: U256,
    },
    InvalidNonce {
        expected: U256,
        got: U256,
    },
    NotEnoughCash {
        required: U512,
        got: U512,
    },
    MutableCallInStaticContext,
    SenderMustExist,
    Internal(String),
    TransactionMalformed(String),
}
Expand description

Result of executing the transaction.

Variants

NotEnoughBaseGas

Fields

required: U256

Absolute minimum gas required.

got: U256

Gas provided.

Returned when there gas paid for transaction execution is lower than base gas required.

BlockGasLimitReached

Fields

gas_limit: U256

Gas limit of block for transaction.

gas_used: U256

Gas used in block prior to transaction.

gas: U256

Amount of gas in block.

Returned when block (gas_used + gas) > gas_limit.

If gas =< gas_limit, upstream may try to execute the transaction in next block.

GasPriceLowerThanBaseFee

Fields

gas_price: U256

Max gas price of the transaction.

base_fee: U256

Block base fee.

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

InvalidNonce

Fields

expected: U256

Nonce expected.

got: U256

Nonce found.

Returned when transaction nonce does not match state nonce.

NotEnoughCash

Fields

required: U512

Minimum required balance.

got: U512

Actual balance.

Returned when cost of transaction (value + gas_price * gas) exceeds current sender balance.

MutableCallInStaticContext

When execution tries to modify the state in static context

SenderMustExist

Returned when transacting from a non-existing account with dust protection enabled.

Internal(String)

Returned when internal evm error occurs.

TransactionMalformed(String)

Returned when generic transaction occurs

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.

Error concerning EVM code execution.

Performs the conversion.

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.