> ## 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.

# Anchor プログラムの例

> anchor プログラムのテストで litesvm を使う方法を紹介する、リンク先のプロジェクトをご覧いただけます

<Note>
どちらのリポジトリの README も `anchor build && cargo test` を実行するよう記載していますが、現行の Anchor と Solana CLI のリリースでは、代わりに次の手順を実行してください。

```bash
anchor keys sync
anchor build --arch v0
# Anchor Escrow のみ: テストは idls/ から IDL を読み込みます
cp target/idl/anchor_escrow.json idls/
cargo test
```

`anchor keys sync` はプログラム ID をローカルのデプロイ用 keypair に設定します。テストはこの keypair を読み込むため、プログラムが `DeclaredProgramIdMismatch` で失敗することはありません。
`--arch v0` は SBPF v0 プログラムをビルドします。これらのリポジトリが使用する LiteSVM のバージョンで読み込めます。Anchor 1.1.x を使用する場合は、代わりに
[anchor-litesvm クイックスタート](/developers/docs/tools/litesvm/additional-crates/testing-with-anchor-litesvm#installation)
のビルドコマンドを使用してください。
</Note>

## `litesvm` crate の例

<Columns cols={2}>
  <Card title="Anchor CRUD アプリ" href="https://github.com/brimigs/anchor-crud-litesvm">
    データを扱う例
  </Card>
</Columns>

## `litesvm-token` crate の例

<Columns cols={2}>
  <Card title="Anchor Escrow アプリ" href="https://github.com/brimigs/anchor-escrow-with-litesvm">
    トークンを扱う例
  </Card>
</Columns>
