Skip to content
An instruction asks one program to run one of its handlers. It names the program, the accounts it needs, and a byte array of data the program interprets (usually a discriminator that picks the handler, then serialized arguments). To change state, you add one or more instructions to a transaction and send it.
An instruction names a program, the accounts it uses, and the data it passes.An instruction names a program, the accounts it uses, and the data it passes.
An instruction names a program, the accounts it uses, and the data it passes.

​Key facts

  • Single program: Each instruction targets exactly one program via program_id.
  • Account metadata: The accounts array has an 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.