Enum cfx_vm_types::Error
source · pub enum Error {
Show 19 variants
OutOfGas,
BadJumpDestination {
destination: usize,
},
BadInstruction {
instruction: u8,
},
StackUnderflow {
instruction: &'static str,
wanted: usize,
on_stack: usize,
},
OutOfStack {
instruction: &'static str,
wanted: usize,
limit: usize,
},
SubStackUnderflow {
wanted: usize,
on_stack: usize,
},
OutOfSubStack {
wanted: usize,
limit: usize,
},
InvalidSubEntry,
NotEnoughBalanceForStorage {
required: U256,
got: U256,
},
ExceedStorageLimit,
BuiltIn(&'static str),
InternalContract(String),
MutableCallInStaticContext,
StateDbError(PartialEqWrapper<Error>),
Wasm(String),
OutOfBounds,
Reverted,
InvalidAddress(Address),
ConflictAddress(Address),
}
Expand description
VM errors.
Variants§
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
BadInstruction
BadInstructions
is returned when given instruction is not supported
StackUnderflow
Fields
StackUnderflow
when there is not enough stack elements to execute
instruction
OutOfStack
Fields
When execution would exceed defined Stack Limit
SubStackUnderflow
Fields
SubStackUnderflow
when there is not enough stack elements to execute
a subroutine return
OutOfSubStack
Fields
When execution would exceed defined subroutine Stack Limit
InvalidSubEntry
NotEnoughBalanceForStorage
When balance is not enough for collateral_for_storage
.
The state should be reverted to the state from before the
transaction execution.
ExceedStorageLimit
ExceedStorageLimit
is returned when the collateral_for_storage
exceed the storage_limit
.
BuiltIn(&'static str)
Built-in contract failed on given input
InternalContract(String)
Internal contract failed
MutableCallInStaticContext
When execution tries to modify the state in static context
StateDbError(PartialEqWrapper<Error>)
Error from storage.
Wasm(String)
Wasm runtime error
OutOfBounds
Out of bounds access in RETURNDATACOPY.
Reverted
Execution has been reverted with REVERT.
InvalidAddress(Address)
Invalid address
ConflictAddress(Address)
Create a contract on an address with existing contract