ethereum.shanghai.vm.exceptions
Ethereum Virtual Machine (EVM) Exceptions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. contents:: Table of Contents :backlinks: none :local:
Introduction
Exceptions which cause the EVM to halt exceptionally.
ExceptionalHalt
Indicates that the EVM has experienced an exceptional halt. This causes execution to immediately end with all gas being consumed.
class ExceptionalHalt:
Revert
Raised by the REVERT
opcode.
Unlike other EVM exceptions this does not result in the consumption of all gas.
class Revert:
StackUnderflowError
Occurs when a pop is executed on an empty stack.
class StackUnderflowError:
StackOverflowError
Occurs when a push is executed on a stack at max capacity.
class StackOverflowError:
OutOfGasError
Occurs when an operation costs more than the amount of gas left in the frame.
class OutOfGasError:
InvalidOpcode
Raised when an invalid opcode is encountered.
class InvalidOpcode:
code
66 | code: int |
---|
__init__
def __init__(self, code: int) -> None:
69 | super().__init__(code) |
---|---|
70 | self.code = code |
InvalidJumpDestError
Occurs when the destination of a jump operation doesn't meet any of the following criteria:
The jump destination is less than the length of the code.
The jump destination should have the
JUMPDEST
opcode (0x5B).The jump destination shouldn't be part of the data corresponding to
PUSH-N
opcodes.
class InvalidJumpDestError:
StackDepthLimitError
Raised when the message depth is greater than 1024
class StackDepthLimitError:
WriteInStaticContext
Raised when an attempt is made to modify the state while operating inside of a STATICCALL context.
class WriteInStaticContext:
OutOfBoundsRead
Raised when an attempt was made to read data beyond the boundaries of the buffer.
class OutOfBoundsRead:
InvalidParameter
Raised when invalid parameters are passed.
class InvalidParameter:
InvalidContractPrefix
Raised when the new contract code starts with 0xEF.
class InvalidContractPrefix:
AddressCollision
Raised when the new contract address has a collision.
class AddressCollision: