neo_solidity/cli/bytecode/bytecode_builtins/builtin_call/
runtime.rs

1fn emit_runtime_notify(
2    bytecode: &mut Vec<u8>,
3    use_callt: bool,
4    token_patches: &mut Vec<MethodTokenPatch>,
5) {
6    // Runtime.notify(eventName, data) expects `data` to be NeoVM-serialized
7    // (i.e., produced by abi.encode(...)). We deserialize it into an array
8    // and pass it as the Notify state.
9    emit_native_contract_call(
10        bytecode,
11        ir::NativeContract::StdLib,
12        "deserialize",
13        1,
14        use_callt,
15        token_patches,
16    );
17    bytecode.push(0x50); // SWAP -> [stateArray, eventName]
18    emit_syscall(bytecode, "System.Runtime.Notify");
19    bytecode.push(0x11); // PUSH1 (truthy) to satisfy Solidity's expression semantics
20}
21
22fn emit_runtime_check_witness(bytecode: &mut Vec<u8>) {
23    emit_syscall(bytecode, "System.Runtime.CheckWitness");
24}