Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: change api
  • Loading branch information
mattsse authored and Rjected committed Feb 23, 2024
commit f34b75ffca431a3aee69f1fbe0df7e106bed7ec8
22 changes: 3 additions & 19 deletions crates/node-api/src/evm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,10 @@ pub trait EvmConfig: ConfigureEvmEnv + Clone + Send + Sync + 'static {}
/// Trait for configuring the EVM.
pub trait EvmConfig : ConfigureEvmEnv {

// TODO add functions for configuring the EVM::builder
/// A hook that allows to modify the EVM before execution.
fn evm(&self, db: ()) -> Evm<>;

/// Returns the EVM handler for the given spec id.
///
///
/// TODO this function needs a bunch of generics to satisfy the EvmHandler struct
///
/// We could also add more functions to make creating EvmHandler easier; e.g: `LoadPrecompilesHandle`
///
/// See also `EvmHandler::mainnet`
///
/// ```
///
/// let mut evm = revm::Evm::builder().with_db(db)
/// // TODO how do I set the handler to then evm?
/// .with_env_with_handler_cfg(env).build();
///
/// ```
///
fn evm_handler(&self, spec_id: SpecId) -> EvmHandler;
fn evm_with_inspector<I>(&self, db: (), inspector: I) -> Evm<>;

}

Expand Down