Skip to main content

FoundryInspectorExt

Trait FoundryInspectorExt 

Source
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§

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.

Implementations on Foreign Types§

Source§

impl FoundryInspectorExt for AccessListInspector

Source§

impl FoundryInspectorExt for NoOpInspector

Source§

impl<'a, T: 'a + FoundryInspectorExt + ?Sized> FoundryInspectorExt 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: FoundryInspectorExt + ?Sized> FoundryInspectorExt 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§