Expand description
§rtvm-interpreter
RTVM Interpreter.
Re-exports§
pub use gas::Gas;
pub use interpreter::analysis;
pub use interpreter::next_multiple_of_32;
pub use interpreter::Contract;
pub use interpreter::Interpreter;
pub use interpreter::InterpreterResult;
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::EOFCreateInput;
pub use interpreter_action::EOFCreateOutcome;
pub use interpreter_action::InterpreterAction;
pub use opcode::Instruction;
pub use opcode::OpCode;
pub use opcode::OPCODE_INFO_JUMPTABLE;
Modules§
- gas
- EVM gas calculation utilities.
- instructions
- EVM opcode implementations.
- interpreter
- interpreter_
action - opcode
- EVM opcode definitions and utilities.
Macros§
- as_
isize_ saturated - Converts a
U256
value to aisize
, saturating toisize::MAX
if the value is too large. - as_
u64_ saturated - Converts a
U256
value to au64
, saturating toMAX
if the value is too large. - as_
usize_ or_ fail - Converts a
U256
value to ausize
, failing the instruction if the value is too large. - as_
usize_ or_ fail_ ret - Converts a
U256
value to ausize
and returnsret
, failing the instruction if the value is too large. - as_
usize_ saturated - Converts a
U256
value to ausize
, saturating toMAX
if the value is too large. - check
- Check if the
SPEC
is enabled, and fail the instruction if it is not. - gas
- Records a
gas
cost and fails the instruction if it would exceed the available gas. - gas_
or_ fail - Same as
gas!
, but withgas
as an option. - pop
- Pops
U256
values from the stack. Fails the instruction if the stack is too small. - pop_
address - Pops
Address
values from the stack. Fails the instruction if the stack is too small. - pop_
address_ ret - Pop
Address
values from the stack, returnsret
on stack underflow. - pop_ret
- Pops
U256
values from the stack, and returnsret
. Fails the instruction if the stack is too small. - pop_top
- 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. - push
- Pushes a
B256
value onto the stack. Fails the instruction if the stack is full. - push_
b256 - Pushes
B256
values onto the stack. Fails the instruction if the stack is full. - refund
- Records a
gas
refund. - require_
eof - Error if the current call is executing EOF.
- require_
init_ eof - Error if not init eof call.
- require_
non_ staticcall - Fails the instruction if the current call is static.
- resize_
memory - Resizes the interpreter memory if necessary. Fails the instruction if the memory or gas limit is exceeded.
- return_
error - return_
ok - return_
revert
Structs§
- Dummy
Host - A dummy Host implementation.
- Function
Return Frame - Function return frame. Needed information for returning from a function.
- Function
Stack - Function Stack
- Load
Account Result - Result of the account load from Journal state.
- SStore
Result - Represents the result of an
sstore
operation. - Self
Destruct Result - Result of a selfdestruct instruction.
Enums§
- Create
Scheme - Create scheme.
- Instruction
Result - Success
OrHalt
Constants§
- MAX_
CODE_ SIZE - EIP-170: Contract code size limit By default limit is 0x6000 (~25kb)
- MAX_
INITCODE_ SIZE - EIP-3860: Limit and meter initcode
Traits§
- Host
- EVM context host.