DoCallFn

Type Alias DoCallFn 

Source
pub type DoCallFn = fn(*mut (), u8, Address, Address, Address, &[u8], u64, U256) -> SubCallResult;
Expand description

Type-erased function pointer for executing sub-calls from Stylus.

Parameters: (ctx_ptr, call_type, contract, caller, storage_addr, input, gas, value).

  • call_type: 0=CALL, 1=DELEGATECALL, 2=STATICCALL
  • caller: msg.sender for the new frame (preserved for DELEGATECALL)
  • storage_addr: address whose storage the new frame uses (= current contract for CALL/STATICCALL, = preserved storage context for DELEGATECALL)