foundry_evm_core

Trait InspectorExt

Source
pub trait InspectorExt: for<'a> Inspector<&'a mut dyn DatabaseExt> {
    // Provided methods
    fn should_use_create2_factory(
        &mut self,
        _context: &mut EvmContext<&mut dyn DatabaseExt>,
        _inputs: &mut CreateInputs,
    ) -> bool { ... }
    fn console_log(&mut self, _input: String) { ... }
    fn is_odyssey(&self) -> bool { ... }
    fn create2_deployer(&self) -> Address { ... }
}
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>, _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_odyssey(&self) -> bool

Returns true if the current network is Odyssey.

Source

fn create2_deployer(&self) -> Address

Returns the CREATE2 deployer address.

Implementations on Foreign Types§

Source§

impl InspectorExt for AccessListInspector

Source§

impl InspectorExt for NoOpInspector

Source§

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

Source§

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

Source§

fn console_log(&mut self, _input: String)

Source§

fn is_odyssey(&self) -> bool

Source§

fn create2_deployer(&self) -> Address

Source§

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

Source§

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

Source§

fn console_log(&mut self, _input: String)

Source§

fn is_odyssey(&self) -> bool

Source§

fn create2_deployer(&self) -> Address

Implementors§