Skip to main content

FunctionCallHandler

Trait FunctionCallHandler 

Source
pub trait FunctionCallHandler {
    // Required method
    fn call_function(
        &self,
        name: &str,
        args: &[DynSolValue],
        callee: Option<&DynSolValue>,
        snapshot_id: usize,
    ) -> Result<DynSolValue>;
}
Expand description

Handler trait for function calls and built-in functions.

Executes function calls including contract functions, built-in functions (like keccak256), and EDB-specific functions (like edb_sload).

Required Methods§

Source

fn call_function( &self, name: &str, args: &[DynSolValue], callee: Option<&DynSolValue>, snapshot_id: usize, ) -> Result<DynSolValue>

Call a function with the given arguments.

§Arguments
  • name - The function name to call
  • args - Function arguments as DynSolValue array
  • callee - Optional target address for the call (None uses current context)
  • snapshot_id - The execution context identifier
§Returns

The function’s return value, or an error if the call fails

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl FunctionCallHandler for Arc<SimulationDebugHandler>

Source§

fn call_function( &self, name: &str, args: &[DynSolValue], callee: Option<&DynSolValue>, snapshot_id: usize, ) -> Result<DynSolValue>

Implementors§