forge::utils

Function create2_handler_register

Source
pub fn create2_handler_register<I>(
    handler: &mut Handler<'_, Context<I, &mut dyn DatabaseExt<Error = DatabaseError>>, I, &mut dyn DatabaseExt<Error = DatabaseError>>,
)
where I: InspectorExt,
Expand description

Used for routing certain CREATE2 invocations through DEFAULT_CREATE2_DEPLOYER.

Overrides create hook with CALL frame if InspectorExt::should_use_create2_factory returns true. Keeps track of overridden frames and handles outcome in the overridden insert_call_outcome hook by inserting decoded address directly into interpreter.

Should be installed after revm::inspector_handle_register and before any other registers.