Crate revm::interpreter
source · Expand description
§revm-interpreter
REVM Interpreter.
Modules§
- EVM gas calculation utilities.
- EVM opcode implementations.
- EVM opcode definitions and utilities.
- revm-primitives
Macros§
- Converts a
U256value to aisize, saturating toisize::MAXif the value is too large. - Converts a
U256value to au64, saturating toMAXif the value is too large. - Converts a
U256value to ausize, failing the instruction if the value is too large. - Converts a
U256value to ausizeand returnsret, failing the instruction if the value is too large. - Converts a
U256value to ausize, saturating toMAXif the value is too large. - Check if the
SPECis enabled, and fail the instruction if it is not. - Records a
gascost and fails the instruction if it would exceed the available gas. - Same as
gas!, but withgasas an option. - Pops
U256values from the stack. Fails the instruction if the stack is too small. - Pops
Addressvalues from the stack. Fails the instruction if the stack is too small. - Pop
Addressvalues from the stack, returnsreton stack underflow. - Pops
U256values from the stack, and returnsret. Fails the instruction if the stack is too small. - Pops
U256values from the stack, and returns a reference to the top of the stack. Fails the instruction if the stack is too small. - Pushes a
B256value onto the stack. Fails the instruction if the stack is full. - Pushes
B256values onto the stack. Fails the instruction if the stack is full. - Records a
gasrefund. - Error if the current call is executing EOF.
- Error if not init eof call.
- Fails the instruction if the current call is static.
- Resizes the interpreter memory if necessary. Fails the instruction if the memory or gas limit is exceeded.
Structs§
- Result of the account load from Journal state.
- Inputs for a call.
- Represents the outcome of a call operation in a virtual machine.
- EVM contract information.
- Inputs for a create call.
- Represents the outcome of a create operation in an interpreter.
- A dummy Host implementation.
- Inputs for EOF create call.
- EIP-7702 code load result that contains optional delegation is_cold information.
- Function return frame. Needed information for returning from a function.
- Function Stack
- Represents the state of gas during execution.
- EVM bytecode interpreter.
- The result of an interpreter operation.
- An EVM opcode.
- Represents the result of an
sstoreoperation. - Result of a selfdestruct action.
- A sequential memory shared between calls, which uses a
Vecfor internal representation. A SharedMemory instance should always be obtained using thenewstatic method to ensure memory safety. - EVM stack with STACK_LIMIT capacity of words.
- State load information that contains the data and if the account or storage is cold loaded.
Enums§
- Call scheme.
- Call value.
- Create scheme.
- EOF create can be called from two places:
- Internal result that are not ex
Constants§
- Empty shared memory.
- EIP-170: Contract code size limit
- EIP-3860: Limit and meter initcode
- Maps each opcode to its info.
- EVM interpreter stack limit.
Traits§
- EVM context host.
Functions§
- Returns number of words what would fit to provided number of bytes, i.e. it rounds up the number bytes to number of words.
Type Aliases§
- EVM opcode function signature.