Runtime configuration for EEVM execution.
Holds both the hardfork specification (which EIP rules are active) and custom precompile registration.
Summary
Functions
Creates a new config with the given hardfork (default: :cancun).
Types
@type t() :: %EEVM.Config{ hardfork: EEVM.HardforkConfig.t(), precompiles: %{optional(non_neg_integer()) => module()} }
Functions
@spec new(EEVM.HardforkConfig.spec_id()) :: t()
Creates a new config with the given hardfork (default: :cancun).
Examples
iex> EEVM.Config.new()
%EEVM.Config{hardfork: %EEVM.HardforkConfig{spec_id: :cancun}, precompiles: %{}}
iex> EEVM.Config.new(:berlin)
%EEVM.Config{hardfork: %EEVM.HardforkConfig{spec_id: :berlin}, precompiles: %{}}
@spec register_precompile(t(), non_neg_integer(), module()) :: t()