Crate interpreter
Expand description
§revm-interpreter
REVM Interpreter.
Modules§
- EVM gas calculation utilities.
- EVM opcode implementations.
- EVM opcode definitions and utilities.
- revm-primitives
Macros§
- Converts a
U256
value to aisize
, saturating toisize::MAX
if the value is too large. - Converts a
U256
value to au64
, saturating toMAX
if the value is too large. - Converts a
U256
value to ausize
, failing the instruction if the value is too large. - Converts a
U256
value to ausize
and returnsret
, failing the instruction if the value is too large. - Converts a
U256
value to ausize
, saturating toMAX
if the value is too large. - Check if the
SPEC
is enabled, and fail the instruction if it is not. - Records a
gas
cost and fails the instruction if it would exceed the available gas. - Same as
gas!
, but withgas
as an option. - Pops
U256
values from the stack. Fails the instruction if the stack is too small. - Pops
Address
values from the stack. Fails the instruction if the stack is too small. - Pop
Address
values from the stack, returnsret
on stack underflow. - Pops
U256
values from the stack, and returnsret
. Fails the instruction if the stack is too small. - Pops
U256
values from the stack, and returns a reference to the top of the stack. Fails the instruction if the stack is too small. - Pushes a
B256
value onto the stack. Fails the instruction if the stack is full. - Pushes
B256
values onto the stack. Fails the instruction if the stack is full. - Records a
gas
refund. - 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
sstore
operation. - Result of a selfdestruct action.
- A sequential memory shared between calls, which uses a
Vec
for internal representation. A SharedMemory instance should always be obtained using thenew
static 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.