For reading the current value of ledger entries directly.
Allows you to directly inspect the current state of a contract, a contract's code, or any other ledger entry. This is a backup way to access your contract data which may not be available via events or simulateTransaction
General information about the currently configured network. This response will contain all the information needed to successfully submit transactions to the network this node serves.
latestLedger string - The latest ledger known to Soroban-RPC at the time it handled the sendTransaction() request.
latestLedgerCloseTime string - The unix timestamp of the close time of the latest ledger known to Soroban-RPC at the time it handled the sendTransaction() request.
errorResultXdr string (optional) - If the transaction status is ERROR, this will be a base64 encoded string of the raw TransactionResult XDR struct containing details on why stellar-core rejected the transaction.
Stringified ledger sequence number to fetch events after (inclusive). This method will return an error if startLedger is less than the oldest ledger stored in this node, or greater than the latest ledger seen by this node. If a cursor is included in the request, startLedger must be omitted.
filters
array of: type (string) A comma separated list of event types (system, contract, or diagnostic) used to filter events. If omitted, all event types are included.
contractIds (array) (optional) List of contract ids to query for events. If omitted, return events for all contracts. Maximum 5 contract IDs are allowed per request.
topics (array) (optional) List of topic filters. If omitted, query for all events. If multiple filters are specified, events will be included if they match any of the filters. Maximum 5 filters are allowed per request.
Clients will poll this to tell when the transaction has been completed.
This method will use 10 .
Reference:
Parameters
hash (string)(required) Transaction hash to query, as a hex-encoded string
Returns
status string - The current status of the transaction by hash
Allowed values:SUCCESSNOT_FOUNDFAILED
latestLedger string - The latest ledger known to Soroban-RPC at the time it handled the getTransaction() request.
latestLedgerCloseTime string - The unix timestamp of the close time of the latest ledger known to Soroban-RPC at the time it handled the getTransaction() request.
oldestLedger string - The oldest ledger ingested by Soroban-RPC at the time it handled the getTransaction() request.
oldestLedgerCloseTime string - The unix timestamp of the close time of the oldest ledger ingested by Soroban-RPC at the time it handled the getTransaction() request.
ledger string - (optional) The sequence of the ledger which included the transaction. This field is only present if status is SUCCESS or FAILED.
createdAt string - (optional) The unix timestamp of when the transaction was included in the ledger. This field is only present if status is SUCCESS or FAILED.
applicationOrder number - (optional) The index of the transaction among all transactions included in the ledger. This field is only present if status is SUCCESS or FAILED.
feeBump boolean - (optional) Indicates whether the transaction was fee bumped. This field is only present if status is SUCCESS or FAILED.
envelopeXdr string - (optional) A base64 encoded string of the raw TransactionEnvelope XDR struct for this transaction.
resultXdr string - (optional) A base64 encoded string of the raw TransactionResult XDR struct for this transaction. This field is only present if status is SUCCESS or FAILED.
resultMetaXdr string (optional) A base64 encoded string of the raw TransactionResultMeta XDR struct for this transaction.
simulateTransaction
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.
This method will use 10 .
Reference:
Parameters
transaction (string)(required) The transaction to be simulated (serialized in base64)
Returns
minResourceFee string (optional) - Stringified number - Recommended minimum resource fee to add when submitting the transaction. This fee is to be added on top of the . Not present in case of error.
cost object (optional) - Information about instructions used, etc. Not present in case of error.
results array[object] (optional) - This array will only have one element: the result for the Host Function invocation. Only present on successful simulation (i.e. no error) of InvokeHostFunction operations.
transactionData string (optional) - Serialized base64 string - 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). Not present in case of error.
events array (optional) - Array of serialized base64 strings - Array of the events emitted during the contract invocation. The events are ordered by their emission time. (an array of serialized base64 strings). Only present when simulating of InvokeHostFunction operations, note that it can be present on error, providing extra context about what failed.
restorePreamble (object) (optional) - It can only be present on sucessful simulation (i.e. no error) of InvokeHostFunction operations. If present, it indicates that the simulation detected expired ledger entries which need to be restored before the submission of the InvokeHostFunction operation. The minResourceFee and transactionData fields should be used to submit a transaction containing a RestoreFootprint operation
latestLedger (string) - A Stringified number - Current latest closed ledger (LCL) observed by the node when this response was generated. Always present.
error string (optional) - This field will include details about why the invoke host function call failed. Only present if the transaction simulation failed.