Skip to main content

apply_event

Function apply_event 

Source
pub fn apply_event(
    state: &mut State,
    vm: &mut Vm<InProcessKernelAssist>,
    chain_instance_hash: &mut CapHash,
    event: &Event,
    gas_budget: u64,
    _storage_quota: u64,
) -> Result<EventOutcome, KernelError>
Expand description

Apply one event against the chain Instance. Mutates state.caps and advances chain_instance_hash to a fresh value reflecting the post-call state.

The Vm is borrowed mutably for the duration of this call — the caller is expected to maintain a long-lived Vm across blocks (the image cache lives there).