From 0117581e5cd4da36994b33ddcc9e93ec131eccf4 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Fri, 8 Jul 2022 17:14:49 +0300 Subject: [PATCH] rpc: add implementation note about iterator sessions --- docs/rpc.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/rpc.md b/docs/rpc.md index 7e32d3bb0..1872ccfa3 100644 --- a/docs/rpc.md +++ b/docs/rpc.md @@ -98,7 +98,7 @@ following data types: Any call that takes any of these types for input in JSON format is affected. -##### `invokefunction` +##### `invokefunction`, `invokescript` neo-go implementation of `invokefunction` does not return `tx` field in the answer because that requires signing the transaction with some @@ -110,6 +110,12 @@ It's possible to use `invokefunction` not only with a contract scripthash, but a with a contract name (for native contracts) or a contract ID (for all contracts). This feature is not supported by the C# node. +If iterator is present on stack after function or script invocation then, depending +on `SessionEnable` RPC-server setting, iterator either will be marshalled as iterator +ID (corresponds to `SessionEnabled: true`) or as a set of traversed iterator values +up to `DefaultMaxIteratorResultItems` packed into array (corresponds to +`SessionEnabled: false`). + ##### `getcontractstate` It's possible to get non-native contract state by its ID, unlike with C# node where