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.
Authorizations
Body
jsonrpcstring · enumRequiredExample:
JSON-RPC protocol version
2.0
Possible values: idone ofRequiredExample:
Request identifier that will be returned in the response
1
stringOptional
numberOptional
methodstring · enumRequiredExample:
The RPC method name
simulateTransaction
Possible values: Responses
200
Successful Response
application/json
401
Unauthorized
text/plain
403
Forbidden
text/plain
429
Too Many Requests
text/plain
500
Internal Server Error
text/plain
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