Instructions

Instructionは、Solanaプログラム上で特定の関数を実行するためのリクエストです。Instructionsは、オンチェーン操作の基本的な構成要素です。各instructionは、呼び出す1つのプログラム、必要なアカウント、およびプログラムが解釈するバイト配列のデータ(通常は実行するinstructionハンドラを識別するためのdiscriminatorと、それに続くシリアライズされた引数)を正確に指定します。各instructionの実行ロジックはプログラムに保存されており、各プログラムは独自のinstructionsセットを定義します。Solanaネットワークとやり取りするには、1つ以上のinstructionsをトランザクションに追加し、ネットワークに送信して処理します。

Diagram depicting a transaction with an instruction, broken up into its 3 componentsDiagram depicting a transaction with an instruction, broken up into its 3 components

重要なポイント

  • 単一プログラム: 各instructionはprogram_idを介して正確に1つのプログラムを対象とします。
  • アカウントメタデータ: accounts配列は、instructionが読み取りまたは書き込みを行うすべてのアカウントに対してAccountMetaを提供します。
  • 不透明なデータ: dataフィールドは、対象プログラムによって形式が定義されるバイト配列です。

Is this page helpful?

目次

ページを編集

管理運営

© 2026 Solana Foundation.
無断転載を禁じます。
つながろう