Stellar PHP SDK API Documentation

SimulateTransactionResponse extends SorobanRpcResponse

Response that will be received when submitting a trial contract invocation.

Tags
see
https://developers.stellar.org/network/soroban-rpc/api-reference/methods/simulateTransaction
see
SendTransactionResponse

For submitting transactions after simulation

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

$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)

$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)

$resultError

public string|null $resultError = null

Error details explaining why the invoke host function call failed

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

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)

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)

getResultError()

public getResultError() : string|null
Return values
string|null

Error details explaining why the invoke host function call failed

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

setResultError()

public setResultError(string|null $resultError) : void
Parameters
$resultError : string|null

Error details explaining why the invoke host function call failed


        
On this page

Search results