simulateTransaction
Simulates sending a transaction to get the effects that would occur if the transaction was committed. The simulation runs against the current state of the blockchain and provides detailed information including logs, account changes, compute units consumed, and any errors that would occur during execution. Parameters
transaction(required) — Encoded transaction (signed or unsigned, depending onsigVerify).config(optional) — Optional configuration object. Every field is optional; omit the entire object to use defaults.
Pass Authorization: <api-key> on each request.
JSON-RPC protocol version.
2.0Possible values: Request identifier echoed back in the response.
1Must be simulateTransaction.
simulateTransactionPossible values: Successful simulateTransaction response.
Base envelope of every JSON-RPC 2.0 response.
2.0Possible values: Echoed request id.
1Authentication required or invalid.
Insufficient permissions for the request.
Rate limit exceeded for this tier.
Unexpected server error.
curl -X POST https://public.rpc.solanavibestation.com \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "simulateTransaction",
"params": [
"4hXTCkRzt9WyecNzV1XPgCDfGAZzQKNxLXgynz5QDuWWPSAZBZSHptvWRL3BjCvzUXRdKvHL2b7yGrRQcWyaqsa",
{
"sigVerify": false,
"replaceRecentBlockhash": true
}
]
}'{
"jsonrpc": "2.0",
"id": 1,
"result": {
"context": {
"slot": 416997240,
"apiVersion": "3.1.10"
},
"value": {
"err": null,
"logs": [
"Program 11111111111111111111111111111111 invoke [1]",
"Program 11111111111111111111111111111111 success"
],
"accounts": null,
"unitsConsumed": 200,
"returnData": null
}
}
}Last updated