> For the complete documentation index, see [llms.txt](https://dambio.gitbook.io/dambi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dambio.gitbook.io/dambi/undefined-1/simulation.md). Agents can also search and read this documentation through its [MCP server](https://dambio.gitbook.io/dambi/~gitbook/mcp).

# 시뮬레이션으로 테스트하기

정책을 실제 calldata로 안전하게 미리 테스트하기

시뮬레이션은 실제 dApp에 가기 전에, 정책이 의도대로 동작하는지 **안전하게(자금 이동 없이)** 확인하는 도구입니다. 실제 WASM 엔진으로 평가하므로 결과가 운영과 동일해요.

## 4단계

### 1단계 · 지갑 선택

* 등록된 지갑 목록에서 테스트할 지갑 체크 (전체 선택/해제)
* 각 지갑의 보유·승인·포지션이 로드 됨

<figure><img src="https://2239293212-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4tJvLlfkuv4N3G94bjFr%2Fuploads%2FR09Z8hUpKibG5rYDO7jM%2Fimage.png?alt=media&amp;token=8c215943-8c31-459e-acd1-a5010a5b7ba1" alt="" width="563"><figcaption></figcaption></figure>

### 2단계 · 정책 선택

* 지갑별로 적용된 정책 패키지 표시
* 정책 on/off 토글 (지갑별 범위)로 어떤 규칙을 테스트할지 조정

<figure><img src="https://2239293212-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4tJvLlfkuv4N3G94bjFr%2Fuploads%2F0Vs4GB7hOO74CYgiArjL%2Fimage.png?alt=media&amp;token=612b70f5-a369-44b8-9f4f-78d524bc4613" alt="" width="563"><figcaption></figcaption></figure>

### 3단계 · 트랜잭션 큐

* calldata 빌더로 테스트할 요청을 행 단위로 입력 (from / to / calldata / value)
* 각 행이 해당 지갑 상태를 기준으로 **디코드 → 평가 → 상태 반영** 단계를 거칩니다

### 4단계 · 결과

* 지갑별 상태 요약 (토큰·승인·포지션·대기·가스)
* 초기 상태부터 N단계(S0 \~ Sn)까지 상태 변화를 단계별로 추적
* 각 단계의 **판정과 매칭된 규칙**
* 차단(fail)/경고(warn)된 경우 정책 구조 다이어그램과 **"어디서 막혔는지"** 진단

<figure><img src="https://2239293212-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4tJvLlfkuv4N3G94bjFr%2Fuploads%2F9KEFCWu1bqL4LAZbK3kG%2Fimage.png?alt=media&amp;token=c51da12d-fc6a-4113-a42c-71b346cdff2a" alt="" width="563"><figcaption></figcaption></figure>

## 어떻게 읽나

* 기준을 넘는 행동을 넣었을 때 의도한 강도로 `Warn`/`Fail`이 떠야 정상입니다.
* `Pass`만 나온다면 트랜잭션이 정책에 안 걸리는 것입니다.
* 차단 진단을 보면 어떤 조건 때문에 막혔는지 알 수 있어, 정책 디버깅에 유용합니다.

## 다음 단계

* 정책 직접 만들기 → [에디터로 정책 만들기](https://dambio.gitbook.io/dambi/undefined-2/editor.md)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://dambio.gitbook.io/dambi/undefined-1/simulation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
