Skip to content

Solana IDL Sources

Learn where Fordefi gets the IDLs that it uses to decode Solana instructions, and what to do when a program isn't decoded.

An IDL (Interface Description Language file) describes a Solana program's instructions, arguments, and accounts, in the same way that an ABI describes an EVM contract. Fordefi uses IDLs to decode Solana instructions in the transaction details.

Unlike an ABI, an IDL also names the accounts each instruction uses. Fordefi shows these names as labels, such as authority or destination, so the transaction details are easier to read and understand.

IDL cache and IDL formats

Fordefi keeps a cache of IDLs, and decodes instructions only against this cache. IDLs are collected from these sources, listed by priority:

  1. Official Solana programs: IDLs that Anza publishes for native and SPL programs, such as System, Token, Token-2022, Associated Token Account, Memo, and Stake.
  2. Program Metadata Program: IDLs stored on-chain that only the program's upgrade authority can publish. These are the most trustworthy on-chain IDLs.
  3. Anchor on-chain IDL: IDLs that Anchor programs store on-chain. Anyone can publish an IDL to this location, so Fordefi ranks it below the sources above.
  4. Protocol sources: IDLs that protocols publish in their public repositories, for widely used programs. Fordefi adds these to the cache manually.

Fordefi supports several formats and converts them to a common format, Codama, before decoding.

Fordefi and IDL maintenance

Programs change over time, so their IDLs can change too. Fordefi refreshes the two on-chain sources once a week. If a refresh finds an IDL for a program, it replaces the cached IDL. If it finds none, the cached IDL stays in place.

Before an IDL is cached, Fordefi verifies it.

To request decoding for a program, contact Fordefi support and provide the program address, and the IDL if the protocol publishes one.