Instruction Handler

Programming Model · Deep

The specific function within a program that processes a particular instruction variant. In native Solana programs, the entrypoint dispatches to different handler functions based on instruction data. In Anchor, each pub fn in the #[program] module is an instruction handler that is automatically routed to via the 8-byte discriminator prefix in the instruction data.

Related terms