simulateTransaction

simulateTransaction RPC Method

post

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.

Authorizations
Body
jsonrpcstring · enumRequired

JSON-RPC protocol version

Example: 2.0Possible values:
idone ofRequired

Request identifier that will be returned in the response

Example: 1
stringOptional
or
numberOptional
methodstring · enumRequired

The RPC method name

Example: simulateTransactionPossible values:
Responses
200
Successful Response
application/json
post
curl -X POST https://public.rpc.solanavibestation.com \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "simulateTransaction",
    "params": [
      "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDArczbMia1tLmq7zz4DinMNN0pJ1JtLdqIJPUw3YrGCzYAMHBsgN27lcgB6H2WQvFgyZuJYHa46puOQo9yQ8CVQbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCp20C7Wj2aiuk5TReAXo+VTVg8QTHjs0UjNMMKCvpzZ+ABAgEBARU=",
      {
        "encoding": "base58",
        "commitment": "processed",
        "sigVerify": false,
        "replaceRecentBlockhash": true
      }
    ]
  }'
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "apiVersion": "2.0.15",
      "slot": 123456789
    },
    "value": {
      "err": null,
      "logs": [
        "Program 11111111111111111111111111111111 invoke [1]",
        "Program 11111111111111111111111111111111 success"
      ],
      "accounts": null,
      "unitsConsumed": 150,
      "returnData": null
    }
  },
  "id": 1
}

Last updated