Skip to main content

FoundryInspectorExt

Trait FoundryInspectorExt 

pub trait FoundryInspectorExt {
    // 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§

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.

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

Simulates console.log invocation.

fn get_networks(&self) -> NetworkConfigs

Returns configured networks.

fn create2_deployer(&self) -> Address

Returns the CREATE2 deployer address.

Implementations on Foreign Types§

§

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

§

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

§

impl<T> FoundryInspectorExt for Box<T>

§

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

Implementors§