Parameters
- objectobjectREQUIRED
An object containing the following fields:
- encodedTransactionsarray
An array of one or more base64-encoded, serialized transactions for simulation
- objectarray
The configuration object with the following fields:
- simulationBankstring
(Optional) The bank to run the simulation against
- skipSigVerifyboolean
(Optional) A boolean value indicating whether to skip signature verification before simulation. skipSigVerify and replaceRecentBlockhash must be included in the payload for this parameter to work properly.
- replaceRecentBlockhashboolean
(Optional) A boolean value indicating whether to replace the simulated transaction's recent blockhash with the latest blockhash. skipSigVerify and replaceRecentBlockhash must be included in the payload for this parameter to work properly.
- accountsobject
The accounts configuration object containing the following fields:
- addressesstring
An array of accounts to return, as base-58 encoded strings
- encodingstring
The encoding format for account data. It can be one of base58 (slow), base64, base64+zstd or jsonParsed
- preExecutionAccountsConfigsarray
Specifies account state configuration before execution. Each entry corresponds to a transaction in encodedTransactions
- objectobject
Configuration for a specific transaction, or null
- accountIndexnumber
The index of the account in the transaction you want to pre-configure
- addressesarray
A list of account addresses to monitor before execution
- postExecutionAccountsConfigsarray
Specifies account state configuration after execution. Each entry corresponds to a transaction in encodedTransactions
- objectobject
Configuration for a specific transaction, or null
- accountIndexnumber
The index of the account in the transaction you want to configure
- addressesarray
A list of account addresses to monitor after execution
Returns
- resultobject
Null if the account doesn't exist otherwise RpcResponse JSON object with the following fields:
- contextobject
An object that contains metadata about the current state of the Solana network at the time the request was processed
- apiVersionstring
The version number
- slotinteger
The current slot in the Solana cluster during which the transactions are processed and new blocks are added to the blockchain
- errstring
Error code if the transaction failed or null if the transaction succeeds
- logsarray
An array of log messages the transaction instructions output during execution, null if simulation failed before the transaction was able to execute (for example due to an invalid blockhash or signature verification failure)
- preExecutionAccountsarray
A list of accounts to return the pre transaction execution state for. The length of the array must be equal to the number transactions in the bundle
- objectobject
Returns null if the account doesn't exist or if err is not null, otherwise, a JSON object containing:
- lamportsinteger
The number of lamports assigned to this account as u64 (64-bit unsigned integer)
- ownerstring
The base-58 encoded address of the program this account has been assigned to
- datastring
The data associated with the account, either as encoded binary data or JSON format {'program': 'state'}, depending on encoding parameter
- executableboolean
A boolean indicating if the account contains a program (and is strictly read-only)
- rentEpochinteger
The epoch at which this account will next owe rent, as u64 (64-bit unsigned integer)
- postExecutionAccountsarray
A list of accounts to return the post transaction execution state for. The length of the array must be equal to the number transactions in the bundle
- objectobject
Returns null if the account doesn't exist or if err is not null, otherwise, a JSON object containing:
- lamportsinteger
The number of lamports assigned to this account as u64 (64-bit unsigned integer)
- ownerstring
The base-58 encoded address of the program this account has been assigned to
- datastring
The data associated with the account, either as encoded binary data or JSON format {'program': 'state'}, depending on encoding parameter
- executableboolean
A boolean indicating if the account contains a program (and is strictly read-only)
- rentEpochinteger
The epoch at which this account will next owe rent, as u64 (64-bit unsigned integer)
- unitsConsumedinteger
The number of compute budget units consumed during the processing of this transaction
- returnDataobject
The most-recent return data generated by an instruction in the transaction, with the following fields:
- programIdstring
The program that generated the return data, as base-58 encoded address
- datastring
The return data itself, as base-64 encoded binary data
1{2"jsonrpc": "2.0",3"id": 1,4"result": {5"context": {6"apiVersion": "1.16.3",7"slot": 2028519458},9"err": null,10"logs": [11"Program 11111111111111111111111111111111 invoke [1]",12"Program 11111111111111111111111111111111 success",13"Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [1]",14"Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success"15],16"preExecutionAccounts": [17{18"lamports": 1000000000,19"owner": "11111111111111111111111111111111",20"data": "",21"executable": false,22"rentEpoch": 37123}24],25"postExecutionAccounts": [26{27"lamports": 998000000,28"owner": "11111111111111111111111111111111",29"data": "",30"executable": false,31"rentEpoch": 37132}33],34"unitsConsumed": 200000,35"returnData": {36"programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",37"data": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASjD8="38}39}40}
1{2"jsonrpc": "2.0",3"id": 1,4"result": {5"context": {6"apiVersion": "1.16.3",7"slot": 2028519458},9"err": null,10"logs": [11"Program 11111111111111111111111111111111 invoke [1]",12"Program 11111111111111111111111111111111 success",13"Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [1]",14"Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success"15],16"preExecutionAccounts": [17{18"lamports": 1000000000,19"owner": "11111111111111111111111111111111",20"data": "",21"executable": false,22"rentEpoch": 37123}24],25"postExecutionAccounts": [26{27"lamports": 998000000,28"owner": "11111111111111111111111111111111",29"data": "",30"executable": false,31"rentEpoch": 37132}33],34"unitsConsumed": 200000,35"returnData": {36"programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",37"data": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASjD8="38}39}40}