OpenInfra.sh is now live - Solana infrastructure, included with every server. LEARN MORE HERE >

OpenInfra.shopeninfra.sh

simulateTransaction

Dry-run a transaction against the current chain state. No signatures required, no state changes committed.

Key options

  • sigVerify: false — skip signature validation (default for simulation).
  • replaceRecentBlockhash: true — substitute the blockhash so expired transactions can still be simulated.
  • accounts — return post-simulation state for specified addresses.
  • commitment — which bank state to simulate against.

Request

{  "jsonrpc": "2.0",  "id": 1,  "method": "simulateTransaction",  "params": [    "<base64-encoded transaction>",    {      "encoding": "base64",      "commitment": "confirmed",      "sigVerify": false,      "replaceRecentBlockhash": true,      "accounts": {        "encoding": "base64",        "addresses": ["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"]      }    }  ]}

Response

{  "jsonrpc": "2.0",  "id": 1,  "result": {    "context": { "slot": 312449201 },    "value": {      "err": null,      "logs": [        "Program TokenkegQfe... invoke [1]",        "Program log: Transfer 100000000",        "Program TokenkegQfe... success"      ],      "accounts": null,      "unitsConsumed": 24312,      "returnData": null    }  }}

When err is non-null, logs contain the program output up to the point of failure — useful for debugging. unitsConsumed gives the compute units that would be charged.