Expand description
§revm-interpreter
Interpreter is part of the project that executes EVM instructions.
Re-exports§
pub use gas::Gas;pub use gas::InitialAndFloorGas;pub use host::Host;pub use instructions::instruction_table;pub use instructions::Instruction;pub use instructions::InstructionTable;pub use interpreter::num_words;pub use interpreter::InputsImpl;pub use interpreter::Interpreter;pub use interpreter::InterpreterResult;pub use interpreter::MemoryGetter;pub use interpreter::Stack;pub use interpreter::EMPTY_SHARED_MEMORY;pub use interpreter::STACK_LIMIT;pub use interpreter_action::CallInputs;pub use interpreter_action::CallOutcome;pub use interpreter_action::CallScheme;pub use interpreter_action::CallValue;pub use interpreter_action::CreateInputs;pub use interpreter_action::CreateOutcome;pub use interpreter_action::EOFCreateInputs;pub use interpreter_action::EOFCreateKind;pub use interpreter_action::FrameInput;pub use interpreter_action::InterpreterAction;pub use interpreter_types::InterpreterTypes;
Modules§
- gas
- EVM gas calculation utilities.
- host
- instructions
- EVM opcode implementations.
- interpreter
- interpreter_
action - interpreter_
types
Macros§
- as_
isize_ saturated - Converts a
U256value to aisize, saturating toisize::MAXif the value is too large. - as_
u64_ saturated - Converts a
U256value to au64, saturating toMAXif the value is too large. - as_
usize_ or_ fail - Converts a
U256value to ausize, failing the instruction if the value is too large. - as_
usize_ or_ fail_ ret - Converts a
U256value to ausizeand returnsret, failing the instruction if the value is too large. - as_
usize_ saturated - Converts a
U256value to ausize, saturating toMAXif the value is too large. - assume
- check
- Check if the
SPECis enabled, and fail the instruction if it is not. - debug_
unreachable - gas
- Records a
gascost and fails the instruction if it would exceed the available gas. - gas_
or_ fail - Same as
gas!, but withgasas an option. - otry
- popn
- Pops n values from the stack. Fails the instruction if n values can’t be popped.
- popn_
top - Pops n values from the stack and returns the top value. Fails the instruction if n values can’t be popped.
- push
- Pushes a
B256value onto the stack. Fails the instruction if the stack is full. - require_
eof - Error if the current call is executing EOF.
- require_
non_ staticcall - Fails the instruction if the current call is static.
- resize_
memory - Resizes the interpreterreter memory if necessary. Fails the instruction if the memory or gas limit is exceeded.
- return_
error - return_
ok - return_
revert - tri
constOption?.
Structs§
- SStore
Result - Represents the result of an
sstoreoperation. - Self
Destruct Result - Result of a selfdestruct action
- State
Load - State load information that contains the data and if the account or storage is cold loaded
Enums§
- Create
Scheme - Create scheme
- Instruction
Result - Internal
Result - Internal results that are not exposed externally
- Success
OrHalt
Constants§
- MAX_
CODE_ SIZE - EIP-170: Contract code size limit
- MAX_
INITCODE_ SIZE - EIP-3860: Limit and meter initcode