rust-ethereum / evm

Pure Rust implementation of Ethereum Virtual Machine
Apache License 2.0
1.16k stars 355 forks source link

Feat: extend Invoker visibility #262

Closed mrLSD closed 8 months ago

mrLSD commented 8 months ago

Description

Currently evm::transact accepts any kind Invoker, as a most flexible solution:

pub fn transact<H, Tr, I>(
    args: I::TransactArgs,
    heap_depth: Option<usize>,
    backend: &mut H,
    invoker: &I,
) -> Result<I::TransactValue, ExitError>
where
    I: Invoker<H, Tr, Interrupt = Infallible>,
    I::Interpreter: RunInterpreter<H, Tr>,

➡️ This PR solves the visibility issue for types and dependencies to implement custom Invoker.