From e23918964c7f8352dc6502c39cd0128d72ccd814 Mon Sep 17 00:00:00 2001 From: Martin Raszyk Date: Thu, 19 Dec 2024 08:25:55 +0100 Subject: [PATCH] feat: textual description of ic0.msg_method_name_size and ic0.msg_method_name_copy --- docs/references/ic-interface-spec.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/references/ic-interface-spec.md b/docs/references/ic-interface-spec.md index e22d82385f..f800907b2d 100644 --- a/docs/references/ic-interface-spec.md +++ b/docs/references/ic-interface-spec.md @@ -1631,6 +1631,8 @@ This can be invoked multiple times within the same message execution to build up A canister can inspect ingress messages before executing them. When the IC receives an update call from a user, the IC will use the canister method `canister_inspect_message` to determine whether the message shall be accepted. If the canister is empty (i.e. does not have a Wasm module), then the ingress message will be rejected. If the canister is not empty and does not implement `canister_inspect_message`, then the ingress message will be accepted. +In `canister_inspect_message`, the canister can determine the name of the method called by the message using `ic0.msg_method_name_size : () → I` and `ic0.msg_method_name_copy : (dst : I, offset : I, size : I) → ()`; `I ∈ {i32, i64}`. + In `canister_inspect_message`, the canister can accept the message by invoking `ic0.accept_message : () → ()`. This function traps if invoked twice. If the canister traps in `canister_inspect_message` or does not call `ic0.accept_message`, then the access is denied. :::note