forge

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_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<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_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<'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_odyssey(&self) -> bool

Source§

fn create2_deployer(&self) -> Address

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_odyssey(&self) -> bool

Source§

fn create2_deployer(&self) -> Address

Implementors§