Function hdk::info::call_info

source ·
pub fn call_info() -> ExternResult<CallInfo>
Expand description

Trivial wrapper for __agent_info host function. Call info input struct is () so the function call simply looks like this:

let call_info = call_info()?;

the CallInfo is

  • the provenance of the call
  • function name that was the extern/entrypoint into the wasm
  • the chain head as at the start of the call, won’t change even if the chain is written to during the call
  • the CapGrant used to authorize the call