From a5057f43082b11c7b2651b6634d508d07d9a9564 Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Mon, 22 May 2023 19:31:27 +0200 Subject: [PATCH] Address review feedback --- api/methods/simulateTransaction.mdx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/api/methods/simulateTransaction.mdx b/api/methods/simulateTransaction.mdx index 12503276..06d89383 100644 --- a/api/methods/simulateTransaction.mdx +++ b/api/methods/simulateTransaction.mdx @@ -2,8 +2,7 @@ sidebar_position: 8 --- -Submit a trial contract invocation to get back return values, expected transaction data, expected costs and recommended minimum transaction fee due to resource usage. - +Submit a trial contract invocation to simulate how it would be executed by the network. This endpoint calculates the effective transaction data, required authorizations, and minimal resource fee. It provides a way to test and analyze the potential outcomes of a transaction without actually submitting it to the network. ## Parameters - `` - The transaction to be simulated (serialized in base64) @@ -15,11 +14,11 @@ Submit a trial contract invocation to get back return values, expected transacti - `cost`: `` - Information about instructions used, etc. - `cpuInsns`: `` - Stringified-number of the total cpu instructions consumed by this transaction - `memBytes`: `` - Stringified-number of the total memory bytes allocated by this transaction - - `results`: `` - If error is present then results will not be in the response. There will be one results object for each Host Function invocation in the transaction. + - `results`: `` - If `error` is present then results will not be in the response. There will be one result object for each Host Function invocation, in the same order the Host Function was supplied. - `xdr`: `` - (optional) Only present on success. xdr-encoded return value of the Host Function call. - `auth`: `` - Per-address authorizations recorded when simulating this Host Function call. (an array of serialized base64 strings) - - `transactionData`: `` - The Soroban Transaction Data used when simulating this operation. (serialized in a base64 string). - - `events`: `` - Events emitted during all of the contract invocation(s). (an array of serialized base64 strings) + - `transactionData`: `` - The recommended Soroban Transaction Data to use when submitting the simulated transaction. This data contains the refundable fee and resource usage information such as the ledger footprint and IO access data (serialized in a base64 string). + - `events`: `` - Array of the events emitted during the contract invocation(s). The events are ordered by their emission _time_. (an array of serialized base64 strings) - `latestLedger`: `` - Stringified-number of the current latest ledger observed by the node when this response was generated. - `error`: `` - (optional) only present if the transaction failed. This field will include more details from `stellar-core` about why the invoke host function call failed.