Skip to main content

InspectorExt

Trait InspectorExt 

Source
pub trait InspectorExt {
    // Provided methods
    fn should_use_create2_factory(
        &mut self,
        _depth: usize,
        _inputs: &CreateInputs,
    ) -> bool { ... }
    fn console_log(&mut self, msg: &str) { ... }
    fn get_networks(&self) -> NetworkConfigs { ... }
    fn create2_deployer(&self) -> Address { ... }
}
Expand description

Foundry-specific inspector methods, decoupled from any particular EVM context type.

This trait holds Foundry-specific extensions (create2 factory, console logging, network config, deployer address). It has no Inspector<CTX> supertrait so it can be used in generic code with I: FoundryInspectorExt + Inspector<CTX>.

Provided Methods§

Source

fn should_use_create2_factory( &mut self, _depth: usize, _inputs: &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, msg: &str)

Simulates console.log invocation.

Source

fn get_networks(&self) -> NetworkConfigs

Returns configured networks.

Source

fn create2_deployer(&self) -> Address

Returns the CREATE2 deployer address.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl InspectorExt for AccessListInspector

Source§

impl InspectorExt for NoOpInspector

Source§

impl<'a, T: 'a + InspectorExt + ?Sized> InspectorExt for &'a mut T

Source§

fn should_use_create2_factory( &mut self, _depth: usize, _inputs: &CreateInputs, ) -> bool

Source§

fn console_log(&mut self, msg: &str)

Source§

fn get_networks(&self) -> NetworkConfigs

Source§

fn create2_deployer(&self) -> Address

Source§

impl<T: InspectorExt + ?Sized> InspectorExt for Box<T>

Source§

fn should_use_create2_factory( &mut self, _depth: usize, _inputs: &CreateInputs, ) -> bool

Source§

fn console_log(&mut self, msg: &str)

Source§

fn get_networks(&self) -> NetworkConfigs

Source§

fn create2_deployer(&self) -> Address

Implementors§