From e5d0239a73a06cc10293e63bd72b01d93a578361 Mon Sep 17 00:00:00 2001 From: stellarsaur <126507441+stellarsaur@users.noreply.github.com> Date: Thu, 21 Dec 2023 09:26:03 -0800 Subject: [PATCH] soroban-docs: Update simulateTransaction Docs With New resourceConfig Parameter (#683) * Update docs for new resourceConfig param in simulateTransaction * add examples for `resourceConfig` param --------- Co-authored-by: Elliot Voris --- static/openrpc.json | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/static/openrpc.json b/static/openrpc.json index 967e9c62..c345fe6a 100644 --- a/static/openrpc.json +++ b/static/openrpc.json @@ -13,7 +13,7 @@ "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "version": "20.0.2" + "version": "20.1.0" }, "servers": [ { @@ -1000,6 +1000,24 @@ "description": "A Stellar transaction, serialized as a base64 string", "type": "string" } + }, + { + "name": "resourceConfig", + "summary": "configuration for how resources will be calculated", + "description": "Contains configuration for how resources will be calculated when simulating transactions.", + "required": false, + "schema": { + "title": "resourceConfig", + "description": "Configuration for how resources will be calculated.", + "type": "object", + "properties": { + "instructionLeeway": { + "title": "instructionLeeway", + "description": "Allow this many extra instructions when budgeting resources.", + "type": "number" + } + } + } } ], "result": { @@ -1109,6 +1127,14 @@ "summary": "a valid transaction", "description": "A transaction that will correctly invoke a contract function.", "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAJsOiAAAAEQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAJaW5jcmVtZW50AAAAAAAAAgAAABIAAAAAAAAAACDh1sDGwYAYgJ8EbeJPZwoZhDqEriwlbNnqivULm/oYAAAAAwAAAAMAAAAAAAAAAAAAAAA=" + }, + { + "name": "resourceConfig", + "summary": "the default resource configuration", + "description": "The default value for the (optional) resource configuration object for transaction simulation.", + "value": { + "instructionLeeway": 3000000 + } } ], "result": { @@ -1143,6 +1169,14 @@ "summary": "an invalid transaction", "description": "A transaction that attempts to invoke a contract function with the wrong number of arguments.", "value": "AAAAAgAAAAAg4dbAxsGAGICfBG3iT2cKGYQ6hK4sJWzZ6or1C5v6GAAAAGQAJsOiAAAADwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABzAP+dP0PsNzYvFF1pv7a8RQXwH5eg3uZBbbWjE9PwAsAAAAJaW5jcmVtZW50AAAAAAAAAQAAAAMAAAADAAAAAAAAAAAAAAAA" + }, + { + "name": "resourceConfig", + "summary": "the default resource configuration", + "description": "The default value for the (optional) resource configuration object for transaction simulation.", + "value": { + "instructionLeeway": 3000000 + } } ], "result": { @@ -1165,4 +1199,4 @@ } ], "components": {} -} \ No newline at end of file +}