SimulateTransactionResponse
extends SorobanRpcResponse
in package
Response that will be received when submitting a trial contract invocation.
Tags
Table of Contents
Properties
- $error : SorobanRpcErrorResponse|null
- $events : array<string|int, string>|null
- $jsonResponse : array<string|int, mixed>
- $latestLedger : int
- $minResourceFee : int|null
- $restorePreamble : RestorePreamble|null
- $resultError : string|null
- $results : SimulateTransactionResults|null
- $stateChanges : array<string|int, LedgerEntryChange>|null
- $transactionData : XdrSorobanTransactionData|null
Methods
- __construct() : mixed
- fromJson() : static
- Creates an instance from JSON-RPC response data
- getError() : SorobanRpcErrorResponse|null
- getEvents() : array<string|int, string>|null
- getFootprint() : Footprint|null
- getJsonResponse() : array<string|int, mixed>
- getLatestLedger() : int
- getMinResourceFee() : int|null
- getRestorePreamble() : RestorePreamble|null
- getResultError() : string|null
- getResults() : SimulateTransactionResults|null
- getSorobanAuth() : array<string|int, SorobanAuthorizationEntry>|null
- getStateChanges() : array<string|int, LedgerEntryChange>|null
- getTransactionData() : XdrSorobanTransactionData|null
- setError() : void
- setEvents() : void
- setJsonResponse() : void
- setLatestLedger() : void
- setMinResourceFee() : void
- setRestorePreamble() : void
- setResultError() : void
- setResults() : void
- setStateChanges() : void
- setTransactionData() : void
Properties
$error
public
SorobanRpcErrorResponse|null
$error
= null
Error data if the response is an error response
$events
public
array<string|int, string>|null
$events
= null
Array of serialized base64 event strings emitted during contract invocation (can be present on error for extra context)
$jsonResponse
public
array<string|int, mixed>
$jsonResponse
$latestLedger
public
int
$latestLedger
The sequence number of the latest ledger known to Soroban RPC at the time it handled the request
$minResourceFee
public
int|null
$minResourceFee
= null
Recommended minimum resource fee to add when submitting the transaction (not present in case of error)
$restorePreamble
public
RestorePreamble|null
$restorePreamble
= null
Preamble indicating archived ledger entries that need restoration before submission
$resultError
public
string|null
$resultError
= null
Error details explaining why the invoke host function call failed
$results
public
SimulateTransactionResults|null
$results
= null
Results for the Host Function invocation (only present on successful simulation of InvokeHostFunction operations)
$stateChanges
public
array<string|int, LedgerEntryChange>|null
$stateChanges
= null
Array of ledger entries before and after simulation for tracking state changes
$transactionData
public
XdrSorobanTransactionData|null
$transactionData
= null
The recommended Soroban Transaction Data containing refundable fee and resource usage information
Methods
__construct()
public
__construct(array<string|int, mixed> $jsonResponse) : mixed
Parameters
- $jsonResponse : array<string|int, mixed>
-
The complete JSON response as data array
fromJson()
Creates an instance from JSON-RPC response data
public
static fromJson(array<string, mixed> $json) : static
Parameters
- $json : array<string, mixed>
-
The JSON response data
Return values
static —The created instance
getError()
public
getError() : SorobanRpcErrorResponse|null
Return values
SorobanRpcErrorResponse|null —Error data if the response is an error response
getEvents()
public
getEvents() : array<string|int, string>|null
Return values
array<string|int, string>|null —Array of serialized base64 event strings emitted during contract invocation (can be present on error for extra context)
getFootprint()
public
getFootprint() : Footprint|null
Tags
Return values
Footprint|null —Footprint from the transaction data
getJsonResponse()
public
getJsonResponse() : array<string|int, mixed>
Return values
array<string|int, mixed> —The complete JSON response as data array
getLatestLedger()
public
getLatestLedger() : int
Return values
int —The sequence number of the latest ledger known to Soroban RPC at the time it handled the request
getMinResourceFee()
public
getMinResourceFee() : int|null
Return values
int|null —Recommended minimum resource fee to add when submitting the transaction (not present in case of error)
getRestorePreamble()
public
getRestorePreamble() : RestorePreamble|null
Return values
RestorePreamble|null —Preamble indicating archived ledger entries that need restoration before submission
getResultError()
public
getResultError() : string|null
Return values
string|null —Error details explaining why the invoke host function call failed
getResults()
public
getResults() : SimulateTransactionResults|null
Return values
SimulateTransactionResults|null —Results for the Host Function invocation (only present on successful simulation of InvokeHostFunction operations)
getSorobanAuth()
public
getSorobanAuth() : array<string|int, SorobanAuthorizationEntry>|null
Tags
Return values
array<string|int, SorobanAuthorizationEntry>|null —Authorization entries that need to be signed
getStateChanges()
public
getStateChanges() : array<string|int, LedgerEntryChange>|null
Return values
array<string|int, LedgerEntryChange>|null —Array of ledger entries before and after simulation for tracking state changes
getTransactionData()
public
getTransactionData() : XdrSorobanTransactionData|null
Return values
XdrSorobanTransactionData|null —The recommended Soroban Transaction Data containing refundable fee and resource usage information
setError()
public
setError(SorobanRpcErrorResponse|null $error) : void
Parameters
- $error : SorobanRpcErrorResponse|null
-
Error data if the response is an error response
setEvents()
public
setEvents(array<string|int, string>|null $events) : void
Parameters
- $events : array<string|int, string>|null
-
Array of serialized base64 event strings emitted during contract invocation
setJsonResponse()
public
setJsonResponse(array<string|int, mixed> $jsonResponse) : void
Parameters
- $jsonResponse : array<string|int, mixed>
-
The complete JSON response as data array
setLatestLedger()
public
setLatestLedger(int $latestLedger) : void
Parameters
- $latestLedger : int
-
The sequence number of the latest ledger known to Soroban RPC at the time it handled the request
setMinResourceFee()
public
setMinResourceFee(int|null $minResourceFee) : void
Parameters
- $minResourceFee : int|null
-
Recommended minimum resource fee to add when submitting the transaction
setRestorePreamble()
public
setRestorePreamble(RestorePreamble|null $restorePreamble) : void
Parameters
- $restorePreamble : RestorePreamble|null
-
Preamble indicating archived ledger entries that need restoration
setResultError()
public
setResultError(string|null $resultError) : void
Parameters
- $resultError : string|null
-
Error details explaining why the invoke host function call failed
setResults()
public
setResults(SimulateTransactionResults|null $results) : void
Parameters
- $results : SimulateTransactionResults|null
-
Results for the Host Function invocation
setStateChanges()
public
setStateChanges(array<string|int, LedgerEntryChange>|null $stateChanges) : void
Parameters
- $stateChanges : array<string|int, LedgerEntryChange>|null
-
Array of ledger entries before and after simulation
setTransactionData()
public
setTransactionData(XdrSorobanTransactionData|null $transactionData) : void
Parameters
- $transactionData : XdrSorobanTransactionData|null
-
The recommended Soroban Transaction Data