Instructions

An instruction is a request to execute a specific function on a Solana program. Instructions are the fundamental building block for on-chain operations. Each instruction specifies exactly one program to call, the accounts it needs, and a byte array of data that the program interprets (typically a discriminator to identify which instruction handler to run, followed by serialized arguments). Execution logic for each instruction is stored on a program, where each program defines its own set of instructions. To interact with the Solana network, one or more instructions are added to a transaction and sent to the network to be processed.

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

Key facts

  • Single program: Each instruction targets exactly one program via program_id.
  • Account metadata: The accounts array provides AccountMeta for every account the instruction reads or writes.
  • Opaque data: The data field is a byte array whose format is defined by the target program.

Is this page helpful?

सामग्री तालिका

पृष्ठ संपादित करें

द्वारा प्रबंधित

© 2026 सोलाना फाउंडेशन। सर्वाधिकार सुरक्षित।
जुड़े रहें
Instructions | Solana