Enum near_vm_errors::EvmError[][src]

pub enum EvmError {
    ContractNotFound,
    DuplicateContract(Vec<u8>),
    DeployFail(Vec<u8>),
    Revert(Vec<u8>),
    ArgumentParseError,
    MissingDeposit,
    InsufficientFunds,
    IntegerOverflow,
    MethodNotFound,
    InvalidEcRecoverSignature,
    InvalidNonce,
    InvalidSubAccount,
    FailSelfWithdraw,
    InsufficientDeposit,
    OutOfGas,
    BadJumpDestination {
        destination: u64,
    },
    BadInstruction {
        instruction: u8,
    },
    StackUnderflow {
        instruction: String,
        wanted: u64,
        on_stack: u64,
    },
    OutOfStack {
        instruction: String,
        wanted: u64,
        limit: u64,
    },
    BuiltIn(String),
    MutableCallInStaticContext,
    OutOfBounds,
    Reverted,
    InvalidMetaTransactionMethodName,
    InvalidMetaTransactionFunctionArg,
    InvalidChainId,
}

Errors specifically from native EVM.

Variants

ContractNotFound

Contract not found.

DuplicateContract(Vec<u8>)

Fatal failure due conflicting addresses on contract deployment.

DeployFail(Vec<u8>)

Contract deployment failure.

Revert(Vec<u8>)

Contract execution failed, revert the state.

ArgumentParseError

Failed to parse arguments.

MissingDeposit

No deposit when expected.

InsufficientFunds

Insufficient funds to finish the operation.

IntegerOverflow

U256 overflow.

MethodNotFound

Method not found.

InvalidEcRecoverSignature

Invalid signature when recovering.

InvalidNonce

Invalid nonce.

InvalidSubAccount

Invalid sub EVM account.

FailSelfWithdraw

Won't withdraw to itself.

InsufficientDeposit

Too small NEAR deposit.

OutOfGas

OutOfGas is returned when transaction execution runs out of gas. The state should be reverted to the state from before the transaction execution. But it does not mean that transaction was invalid. Balance still should be transfered and nonce should be increased.

BadJumpDestination

BadJumpDestination is returned when execution tried to move to position that wasn't marked with JUMPDEST instruction

Fields of BadJumpDestination

destination: u64

Position the code tried to jump to.

BadInstruction

BadInstructions is returned when given instruction is not supported

Fields of BadInstruction

instruction: u8

Unrecognized opcode

StackUnderflow

StackUnderflow when there is not enough stack elements to execute instruction

Fields of StackUnderflow

instruction: String

Invoked instruction

wanted: u64

How many stack elements was requested by instruction

on_stack: u64

How many elements were on stack

OutOfStack

When execution would exceed defined Stack Limit

Fields of OutOfStack

instruction: String

Invoked instruction

wanted: u64

How many stack elements instruction wanted to push

limit: u64

What was the stack limit

BuiltIn(String)

Built-in contract failed on given input

MutableCallInStaticContext

When execution tries to modify the state in static context

OutOfBounds

Out of bounds access in RETURNDATACOPY.

Reverted

Execution has been reverted with REVERT.

InvalidMetaTransactionMethodName

Invalid method name to parse

InvalidMetaTransactionFunctionArg

Invalid function args in meta txn

InvalidChainId

Chain ID doesn't match. Trying to use transaction signed for a different chain.

Trait Implementations

impl BorshDeserialize for EvmError where
    Vec<u8>: BorshDeserialize,
    Vec<u8>: BorshDeserialize,
    Vec<u8>: BorshDeserialize,
    u64: BorshDeserialize,
    u8: BorshDeserialize,
    String: BorshDeserialize,
    u64: BorshDeserialize,
    u64: BorshDeserialize,
    String: BorshDeserialize,
    u64: BorshDeserialize,
    u64: BorshDeserialize,
    String: BorshDeserialize
[src]

impl BorshSerialize for EvmError where
    Vec<u8>: BorshSerialize,
    Vec<u8>: BorshSerialize,
    Vec<u8>: BorshSerialize,
    u64: BorshSerialize,
    u8: BorshSerialize,
    String: BorshSerialize,
    u64: BorshSerialize,
    u64: BorshSerialize,
    String: BorshSerialize,
    u64: BorshSerialize,
    u64: BorshSerialize,
    String: BorshSerialize
[src]

impl Clone for EvmError[src]

impl Debug for EvmError[src]

impl<'de> Deserialize<'de> for EvmError[src]

impl Eq for EvmError[src]

impl PartialEq<EvmError> for EvmError[src]

impl Serialize for EvmError[src]

impl StructuralEq for EvmError[src]

impl StructuralPartialEq for EvmError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.