Simulate Solana Transaction
Simulate a Solana transaction to get the address balance changes, state updates, and associated risk analysis.
Why Use This API?
- Pre-Broadcast Validation: Validate a transaction’s execution without committing it to the blockchain.
- Debugging: Identify issues such as program errors or insufficient balances.
- Cost Estimation: Assess fees and compute units before broadcasting.
- Risk Assessment: Identify whether any accounts involved in the transaction are malicious or suspicious.
How to Use
Prepare a Transaction
@solana/web3.js or any other SDK to construct a base64-encoded or base58-encoded Solana transaction.Submit to the Endpoint
Content-Type: application/json and this JSON body:Analyze the Response
instruction_groups, asset_transfers, lamport_changes, expected_state_changes, transaction_risk, transaction_summary, and error to understand effects and risks.devnet, testnet, mainnet-beta
Key Features
- Instruction Parsing: Automatic parsing for all programs with public IDLs.
For programs without public IDLs, we reverse-engineer the instruction format
(marked with
"reverse_engineered": true). - Nested Transaction Decoding: Squads v4 embedded transaction messages and
Squads v3
addInstructionoperations are automatically decoded and parsed. - State Change Predictions: Predicted account and token updates based on simulation.
- Asset Movement Analysis: Detects token and SOL transfers with source, destination, mint, and amount.
- Account Risk Scoring: Risk assessment of all involved addresses, including malicious address proximity analysis.
- Exploit Risk Detection: Identifies potential exploit behaviors such as address poisoning attacks.
Response Breakdown
Fee Confidence
Thetransaction_summary includes a fee confidence indicator:
Authorizations
Authorization method required to allow user to access the api endpoints.
Body
Encoded raw transaction (base64 or base58)
1"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAMFEJeb5qTc67efsgZI7ONZ7zVxpO4dt1RQdJUXALHbMrqWD8daOMRtjpRGL/NJrFK4+dloWCuEb9yNAU0iiTXfswbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCpHONZ7VoBLgT6FCucdRocXofP0KAWG5yF/9MbeM382PbG+nrzvtutOj1l82qryXQxsbvkwtL24OR8pgIDRS9dYQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwIDAQMACQQA5AtUAgAAAAIEAQQDAAoNAOQLVAIAAAAGAgIBAAEF"
Encoding type of the transaction
base64, base58 "base64"
Response
The response is of type object.