EEVM.Interpreter.MachineState.Env (eevm v0.1.0)

Copy Markdown View Source

Per-call read-only execution environment.

Bundles the three fields that are set when a frame is constructed and never mutate during its lifetime:

  • tx — the originating transaction context (origin, gasprice, blob hashes…)
  • block — the block context (number, timestamp, coinbase, basefee…)
  • config — the active hardfork config (which EIPs are enabled, registered precompiles)

Child frames inherit the parent's env unchanged. Treating them as a single immutable record makes intent explicit at call sites — state.env is what you pass through, state.frame and state.substate are what you evolve.

Summary

Types

t()

@type t() :: %EEVM.Interpreter.MachineState.Env{
  block: EEVM.Context.Block.t(),
  config: EEVM.Config.t(),
  tx: EEVM.Context.Transaction.t()
}

Functions

new(opts \\ [])

@spec new(keyword()) :: t()