Skip to main content

simulateBundle RPC Method

Simulates a Jito bundle – exclusively available to Jito-Solana validator.

Updated on
Aug 16, 2024

simulateBundle RPC Method

Please note that this RPC method requires the Lil' JIT - JITO Bundles and transactions add-on enabled on your QuickNode endpoint.

Parameters

object
object
REQUIRED
An object containing the following fields:
encodedTransactions
array
An array of one or more base64-encoded, serialized transactions for simulation
object
array
The configuration object with the following fields:
simulationBank
string
(Optional) The bank to run the simulation against
skipSigVerify
boolean
(Optional) A boolean value indicating whether to enable signature verification before simulation
replaceRecentBlockhash
boolean
(Optional) A boolean value indicating whether to replace the simulated transaction's recent blockhash with the latest blockhash
accounts
object
The accounts configuration object containing the following fields:
addresses
string
An array of accounts to return, as base-58 encoded strings
encoding
string
The encoding format for account data. It can be one of base58 (slow), base64, base64+zstd or jsonParsed

Returns

result
object
Null if the account doesn't exist otherwise RpcResponse JSON object with the following fields:
context
object
An object that contains metadata about the current state of the Solana network at the time the request was processed
apiVersion
string
The version number
slot
integer
The current slot in the Solana cluster during which the transactions are processed and new blocks are added to the blockchain
err
string
Error code if the transaction failed or null if the transaction succeeds
logs
array
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)
preExecutionAccounts
array
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
object
object
Returns null if the account doesn't exist or if err is not null, otherwise, a JSON object containing:
lamports
integer
The number of lamports assigned to this account as u64 (64-bit unsigned integer)
owner
string
The base-58 encoded Pubkey of the program this account has been assigned to
data
string
The data associated with the account, either as encoded binary data or JSON format {'program': 'state'}, depending on encoding parameter
executable
boolean
A boolean indicating if the account contains a program (and is strictly read-only)
rentEpoch
integer
The epoch at which this account will next owe rent, as u64 (64-bit unsigned integer)
postExecutionAccounts
array
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
object
object
Returns null if the account doesn't exist or if err is not null, otherwise, a JSON object containing:
lamports
integer
The number of lamports assigned to this account as u64 (64-bit unsigned integer)
owner
string
The base-58 encoded Pubkey of the program this account has been assigned to
data
string
The data associated with the account, either as encoded binary data or JSON format {'program': 'state'}, depending on encoding parameter
executable
boolean
A boolean indicating if the account contains a program (and is strictly read-only)
rentEpoch
integer
The epoch at which this account will next owe rent, as u64 (64-bit unsigned integer)
unitsConsumed
integer
The number of compute budget units consumed during the processing of this transaction
returnData
object
The most-recent return data generated by an instruction in the transaction, with the following fields:
programId
string
The program that generated the return data, as base-58 encoded Pubkey
data
string
The return data itself, as base-64 encoded binary data
Request
1
ENCODED_TX=$(echo -n "4hXTCkRzt9WyecNzV1XPgCDfGAZzQKNxLXgynz5QDuWWPSAZBZSHptvWRL3BjCvzUXRdKvHL2b7yGrRQcWyaqsaBCncVG7BFggS8w9snUts67BSh3EqKpXLUm5UMHfD7ZBe9GhARjbNQMLJ1QD3Spr6oMTBU6EhdB4RD8CP2xUxr2u3d6fos36PD98XS6oX8TQjLpsMwncs5DAMiD4nNnR8NBfyghGCWvCVifVwvA8B8TJxE1aiyiv2L429BCWfyzAme5sZW8rDb14NeCQHhZbtNqfXhcp2tAnaAT" | base64)
2
3
curl https://docs-demo.solana-mainnet.quiknode.pro/ \
4
-X POST \
5
-H "Content-Type: application/json" \
6
--data '{
7
"method": "simulateBundle",
8
"params": [
9
{
10
"encodedTransactions": ["'"$ENCODED_TX"'"]
11
}
12
],
13
"id": 1,
14
"jsonrpc": "2.0"
15
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free