Prerequisites
Connect a gRPC client to an available Sync Invoker using your environment’s connection and authentication setup. The service definition isapi/grpc/syncinvoker/sync_invoker.proto in the BlockX repository. EVM functions also require the relevant node backend.
Check and invoke
- Submit the function source to
Precheckwhen static auditing is available. Read the returned findings; this operation does not execute the function. - Select exactly one function source:
function_idfor a registered function, orinline_source.source_codefor inline Python. - Encode positional arguments as a JSON array in
args_json. For the balance example, supply the chain, concrete block identifier, token, and holder. - Call
Invokefor the value, orDebugInvokewhen you also need captured output. - Check
success. On success, decoderesult_json; on failure, inspectfailure.
Confirm the result
Recordcall_id with the chain and block you queried. DebugInvoke can return a bounded stdout/stderr tail and failure diagnostics in debug_output. It does not run a task Writer Plugin.