Decoders
All 63 program decoders published with Carbon 2.0.0: crates, program IDs and what each one decodes.
On this page
Carbon 2.0.0 ships 63 decoder crates for Solana programs, covering 1895 instructions, 301 account types and 455 events. Each page lists the crate, program ID, every instruction with its discriminator, data fields and accounts, every account and event, and a runnable example.
What a decoder is#
A decoder crate turns raw instructions and account data of one program into Rust types. Every crate exports the same items:
| Item | What it is |
|---|---|
PROGRAM_ID | The program's address, a Pubkey constant. Use it to point a datasource at the program. |
< | A unit struct that implements InstructionDecoder and AccountDecoder. Pass it to the pipeline builder. |
instructions:: | One variant per instruction: { program_, with typed instruction data and named accounts. |
accounts:: | One variant per account type, wrapping the decoded struct. |
instructions:: | For Anchor programs that emit events with emit_cpi!: one variant per event. |
types | Structs and enums used inside instructions, accounts and events. |
Every crate has the optional features serde, postgres and graphql. See decoders for how decoding fits into a pipeline.
Use a decoder#
Add the crate at the same version as carbon-core, then register the decoder with a processor for its instruction or account enum:
cargo add carbon-core@2.0.0 carbon-pump-swap-decoder@2.0.0This fragment goes in your pipeline setup; BuyLogger and PoolLogger are your processors:
use carbon_pump_swap_decoder::{PumpSwapDecoder, PROGRAM_ID};
Pipeline::builder()
.datasource(datasource) // e.g. an RpcTransactionCrawler for PROGRAM_ID
.instruction(PumpSwapDecoder, BuyLogger)
.account(PumpSwapDecoder, PoolLogger)
.build()?
.run()
.awaitEach decoder page has a complete program in its Usage section, and the quickstart walks through one end to end. To decode several programs in one pipeline, see multiple programs.
Generate your own#
Every crate here is generated by the Carbon CLI from the program's Anchor or Codama IDL. For a program that is not listed, generate a decoder the same way: see generate a decoder. To write one by hand, see custom decoder.
Catalog#
Instruction counts exclude the CpiEvent wrapper. Program IDs are the mainnet addresses compiled into each crate as PROGRAM_ID.
Core & SPL#
See core and SPL program decoders for these programs together.
| Program | Crate | Program ID | Instructions | Accounts | Events |
|---|---|---|---|---|---|
| Address Lookup Table | carbon-address-lookup-table-decoder | AddressLookupTab1e1111111111111111111111111 | 5 | 1 | 0 |
| Associated Token Account | carbon-associated-token-account-decoder | ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL | 3 | 0 | 0 |
| SPL Memo | carbon-memo-program-decoder | MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr | 1 | 0 | 0 |
| SPL Name Service | carbon-name-service-decoder | namesLPneVptA9Z5rqUDD9tMTWEJwofgaYwp8cawRkX | 5 | 1 | 0 |
| SPL Token | carbon-token-program-decoder | TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA | 28 | 3 | 0 |
| Stake Program | carbon-stake-program-decoder | Stake11111111111111111111111111111111111111 | 18 | 0 | 0 |
| System Program | carbon-system-program-decoder | 11111111111111111111111111111111 | 13 | 1 | 0 |
| Token-2022 | carbon-token-2022-decoder | TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb | 91 | 3 | 0 |
DEX & AMM#
See dEX and AMM decoders for these programs together.
| Program | Crate | Program ID | Instructions | Accounts | Events |
|---|---|---|---|---|---|
| BonkSwap | carbon-bonkswap-decoder | BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p | 19 | 5 | 0 |
| FluxBeam | carbon-fluxbeam-decoder | FLUXubRmkEi2q6K3Y9kBPg9248ggaZVsoSFhtJHSrm1X | 6 | 0 | 0 |
| Gavel | carbon-gavel-decoder | srAMMzfVHVAtgSJc8iH6CfKzuWuUTzLHVCE81QU1rgi | 10 | 2 | 0 |
| Heaven | carbon-heaven-decoder | HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o | 54 | 6 | 7 |
| Jupiter Limit Order | carbon-jupiter-limit-order-decoder | jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu | 9 | 2 | 3 |
| Jupiter Limit Order v2 | carbon-jupiter-limit-order-2-decoder | j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X | 8 | 2 | 4 |
| Kamino Limit Order | carbon-kamino-limit-order-decoder | LiMoM9rMhrdYrfzUCxQppvxCSG1FcrUK9G8uLq4A1GF | 15 | 3 | 2 |
| Lifinity AMM v2 | carbon-lifinity-amm-v2-decoder | 2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c | 3 | 1 | 0 |
| Meteora DAMM v2 | carbon-meteora-damm-v2-decoder | cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG | 38 | 9 | 23 |
| Meteora DLMM | carbon-meteora-dlmm-decoder | LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo | 76 | 12 | 30 |
| Meteora Pools | carbon-meteora-pools-decoder | Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB | 26 | 3 | 18 |
| OpenBook v2 | carbon-openbook-v2-decoder | opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb | 29 | 6 | 8 |
| Orca Whirlpools | carbon-orca-whirlpool-decoder | whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc | 66 | 12 | 6 |
| PancakeSwap | carbon-pancake-swap-decoder | HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq | 27 | 10 | 11 |
| Phoenix v1 | carbon-phoenix-v1-decoder | PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY | 28 | 0 | 0 |
| PumpSwap | carbon-pump-swap-decoder | pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA | 25 | 7 | 22 |
| Raydium AMM v4 | carbon-raydium-amm-v4-decoder | 675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8 | 18 | 3 | 0 |
| Raydium CLMM | carbon-raydium-clmm-decoder | CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK | 34 | 12 | 15 |
| Raydium CPMM | carbon-raydium-cpmm-decoder | CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C | 14 | 4 | 2 |
| Raydium Stable Swap | carbon-raydium-stable-swap-decoder | 5quBtoiQqxF9Jv6KYKctB59NT3gtJD2Y65kdnB1Uev3h | 6 | 0 | 0 |
| Stabble Stable Swap | carbon-stabble-stable-swap-decoder | swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ | 19 | 3 | 2 |
| Stabble Weighted Swap | carbon-stabble-weighted-swap-decoder | swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW | 13 | 2 | 2 |
Lending#
See lending decoders for these programs together.
| Program | Crate | Program ID | Instructions | Accounts | Events |
|---|---|---|---|---|---|
| Jupiter Lend | carbon-jupiter-lend-decoder | jupeiUmn818Jg1ekPURTpr4mFo29p46vygyykFJ3wZC | 24 | 7 | 19 |
| Kamino Lending | carbon-kamino-lending-decoder | KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD | 63 | 10 | 5 |
| Kamino Vault | carbon-kamino-vault-decoder | kvauTFR8qm1dhniz6pYuBZkuene3Hfrs1VQhVRgCNrr | 12 | 2 | 0 |
| marginfi v2 | carbon-marginfi-v2-decoder | MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA | 91 | 15 | 30 |
| Meteora Vault | carbon-meteora-vault-decoder | 24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi | 14 | 2 | 8 |
| Sharky | carbon-sharky-decoder | SHARKobtfF1bHhxD2eqftjHBdVSCbKo9JtgK71FhELP | 35 | 9 | 0 |
Perpetuals & derivatives#
See perpetuals and derivatives decoders for these programs together.
| Program | Crate | Program ID | Instructions | Accounts | Events |
|---|---|---|---|---|---|
| Drift v2 | carbon-drift-v2-decoder | dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH | 249 | 27 | 26 |
| Jupiter Perpetuals | carbon-jupiter-perpetuals-decoder | PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu | 59 | 8 | 25 |
| Zeta Markets | carbon-zeta-decoder | ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD | 107 | 23 | 8 |
Launchpads#
See launchpad decoders for these programs together.
| Program | Crate | Program ID | Instructions | Accounts | Events |
|---|---|---|---|---|---|
| Boop | carbon-boop-decoder | boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4 | 29 | 4 | 25 |
| Meteora DBC | carbon-meteora-dbc-decoder | dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN | 28 | 9 | 23 |
| Moonshot | carbon-moonshot-decoder | MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG | 6 | 2 | 2 |
| Pump.fun | carbon-pumpfun-decoder | 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P | 38 | 6 | 23 |
| Raydium Launchpad | carbon-raydium-launchpad-decoder | LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj | 25 | 5 | 4 |
| Vertigo | carbon-vertigo-decoder | vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ | 6 | 1 | 3 |
| Virtuals | carbon-virtuals-decoder | 5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki | 8 | 1 | 4 |
| Wavebreak | carbon-wavebreak-decoder | waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF | 64 | 5 | 0 |
Liquid staking & restaking#
See liquid staking and restaking decoders for these programs together.
| Program | Crate | Program ID | Instructions | Accounts | Events |
|---|---|---|---|---|---|
| Marinade Finance | carbon-marinade-finance-decoder | MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD | 28 | 2 | 25 |
| Solayer Restaking | carbon-solayer-restaking-program-decoder | sSo1iU21jBrU9VaJ8PJib1MtorefUV4fzC9GURa2KNn | 4 | 1 | 0 |
NFTs & metadata#
See nFT and metadata decoders for these programs together.
| Program | Crate | Program ID | Instructions | Accounts | Events |
|---|---|---|---|---|---|
| Bubblegum | carbon-bubblegum-decoder | BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY | 17 | 2 | 0 |
| Metaplex Core | carbon-mpl-core-decoder | CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d | 42 | 6 | 0 |
| Metaplex Token Metadata | carbon-mpl-token-metadata-decoder | metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s | 58 | 14 | 0 |
Bridges & messaging#
See bridge and messaging decoders for these programs together.
| Program | Crate | Program ID | Instructions | Accounts | Events |
|---|---|---|---|---|---|
| Circle CCTP Message Transmitter v2 | carbon-circle-message-transmitter-v2-decoder | CCTPV2Sm4AdWt5296sk4P66VBZ7bEhcARwFaaS9YPbeC | 15 | 3 | 11 |
| Circle CCTP Token Messenger v2 | carbon-circle-token-messenger-v2-decoder | CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe | 25 | 7 | 22 |
Aggregators & routing#
See aggregator and routing decoders for these programs together.
| Program | Crate | Program ID | Instructions | Accounts | Events |
|---|---|---|---|---|---|
| DFlow Aggregator v4 | carbon-dflow-aggregator-v4-decoder | DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH | 17 | 1 | 2 |
| Jupiter Swap | carbon-jupiter-swap-decoder | JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4 | 17 | 1 | 6 |
| OKX DEX | carbon-okx-dex-decoder | 6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma | 14 | 0 | 2 |
| OnChain Labs DEX v2 | carbon-onchain-labs-dex-v2-decoder | proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u | 19 | 1 | 6 |
Other#
See other program decoders for these programs together.
| Program | Crate | Program ID | Instructions | Accounts | Events |
|---|---|---|---|---|---|
| Jupiter DCA | carbon-jupiter-dca-decoder | DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M | 12 | 1 | 6 |
| Kamino Farms | carbon-kamino-farms-decoder | FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr | 26 | 4 | 0 |
| Pump Fees | carbon-pump-fees-decoder | pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ | 17 | 7 | 14 |
| Raydium Liquidity Locking | carbon-raydium-liquidity-locking-decoder | LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE | 4 | 2 | 1 |
| Swig | carbon-swig-decoder | swigypWHEksbC64pWKwah1WTeh9JXwx8H1rJHLdbQMB | 15 | 0 | 0 |