foundry_evm

Trait InspectorExt

Source
pub trait InspectorExt: for<'a> Inspector<&'a mut dyn DatabaseExt<Error = DatabaseError>> {
    // Provided methods
    fn should_use_create2_factory(
        &mut self,
        _context: &mut EvmContext<&mut dyn DatabaseExt<Error = DatabaseError>>,
        _inputs: &mut CreateInputs,
    ) -> bool { ... }
    fn console_log(&mut self, _input: String) { ... }
    fn is_alphanet(&self) -> bool { ... }
}
Expand description

An extension trait that allows us to add additional hooks to Inspector for later use in handlers.

Provided Methods§

Source

fn should_use_create2_factory( &mut self, _context: &mut EvmContext<&mut dyn DatabaseExt<Error = DatabaseError>>, _inputs: &mut CreateInputs, ) -> bool

Determines whether the DEFAULT_CREATE2_DEPLOYER should be used for a CREATE2 frame.

If this function returns true, we’ll replace CREATE2 frame with a CALL frame to CREATE2 factory.

Source

fn console_log(&mut self, _input: String)

Simulates console.log invocation.

Source

fn is_alphanet(&self) -> bool

Returns true if the current network is Alphanet.

Implementations on Foreign Types§

Source§

impl InspectorExt for NoOpInspector

Source§

impl<'b, T> InspectorExt for &'b mut T
where T: 'b + InspectorExt + ?Sized, &'b mut T: for<'a> Inspector<&'a mut dyn DatabaseExt<Error = DatabaseError>>,

Source§

fn should_use_create2_factory( &mut self, _context: &mut EvmContext<&mut dyn DatabaseExt<Error = DatabaseError>>, _inputs: &mut CreateInputs, ) -> bool

Source§

fn console_log(&mut self, _input: String)

Source§

fn is_alphanet(&self) -> bool

Source§

impl<T> InspectorExt for Box<T>
where T: InspectorExt + ?Sized, Box<T>: for<'a> Inspector<&'a mut dyn DatabaseExt<Error = DatabaseError>>,

Source§

fn should_use_create2_factory( &mut self, _context: &mut EvmContext<&mut dyn DatabaseExt<Error = DatabaseError>>, _inputs: &mut CreateInputs, ) -> bool

Source§

fn console_log(&mut self, _input: String)

Source§

fn is_alphanet(&self) -> bool

Implementors§