Skip to content

[Feature] Add helper EvmFactory type that modifies the PrecompilesMap #119

@mattsse

Description

@mattsse

Describe the feature you would like

we have

impl EvmFactory for EthEvmFactory {

it would be useful to have some generic type that takes a default EvmFactory and takes care of the PrecompileMap init based in the specid

this can be a generic EvmFactoryWith<Evm, PrecompilesInit>

where PrecompilesInit takes care of modifiying the configured precompilesmap

.with_precompiles(PrecompilesMap::from_static(Precompiles::new(
PrecompileSpecId::from_spec_id(spec_id),
))),

something like

trait PrecompileModifies<SpecId> {

  fn modify(&self, precompiles: &mut PrecompilesMap, specid: SpecId)

}

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions