EEVM.Interpreter.Instructions.System.Calls (eevm v0.1.0)

Copy Markdown View Source

Cross-contract call opcodes.

This module handles the most complex EVM operations — those that spawn nested execution frames and interact with the world state.

Cross-Contract Calls

  • CALL (0xF1) — calls another contract with optional value transfer.
  • CALLCODE (0xF2) — like CALL but executes the target's code in the caller's storage context (legacy, superseded by DELEGATECALL).
  • DELEGATECALL (0xF4) — executes the target's code in the caller's context, preserving msg.sender and msg.value (EIP-7).
  • STATICCALL (0xFA) — read-only call that reverts on state changes (EIP-214).

All call opcodes use EIP-150 gas forwarding: min(requested, available - available/64).

Target access and EIP-7702 delegation

Each call charges EIP-2929 cold access for its target on top of the warm cost in the static table. From Prague, a target whose code is a delegation designator (0xef0100 || delegate) runs the delegate's code, charges the delegate's cold or warm access as well, and never dispatches to a precompile, even when the delegate is one.

Summary

Functions

Execute CALL (0xF1), CALLCODE (0xF2), DELEGATECALL (0xF4), or STATICCALL (0xFA).

Functions

execute(arg1, state)

Execute CALL (0xF1), CALLCODE (0xF2), DELEGATECALL (0xF4), or STATICCALL (0xFA).