simulate
Executes a dry run of any transaction type, returning the result and metadata the transaction would produce without committing it to the ledger. The transaction does not need to be signed and no fee is charged on-ledger. Results are not guaranteed to match a later real submission because ledger state can change in between.
This method will use 40 Compute Units.
Reference: Here
Parameters
tx_json(object, required unlesstx_blobis given) The transaction to simulate, in JSON format.Fee,SequenceandSigningPubKeyare auto-filled if omitted.tx_blob(string, required unlesstx_jsonis given) The transaction to simulate, in binary format. Do not include both fields.binary(boolean, optional) Iftrue, return data and metadata in binary format serialized to a hexadecimal string. The default isfalse.
Returns
applied(boolean) Alwaysfalse; the transaction is never applied.engine_result(string) The result code the transaction would have produced, for exampletesSUCCESS.engine_result_code(integer) Numeric version of the result code.engine_result_message(string) Human-readable explanation of the result.ledger_index(number) The ledger index of the ledger that would have included this transaction.meta(object) Transaction metadata describing the results of the transaction. Not included if the transaction fails with a code that means it would not be included in the ledger.meta_blob(string) in binary mode.tx_json(object) The transaction that was simulated, including auto-filled values.tx_blob(string) in binary mode.
Over WebSocket, send {"id":1,"command":"simulate","tx_json":{"TransactionType":"Payment","Account":"rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De","Destination":"rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH","Amount":"1000000"},"binary":false} to wss://mainnet.xrpl.validationcloud.io/v1/<YOUR_API_KEY_HERE>.
Last updated
Was this helpful?