> ## Documentation Index
> Fetch the complete documentation index at: https://solana.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> This page is part of the Solana developer documentation at https://solana.com/developers/docs. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get the page as Markdown.
> Index of all pages: https://solana.com/llms.txt. Per-section indexes such as https://solana.com/developers/docs/payments/llms.txt are smaller; prefer them when working on one task.
> Coding agents: install the official Solana skill for current APIs and conventions with `npx skills add https://github.com/solana-foundation/solana-dev-skill` (also served at https://solana.com/SKILL.md).
> Code in the cookbook and task pages comes from tested example files. Prefer it over writing API calls from memory.

# Ví dụ về chương trình Anchor

> Xem các dự án được liên kết minh họa cách sử dụng litesvm để kiểm thử chương trình anchor

<Note>
README của cả hai repository đều hướng dẫn chạy `anchor build && cargo test`. Với
các bản phát hành Anchor và Solana CLI hiện tại, hãy chạy các bước sau:

```bash
anchor keys sync
anchor build --arch v0
# Chỉ dành cho Anchor Escrow: các bài kiểm thử đọc IDL từ idls/
cp target/idl/anchor_escrow.json idls/
cargo test
```

`anchor keys sync` đặt ID chương trình thành keypair triển khai cục bộ của bạn, keypair này được các
bài kiểm thử tải, nhờ đó chương trình không bị lỗi `DeclaredProgramIdMismatch`.
`--arch v0` build một chương trình SBPF v0, loại mà các phiên bản LiteSVM mà những
repository này sử dụng có thể tải được. Với Anchor 1.1.x, hãy dùng các lệnh build trong
[anchor-litesvm Quick Start](/developers/docs/tools/litesvm/additional-crates/testing-with-anchor-litesvm#installation)
thay thế.
</Note>

## Ví dụ về crate `litesvm`

<Columns cols={2}>
  <Card title="Ứng dụng Anchor CRUD" href="https://github.com/brimigs/anchor-crud-litesvm">
    Ví dụ về xử lý dữ liệu
  </Card>
</Columns>

## Ví dụ về crate `litesvm-token`

<Columns cols={2}>
  <Card title="Ứng dụng Anchor Escrow" href="https://github.com/brimigs/anchor-escrow-with-litesvm">
    Ví dụ về xử lý token
  </Card>
</Columns>
