> For the complete documentation index, see [llms.txt](https://shinkalabs.gitbook.io/hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shinkalabs.gitbook.io/hub/andromeda/guides/simulate.md).

# Dry-run / Simulate

Before you commit a transaction, you can simulate it and get a structured diagnostic back. This uses Solana's `simulateTransaction` under the hood and turns the raw result into something you can act on.

{% hint style="info" %}
Exact request and response bodies are in the [OpenAPI spec](https://api.andromedainfra.pro/openapi.json).
{% endhint %}

## What you get

The diagnostic includes:

* **Would-succeed flag.** Whether the transaction would land.
* **Failure boundary.** If it would fail, where: which instruction, and the error.
* **Estimated compute units.** So you can size a compute budget.
* **Emitted events.** The events the transaction would emit (useful to confirm it does what you expect).
* **Full logs.** The raw program logs from the simulation.

## When to use it

* Before a high-value sign, to confirm the destination program accepts the transaction.
* When debugging a policy rejection: the failure boundary tells you which check failed.
* To estimate compute units for a batch before packing it. See [Auto-batching](/hub/andromeda/guides/batching.md).
* In CI, to catch a regression before it hits the chain.

## What it does not do

* It does not change state. Nothing is broadcast.
* It is a point-in-time estimate. State can change between simulation and submission (a slot rolls, a price moves, a presignature is consumed), so a successful simulation is not a guarantee. For anything sensitive to timing, simulate close to when you submit.

## Combine it

* With [Idempotency keys](/hub/andromeda/guides/idempotency.md): simulate, then submit with an idempotency key so a retry of the real submission is safe.
* With policy templates: simulate against a dWallet behind [`oracle-conditional`](/hub/andromeda/guides/deploy-policy/oracle-conditional.md) or [`time-lock`](/hub/andromeda/guides/deploy-policy/time-lock.md) to see whether the guard would let it through right now.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://shinkalabs.gitbook.io/hub/andromeda/guides/simulate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
