Docs / Rpc/ Simulate TransactionsimulateTransaction Dry-run a Solana transaction over rpc edge to get logs, compute units, and errors before sending.
simulateTransaction runs a transaction against the current bank without submitting it. Use it to
catch errors, read program logs, and measure compute-unit usage before you spend a fee. On shared
plans it has its own safety limits (see rate limits ).
Copy curl -s https://rpc.rpcedge.com \
-H 'content-type: application/json' \
-H 'x-api-key: YOUR_UUID_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "simulateTransaction",
"params": ["<base64-encoded-tx>", { "encoding": "base64", "commitment": "processed", "replaceRecentBlockhash": true }]
}'
Position Name Type Notes 0transactionstringSerialized transaction (signing optional unless sigVerify is set). 1configobjectOptional. Fields below.
Field Type Notes encodingstringbase64 (recommended) or base58.commitmentstringBank state to simulate against. sigVerifyboolVerify signatures. Cannot be used with replaceRecentBlockhash. replaceRecentBlockhashboolSwap in a fresh blockhash before simulating - avoids "blockhash not found". accountsobject{ addresses, encoding } to return post-simulation account state.
Copy {
"jsonrpc" : "2.0" ,
"id" : 1 ,
"result" : {
"context" : { "slot" : 429641447 },
"value" : {
"err" : null ,
"logs" : [ "Program 11111111111111111111111111111111 invoke [1]" , "Program ... success" ],
"unitsConsumed" : 4821 ,
"accounts" : null ,
"returnData" : null
}
}
}
Field Meaning errnull on success; otherwise the on-chain error the transaction would hit.logsProgram log lines - the fastest way to debug a failing instruction. unitsConsumedCompute units used - size your compute-unit limit from this. returnDataProgram return data, if any.
Right-size compute
Set your compute-unit limit slightly above the simulated unitsConsumed, and price the
priority fee with the priority-fee estimator .
Tight limits + a competitive fee land more reliably and cost less.
Ready to run this against a real endpoint? Create an account, start on Free, and issue an API key. Upgrade to Builder, Trader, or Desk when you need more capacity or streaming. Co-located in Frankfurt - no credit math, bandwidth is included in the plan.