Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
Instructions | Solana
[go: Go Back, main page]

Instructions

An instruction is a request to execute a specific function on a Solana program. Instructions are the fundamental building block for onchain 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?

Table of Contents

Edit Page
© 2026 Solana Foundation. All rights reserved.