1. Decoders

Launchpad decoders

Decode 8 Solana launchpad programs in Rust, including Pump.fun, Meteora DBC, Raydium Launchpad and Boop, with Carbon decoder crates.

On this page

Carbon 2.0.0 has decoder crates for 8 launchpad programs on Solana: 204 instructions, 33 account types and 84 events in all. Use them to index token creations, bonding-curve buys and sells, and migrations to AMM pools as typed Rust values instead of parsing raw bytes. Each program's page lists every instruction with its discriminator, data fields and accounts, every account and event, and a complete program that runs against the public RPC.

Programs#

Program IDs are the mainnet addresses compiled into each crate as PROGRAM_ID. Instruction counts exclude the CpiEvent wrapper.

ProgramCrateProgram IDInstructionsAccountsEvents
Boopcarbon-boop-decoderboop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry429425
Meteora DBCcarbon-meteora-dbc-decoderdbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN28923
Moonshotcarbon-moonshot-decoderMoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG622
Pump.funcarbon-pumpfun-decoder6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P38623
Raydium Launchpadcarbon-raydium-launchpad-decoderLanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj2554
Vertigocarbon-vertigo-decodervrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ613
Virtualscarbon-virtuals-decoder5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki814
Wavebreakcarbon-wavebreak-decoderwaveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF6450

Decode several in one pipeline#

Add carbon-core and the decoder crates you need, all at the same version. For every program in this category:

Terminal
cargo add carbon-core@2.0.0 carbon-boop-decoder@2.0.0 carbon-meteora-dbc-decoder@2.0.0 carbon-moonshot-decoder@2.0.0 carbon-pumpfun-decoder@2.0.0 carbon-raydium-launchpad-decoder@2.0.0 carbon-vertigo-decoder@2.0.0 carbon-virtuals-decoder@2.0.0 carbon-wavebreak-decoder@2.0.0

Register each decoder with a processor for its instruction enum. This fragment goes in your pipeline setup; the processors are yours, one per program, each implementing Processor for that program's instruction input (see processors):

Rust
use carbon_pumpfun_decoder::PumpfunDecoder;
use carbon_meteora_dbc_decoder::MeteoraDbcDecoder;
use carbon_raydium_launchpad_decoder::RaydiumLaunchpadDecoder;

Pipeline::builder()
    .datasource(datasource) // a datasource that emits these programs' transactions
    .instruction(PumpfunDecoder, PumpfunProcessor)
    .instruction(MeteoraDbcDecoder, MeteoraDbcProcessor)
    .instruction(RaydiumLaunchpadDecoder, RaydiumLaunchpadProcessor)
    .build()?
    .run()
    .await

Each decoder only returns instructions whose program ID matches its own PROGRAM_ID, so one pipeline can hold all of them. For datasource filters that follow several programs, and one processor that sees every program's instructions in a transaction, see index multiple programs.

Guides#

A program that is not listed#

Generate a decoder from the program's Anchor or Codama IDL with the Carbon CLI: see generate a decoder. Every crate above was generated the same way. The full catalog lists decoders in every category.

Generated from the crate’s source at Carbon v2.0.0, so it always matches the published code. Spotted a problem? Report it; edits to this page itself are overwritten on the next release.

Your endpoints

Code samples use these instead of the placeholders, so you can copy and run them as they are. They’re stored only in this browser and never sent anywhere.