# `EEVM.Config`
[🔗](https://github.com/mw2000/eevm/blob/main/lib/eevm/config.ex#L1)

Runtime configuration for EEVM execution.

Holds both the hardfork specification (which EIP rules are active) and
custom precompile registration.

# `t`

```elixir
@type t() :: %EEVM.Config{
  hardfork: EEVM.HardforkConfig.t(),
  precompiles: %{optional(non_neg_integer()) =&gt; module()}
}
```

# `new`

```elixir
@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: %{}}

# `register_precompile`

```elixir
@spec register_precompile(t(), non_neg_integer(), module()) :: t()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
