Solana instructions › How to tell which instruction a Solana transaction called
Each instruction in a Solana transaction names a program ID, a list of accounts, and a byte string of instruction data. The program ID says which program is invoked. The first bytes of the data say which of that program's instructions is being called, once you know how that program encodes them.
A practical sequence:
You do not need to simulate the transaction to name the instruction. Simulation and logs answer a different question: whether it succeeded and, if it failed, which error the program returned.
Related: How Anchor instruction discriminators work and the instruction decoder.
To see which instructions a confirmed transaction actually ran, paste its signature into the Rugsight transaction explainer.
Instruction lists and published discriminators come from solana-idls@1.2.1 (MIT) and, for the System Program, Compute Budget and Associated Token Account programs, from their public instruction enums (Apache-2.0). Snapshot date 2026-11-17. Programs can upgrade, so a live program may differ from this snapshot. Computed Anchor discriminators are the first 8 bytes of sha256("global:<snake_case_name>") and are labelled as computed.