{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-user-guide/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["img","admonition"]},"redocly_category":"User Guide","type":"markdown"},"seo":{"title":"Solana Instruction Decoding"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"solana-instruction-decoding","__idx":0},"children":["Solana Instruction Decoding"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A Solana transaction is made up of one or more instructions. Each instruction"," ","calls a program, passes it data, and lists the accounts the program reads or"," ","writes. Without decoding, the instruction data is unreadable, making it"," ","impossible to verify what you are approving."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Fordefi decodes Solana instructions using the program's IDL (Interface"," ","Description Language file). An IDL is the Solana equivalent of an EVM contract's"," ","ABI: it describes a program's instructions, their arguments, and the accounts"," ","each instruction expects. With an IDL, Fordefi shows the instruction name, its"," ","arguments by name, and a name for every account. Fordefi also shows the account"," ","list for programs that have no IDL."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Instruction decoding is available for Solana mainnet in the Fordefi web console,"," ","the browser extension, and the mobile app."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To learn more about the sources of Fordefi's IDL cache and the supported formats"," ","see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/user-guide/manage-transactions/solana-idl-sources"},"children":["Solana IDL Sources"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"view-a-transactions-instructions","__idx":1},"children":["View a transaction's instructions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The transaction details show an ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Instructions"]}," section with the number of"," ","top-level instructions in the transaction, for example ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Instructions (5)"]},"."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Web console: In the sidebar, click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Transactions"]},", and then click a"," ","transaction in the list. In the transaction panel, in the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Overview"]}," tab,"," ","scroll down to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Instructions (N)"]},", below ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Recipients"]},"."]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/solana-instructions-web-console.ce8a01fb2c4e0969331e5c41bda8fecb96c5798114fce24e51f925ff708e7a26.9c1bb791.png","alt":"Instructions section in the Overview tab of the transaction panel in the web console","framed":false,"withLightbox":false,"width":"220","border":"1px solid lightgray"},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Browser extension and mobile app: In the transaction screen, next to"," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Transaction details"]},", tap ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Instructions (N)"]},". The Instructions page"," ","opens."]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/solana-instructions-mobile-transaction.203234541c20312144583daf8f44a6059436deca24ecfd609ad33d00e1bfd1c6.9c1bb791.png","alt":"Instructions link in the transaction details screen of the mobile app","framed":false,"withLightbox":false,"width":"250","border":"1px solid lightgray"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The counter counts top-level instructions only. It doesn't include inner"," ","instructions."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Instruction #"]}," dropdown to switch between instructions. On the"," ","Instructions page, instruction #1 is selected when you first open the page. On"," ","the mobile app, tapping the dropdown opens a bottom sheet."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each entry in the dropdown is shown as ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["#N Program name: Instruction name"]},","," ","for example ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["#1 Manifest CLOB Program: Swap"]},". You can search the dropdown by"," ","instruction name."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Web console:"]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/solana-instructions-dropdown.225828e6d9debcdf658c8120605bda453d016b69c1623767cdd71892cb7e7620.9c1bb791.png","alt":"Instruction dropdown in the web console, listing instructions with indented inner instructions","framed":false,"withLightbox":false,"width":"300","border":"1px solid lightgray"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Mobile app:"]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/solana-instructions-mobile-sheet.b49925e81d5043dc6ea234bc35d6c878510a418f8250ef180a08e3240cd7c1be.9c1bb791.png","alt":"View instructions bottom sheet in the mobile app","framed":false,"withLightbox":false,"width":"250","border":"1px solid lightgray"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"instruction-details","__idx":2},"children":["Instruction details"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For the selected instruction, Fordefi shows these details:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Instruction name: The name of the instruction, as written in the program's"," ","IDL, for example Swap. Shown as ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Unknown"]}," when the program has no IDL."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Program name: The name of the program, for example Manifest CLOB Program."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Program ID: The address of the program."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Address name: The name of the program's address in your Address Book, when it"," ","exists."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["DApp name: The DApp the program belongs to, when known."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"accounts","__idx":3},"children":["Accounts"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Accounts (N)"]}," list shows every account that the instruction uses, in the"," ","order the program expects them. For each account, Fordefi shows:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Account name: The name of the account slot in the program's IDL, for example"," ","Payer or Market. When the program has no IDL, the account is shown as"," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Account #1"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Account #2"]},", and so on."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Roles: One or more role labels. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#account-roles"},"children":["Account roles"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Label: The Address Book contact, vault, or DApp that the address belongs to."," ","When Fordefi doesn't recognize the address, the shortened address is shown."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"account-roles","__idx":4},"children":["Account roles"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["SIGNER: The account signs the transaction."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["WRITABLE: The instruction can change the account."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["FEE PAYER: The account pays the transaction fee. It is always the first"," ","account in the transaction, and is always a signer and writable."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["PROGRAM: The account is a program that the instruction invokes. This role is"," ","evaluated per instruction, because the same account can be a program in one"," ","instruction and an ordinary account in another."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Roles are read directly from the transaction, so they appear for every"," ","instruction, whether or not the program has an IDL. If the transaction uses"," ","address lookup tables, Fordefi resolves them, so the list always shows the full"," ","addresses."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"inner-instructions","__idx":5},"children":["Inner instructions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A program can call other programs while it runs. For example, a swap program"," ","doesn't move tokens itself, it calls the SPL Token program to do it. These calls"," ","are known as cross-program invocations (CPIs). They are not part of the"," ","transaction you sign, but they affect your assets, and you can't see them in the"," ","signed data."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When Fordefi can observe them, inner instructions appear in the"," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Instruction #"]}," dropdown, indented beneath the instruction that triggered them"," ","and numbered accordingly, for example ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["#2.1"]}," and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["#2.2"]},". They are expanded"," ","by default. Each inner instruction has the same details, accounts, and data as a"," ","top-level instruction, and is decoded when the called program's IDL is"," ","available."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Before signing: Inner instructions come from Fordefi's simulation of the"," ","transaction. If the simulation fails, inner instructions aren't shown."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["After the transaction is mined: Inner instructions come from the mined"," ","transaction."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"data","__idx":6},"children":["Data"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Data"]}," section shows the instruction's data, with a toggle between"," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Decoded"]}," and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Raw"]},"."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Decoded: The instruction's arguments, by name, for example ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["inAtoms: 10,000"]},"."," ","Arguments that contain other values, such as structures and lists, are shown"," ","nested with indentation. When an argument is an address, Fordefi shows the"," ","Address Book, vault, or DApp name it belongs to. The decoded view is the"," ","default."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Raw: The instruction's data as a hexadecimal string, which you can copy with"," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Copy"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When the program has no IDL, or decoding fails, there is nothing to decode. The"," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Decoded"]}," option is disabled and the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Raw"]}," view is shown by default."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"batches-of-transactions","__idx":7},"children":["Batches of transactions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When a DApp requests several Solana transactions at once, the browser extension"," ","shows them as a single transaction, titled ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["N Solana transactions"]},", with all"," ","the instructions in one list. Instructions are numbered sequentially across the"," ","whole batch. For example, two transactions with five instructions each show"," ","instructions #1 through #10, not #1 through #5 twice."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Policies"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Instruction decoding gives you visibility into what a transaction does."," ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/user-guide/policies/policy-rules-conditions-and-actions"},"children":["Policy rules"]}," don't yet match"," ","on decoded Solana instruction data."]}]}]},"headings":[{"value":"Solana Instruction Decoding","id":"solana-instruction-decoding","depth":1},{"value":"View a transaction's instructions","id":"view-a-transactions-instructions","depth":2},{"value":"Instruction details","id":"instruction-details","depth":2},{"value":"Accounts","id":"accounts","depth":2},{"value":"Account roles","id":"account-roles","depth":3},{"value":"Inner instructions","id":"inner-instructions","depth":2},{"value":"Data","id":"data","depth":2},{"value":"Batches of transactions","id":"batches-of-transactions","depth":2}],"frontmatter":{"seo":{"title":"Solana Instruction Decoding"}},"lastModified":"2026-12-01T14:37:35.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/user-guide/manage-transactions/solana-instruction-decoding","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}