Pump.fun decoder

Decode Pump.fun instructions, accounts and events in Rust with carbon-pumpfun-decoder 2.0.0. Program ID 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P.

On this page

carbon-pumpfun-decoder decodes the instructions, accounts and events of the Pump.fun program (6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P): 38 instructions, 6 account types, 23 events. It is generated with Codama from the program's IDL; see decoders for how decoders plug into a pipeline.

Cratecarbon-pumpfun-decoder 2.0.0
Installcargo add carbon-pumpfun-decoder@2.0.0
Program ID6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P (carbon_pumpfun_decoder::PROGRAM_ID)
CategoryLaunchpads
Decodercarbon_pumpfun_decoder::PumpfunDecoder
Instruction enuminstructions::PumpfunInstruction
Account enumaccounts::PumpfunAccount
Event enuminstructions::CpiEvent
Featuresserde, postgres, graphql (none enabled by default)
API docsdocs.rs/carbon-pumpfun-decoder/2.0.0
Sourcedecoders/pumpfun-decoder

Other launchpad decoders: Boop, Meteora DBC, Moonshot, Raydium Launchpad, Vertigo, Virtuals, Wavebreak. To decode several in one pipeline, see launchpad decoders.

Guide: Track Pump.fun launches and trades.

The serde feature derives Serialize/Deserialize on every type, postgres adds tables and processors for Postgres, and graphql adds a schema for the GraphQL server.

Usage#

This program crawls recent Pump.fun transactions from the public RPC and prints every decoded Buy instruction. Add the dependencies:

Terminal
cargo add carbon-core@2.0.0 carbon-pumpfun-decoder@2.0.0 carbon-rpc-transaction-crawler-datasource@2.0.0 carbon-log-metrics@2.0.0 env_logger tokio --features tokio/full
src/main.rs
use {
    carbon_core::{
        error::CarbonResult, instruction::InstructionProcessorInputType, pipeline::Pipeline,
        processor::Processor,
    },
    carbon_log_metrics::LogMetrics,
    carbon_pumpfun_decoder::{instructions::PumpfunInstruction, PumpfunDecoder, PROGRAM_ID},
    carbon_rpc_transaction_crawler_datasource::{ConnectionConfig, Filters, RpcTransactionCrawler},
    std::sync::Arc,
};

#[tokio::main]
async fn main() -> CarbonResult<()> {
    env_logger::init();

    // Fetches the program's recent transactions over JSON-RPC, newest first.
    let datasource = RpcTransactionCrawler::new(
        "https://api.mainnet-beta.solana.com".to_string(),
        PROGRAM_ID,
        ConnectionConfig::default(),
        Filters::new(None, None, None),
        None,
    );

    Pipeline::builder()
        .datasource(datasource)
        .metrics(Arc::new(LogMetrics::new()))
        .instruction(PumpfunDecoder, InstructionLogger)
        .build()?
        .run()
        .await
}

struct InstructionLogger;

impl Processor<InstructionProcessorInputType<'_, PumpfunInstruction>> for InstructionLogger {
    async fn process(
        &mut self,
        input: &InstructionProcessorInputType<'_, PumpfunInstruction>,
    ) -> CarbonResult<()> {
        let signature = input.metadata.transaction_metadata.signature;
        if let PumpfunInstruction::Buy { data, accounts, .. } = input.decoded_instruction {
            println!("buy {signature}: {data:?} global={}", accounts.global);
        }
        Ok(())
    }
}
Terminal
RUST_LOG=info cargo run

Each Buy instruction prints one line with the transaction signature and the decoded Buy data. The public endpoint rate-limits requests, so the first lines can take a while; use your own RPC URL for anything beyond a test. See stream with RPC for the crawler options.

Events published with Anchor's emit_cpi! arrive as the CpiEvent instruction. Match them with PumpfunInstruction::CpiEvent { data: CpiEvent::AdminSetCreatorEvent(event), .. } (import instructions::CpiEvent); see Events. If CpiEvent never arrives, the program logs its events with emit! instead: decode them with decode_log_events.

Decode accounts#

The transaction crawler emits transactions only. To decode accounts, use a datasource that emits account updates. This program subscribes to the program's accounts with programSubscribe on the public WebSocket endpoint and prints every decoded BondingCurve account as it changes. Add the datasource and the Solana RPC types it takes:

Terminal
cargo add carbon-rpc-program-subscribe-datasource@2.0.0 solana-client@4.2.2
src/main.rs
use {
    carbon_core::{
        account::AccountProcessorInputType, error::CarbonResult, pipeline::Pipeline,
        processor::Processor,
    },
    carbon_log_metrics::LogMetrics,
    carbon_pumpfun_decoder::{accounts::PumpfunAccount, PumpfunDecoder, PROGRAM_ID},
    carbon_rpc_program_subscribe_datasource::{Filters, RpcProgramSubscribe},
    solana_client::rpc_config::{RpcAccountInfoConfig, RpcProgramAccountsConfig, UiAccountEncoding},
    std::sync::Arc,
};

#[tokio::main]
async fn main() -> CarbonResult<()> {
    env_logger::init();

    // Streams every change to an account owned by the program (programSubscribe).
    let config = RpcProgramAccountsConfig {
        account_config: RpcAccountInfoConfig {
            encoding: Some(UiAccountEncoding::Base64),
            ..Default::default()
        },
        ..Default::default()
    };
    let datasource = RpcProgramSubscribe::new(
        "wss://api.mainnet-beta.solana.com".to_string(),
        Filters::new(PROGRAM_ID, Some(config)),
    );

    Pipeline::builder()
        .datasource(datasource)
        .metrics(Arc::new(LogMetrics::new()))
        .account(PumpfunDecoder, AccountLogger)
        .build()?
        .run()
        .await
}

struct AccountLogger;

impl Processor<AccountProcessorInputType<'_, PumpfunAccount>> for AccountLogger {
    async fn process(
        &mut self,
        input: &AccountProcessorInputType<'_, PumpfunAccount>,
    ) -> CarbonResult<()> {
        if let PumpfunAccount::BondingCurve(bonding_curve) = &input.decoded_account.data {
            println!("bonding_curve {}: {bonding_curve:?}", input.metadata.pubkey);
        }
        Ok(())
    }
}
Terminal
RUST_LOG=info cargo run

Each update to a BondingCurve account prints its address and decoded fields; the program runs until you stop it. Cargo resolves solana-client to 4.2.2, the exact version the datasource pins, so both use the same RpcProgramAccountsConfig type. To load every existing account once instead of streaming changes, see load account state.

Instructions#

Variants of PumpfunInstruction. Each is PumpfunInstruction::<Variant> { program_id, data, accounts }, where data and accounts are the types listed under the variant, exported from carbon_pumpfun_decoder::instructions. Discriminators are the leading bytes of the instruction data, in hex.

How an instruction decodes. The decoder returns a variant only when all of these hold; otherwise the instruction is skipped and no processor is called:

  1. The instruction's program ID is 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P.
  2. The data starts with the variant's discriminator, and the rest deserializes into its data type.
  3. The instruction has at least as many accounts as the variant requires (the "Required accounts" count under each variant).

Accounts. They are matched by position, in the order listed. An account marked optional is None only when the instruction ends before it; Anchor programs pass the program ID as a placeholder for an omitted optional account, so check for Some(PROGRAM_ID) too. Accounts after the listed ones are in accounts.remaining as AccountMetas. The decoder doesn't record whether an account signed or was writable: read that from input.raw_instruction.accounts[i].is_signer and .is_writable, which follow the same order. It doesn't check signer, writable, owner or PDA constraints either; the program enforced those when the transaction executed, so a decoded instruction from a successful transaction already satisfied them.

AddQuoteMint#

Discriminator 6f79153828185ed1 · data AddQuoteMint · accounts AddQuoteMintInstructionAccounts.

FieldType
quote_mintPubkey

Required accounts: 4; extras go to remaining.

Fields of AddQuoteMintInstructionAccounts, in account order:

#FieldType
0globalPubkey
1authorityPubkey
2event_authorityPubkey
3programPubkey
4…remainingVec<AccountMeta>

AdminSetCreator#

From the program's IDL:

Allows Global::admin_set_creator_authority to override the bonding curve creator

Discriminator 4519ab8e39ef0d04 · data AdminSetCreator · accounts AdminSetCreatorInstructionAccounts.

FieldType
creatorPubkey

Required accounts: 6; extras go to remaining.

Fields of AdminSetCreatorInstructionAccounts, in account order:

#FieldType
0admin_set_creator_authorityPubkey
1globalPubkey
2mintPubkey
3bonding_curvePubkey
4event_authorityPubkey
5programPubkey
6…remainingVec<AccountMeta>

AdminSetIdlAuthority#

Discriminator 08d960e79068c005 · data AdminSetIdlAuthority · accounts AdminSetIdlAuthorityInstructionAccounts.

FieldType
idl_authorityPubkey

Required accounts: 7; extras go to remaining.

Fields of AdminSetIdlAuthorityInstructionAccounts, in account order:

#FieldType
0authorityPubkey
1globalPubkey
2idl_accountPubkey
3system_programPubkey
4program_signerPubkey
5event_authorityPubkey
6programPubkey
7…remainingVec<AccountMeta>

AdminUpdateTokenIncentives#

Discriminator d10b7357d5177ccc · data AdminUpdateTokenIncentives · accounts AdminUpdateTokenIncentivesInstructionAccounts.

FieldType
start_timei64
end_timei64
seconds_in_a_dayi64
day_numberu64
pump_token_supply_per_dayu64

Required accounts: 10; extras go to remaining.

Fields of AdminUpdateTokenIncentivesInstructionAccounts, in account order:

#FieldType
0authorityPubkey
1globalPubkey
2global_volume_accumulatorPubkey
3mintPubkey
4global_incentive_token_accountPubkey
5associated_token_programPubkey
6system_programPubkey
7token_programPubkey
8event_authorityPubkey
9programPubkey
10…remainingVec<AccountMeta>

Buy#

From the program's IDL:

Buys tokens from a bonding curve.

Discriminator 66063d1201daebea · data Buy · accounts BuyInstructionAccounts.

FieldType
amountu64
max_sol_costu64
track_volumeOptionBool

Required accounts: 16; extras go to remaining.

Fields of BuyInstructionAccounts, in account order:

#FieldType
0globalPubkey
1fee_recipientPubkey
2mintPubkey
3bonding_curvePubkey
4associated_bonding_curvePubkey
5associated_userPubkey
6userPubkey
7system_programPubkey
8token_programPubkey
9creator_vaultPubkey
10event_authorityPubkey
11programPubkey
12global_volume_accumulatorPubkey
13user_volume_accumulatorPubkey
14fee_configPubkey
15fee_programPubkey
16…remainingVec<AccountMeta>

BuyExactQuoteInV2#

Discriminator c2ab1c46684d5b2f · data BuyExactQuoteInV2 · accounts BuyExactQuoteInV2InstructionAccounts.

FieldType
spendable_quote_inu64
min_tokens_outu64

Required accounts: 27; extras go to remaining.

Fields of BuyExactQuoteInV2InstructionAccounts, in account order:

#FieldType
0globalPubkey
1base_mintPubkey
2quote_mintPubkey
3base_token_programPubkey
4quote_token_programPubkey
5associated_token_programPubkey
6fee_recipientPubkey
7associated_quote_fee_recipientPubkey
8buyback_fee_recipientPubkey
9associated_quote_buyback_fee_recipientPubkey
10bonding_curvePubkey
11associated_base_bonding_curvePubkey
12associated_quote_bonding_curvePubkey
13userPubkey
14associated_base_userPubkey
15associated_quote_userPubkey
16creator_vaultPubkey
17associated_creator_vaultPubkey
18sharing_configPubkey
19global_volume_accumulatorPubkey
20user_volume_accumulatorPubkey
21associated_user_volume_accumulatorPubkey
22fee_configPubkey
23fee_programPubkey
24system_programPubkey
25event_authorityPubkey
26programPubkey
27…remainingVec<AccountMeta>

BuyExactSolIn#

From the program's IDL:

Given a budget of spendable SOL, buy at least min_tokens_out tokens.
Fees are deducted from spendable_sol_in.

Quote formulas

Where:

  • total_fee_bps = protocol_fee_bps + creator_fee_bps (creator_fee_bps is 0 if no creator)
  • floor(a/b) = a / b (integer division)
  • ceil(a/b) = (a + b - 1) / b

SOL → tokens quote
To calculate tokens_out for a given spendable_sol_in:

  1. net_sol = floor(spendable_sol_in * 10_000 / (10_000 + total_fee_bps))
  2. fees = ceil(net_sol * protocol_fee_bps / 10_000) + ceil(net_sol * creator_fee_bps / 10_000) (creator_fee_bps is 0 if no creator)
  3. if net_sol + fees > spendable_sol_in: net_sol = net_sol - (net_sol + fees
    • spendable_sol_in)
  4. tokens_out = floor((net_sol - 1) * virtual_token_reserves / (virtual_sol_reserves + net_sol - 1))

Reverse quote (tokens → SOL)
To calculate spendable_sol_in for a desired number of tokens:

  1. net_sol = ceil(tokens * virtual_sol_reserves / (virtual_token_reserves - tokens)) + 1
  2. spendable_sol_in = ceil(net_sol * (10_000 + total_fee_bps) / 10_000)

Rent
Separately make sure the instruction's payer has enough SOL to cover rent for:

  • creator_vault: rent.minimum_balance(0)
  • user_volume_accumulator: rent.minimum_balance(UserVolumeAccumulator::LEN)

Discriminator 38fc74089edfcd5f · data BuyExactSolIn · accounts BuyExactSolInInstructionAccounts.

FieldType
spendable_sol_inu64
min_tokens_outu64
track_volumeOptionBool

Required accounts: 16; extras go to remaining.

Fields of BuyExactSolInInstructionAccounts, in account order:

#FieldType
0globalPubkey
1fee_recipientPubkey
2mintPubkey
3bonding_curvePubkey
4associated_bonding_curvePubkey
5associated_userPubkey
6userPubkey
7system_programPubkey
8token_programPubkey
9creator_vaultPubkey
10event_authorityPubkey
11programPubkey
12global_volume_accumulatorPubkey
13user_volume_accumulatorPubkey
14fee_configPubkey
15fee_programPubkey
16…remainingVec<AccountMeta>

BuyV2#

Discriminator b817ee6167c5d33d · data BuyV2 · accounts BuyV2InstructionAccounts.

FieldType
amountu64
max_sol_costu64

Required accounts: 27; extras go to remaining.

Fields of BuyV2InstructionAccounts, in account order:

#FieldType
0globalPubkey
1base_mintPubkey
2quote_mintPubkey
3base_token_programPubkey
4quote_token_programPubkey
5associated_token_programPubkey
6fee_recipientPubkey
7associated_quote_fee_recipientPubkey
8buyback_fee_recipientPubkey
9associated_quote_buyback_fee_recipientPubkey
10bonding_curvePubkey
11associated_base_bonding_curvePubkey
12associated_quote_bonding_curvePubkey
13userPubkey
14associated_base_userPubkey
15associated_quote_userPubkey
16creator_vaultPubkey
17associated_creator_vaultPubkey
18sharing_configPubkey
19global_volume_accumulatorPubkey
20user_volume_accumulatorPubkey
21associated_user_volume_accumulatorPubkey
22fee_configPubkey
23fee_programPubkey
24system_programPubkey
25event_authorityPubkey
26programPubkey
27…remainingVec<AccountMeta>

ClaimCashback#

Discriminator 253a237ebe35e4c5 · data ClaimCashback · accounts ClaimCashbackInstructionAccounts.

No data fields.

Required accounts: 5; extras go to remaining.

Fields of ClaimCashbackInstructionAccounts, in account order:

#FieldType
0userPubkey
1user_volume_accumulatorPubkey
2system_programPubkey
3event_authorityPubkey
4programPubkey
5…remainingVec<AccountMeta>

ClaimCashbackV2#

Discriminator 7af3cc415e741d37 · data ClaimCashbackV2 · accounts ClaimCashbackV2InstructionAccounts.

No data fields.

Required accounts: 10; extras go to remaining.

Fields of ClaimCashbackV2InstructionAccounts, in account order:

#FieldType
0userPubkey
1user_volume_accumulatorPubkey
2quote_mintPubkey
3quote_token_programPubkey
4associated_token_programPubkey
5associated_user_volume_accumulatorPubkey
6associated_quote_userPubkey
7system_programPubkey
8event_authorityPubkey
9programPubkey
10…remainingVec<AccountMeta>

ClaimTokenIncentives#

Discriminator 1004471ccc01281b · data ClaimTokenIncentives · accounts ClaimTokenIncentivesInstructionAccounts.

No data fields.

Required accounts: 12; extras go to remaining.

Fields of ClaimTokenIncentivesInstructionAccounts, in account order:

#FieldType
0userPubkey
1user_ataPubkey
2global_volume_accumulatorPubkey
3global_incentive_token_accountPubkey
4user_volume_accumulatorPubkey
5mintPubkey
6token_programPubkey
7system_programPubkey
8associated_token_programPubkey
9event_authorityPubkey
10programPubkey
11payerPubkey
12…remainingVec<AccountMeta>

CloseUserVolumeAccumulator#

Discriminator f945a4da9667548a · data CloseUserVolumeAccumulator · accounts CloseUserVolumeAccumulatorInstructionAccounts.

No data fields.

Required accounts: 4; extras go to remaining.

Fields of CloseUserVolumeAccumulatorInstructionAccounts, in account order:

#FieldType
0userPubkey
1user_volume_accumulatorPubkey
2event_authorityPubkey
3programPubkey
4…remainingVec<AccountMeta>

CollectCreatorFee#

From the program's IDL:

Collects creator_fee from creator_vault to the coin creator account

Discriminator 1416567bc61cdb84 · data CollectCreatorFee · accounts CollectCreatorFeeInstructionAccounts.

No data fields.

Required accounts: 5; extras go to remaining.

Fields of CollectCreatorFeeInstructionAccounts, in account order:

#FieldType
0creatorPubkey
1creator_vaultPubkey
2system_programPubkey
3event_authorityPubkey
4programPubkey
5…remainingVec<AccountMeta>

Create#

From the program's IDL:

Creates a new coin and bonding curve.

Discriminator 181ec828051c0777 · data Create · accounts CreateInstructionAccounts.

FieldType
nameString
symbolString
uriString
creatorPubkey

Required accounts: 14; extras go to remaining.

Fields of CreateInstructionAccounts, in account order:

#FieldType
0mintPubkey
1mint_authorityPubkey
2bonding_curvePubkey
3associated_bonding_curvePubkey
4globalPubkey
5mpl_token_metadataPubkey
6metadataPubkey
7userPubkey
8system_programPubkey
9token_programPubkey
10associated_token_programPubkey
11rentPubkey
12event_authorityPubkey
13programPubkey
14…remainingVec<AccountMeta>

CreateV2#

From the program's IDL:

Creates a new spl-22 coin and bonding curve.

Discriminator d6904cec5f8b31b4 · data CreateV2 · accounts CreateV2InstructionAccounts.

FieldType
nameString
symbolString
uriString
creatorPubkey
is_mayhem_modebool
is_cashback_enabledOptionBool

Required accounts: 16; extras go to remaining.

Fields of CreateV2InstructionAccounts, in account order:

#FieldType
0mintPubkey
1mint_authorityPubkey
2bonding_curvePubkey
3associated_bonding_curvePubkey
4globalPubkey
5userPubkey
6system_programPubkey
7token_programPubkey
8associated_token_programPubkey
9mayhem_program_idPubkey
10global_paramsPubkey
11sol_vaultPubkey
12mayhem_statePubkey
13mayhem_token_vaultPubkey
14event_authorityPubkey
15programPubkey
16…remainingVec<AccountMeta>

DistributeCreatorFees#

From the program's IDL:

Distributes creator fees to shareholders based on their share percentages
The creator vault needs to have at least the minimum distributable amount to distribute fees This can be checked with the get_minimum_distributable_fee instruction

Discriminator a572670079cef751 · data DistributeCreatorFees · accounts DistributeCreatorFeesInstructionAccounts.

No data fields.

Required accounts: 7; extras go to remaining.

Fields of DistributeCreatorFeesInstructionAccounts, in account order:

#FieldType
0mintPubkey
1bonding_curvePubkey
2sharing_configPubkey
3creator_vaultPubkey
4system_programPubkey
5event_authorityPubkey
6programPubkey
7…remainingVec<AccountMeta>

ExtendAccount#

From the program's IDL:

Extends the size of program-owned accounts

Discriminator ea66c2cb96483ee5 · data ExtendAccount · accounts ExtendAccountInstructionAccounts.

No data fields.

Required accounts: 5; extras go to remaining.

Fields of ExtendAccountInstructionAccounts, in account order:

#FieldType
0accountPubkey
1userPubkey
2system_programPubkey
3event_authorityPubkey
4programPubkey
5…remainingVec<AccountMeta>

GetMinimumDistributableFee#

From the program's IDL:

Permissionless instruction to check the minimum required fees for distribution Returns the minimum required balance from the creator_vault and whether distribution can proceed

Discriminator 75e17fca865f4423 · data GetMinimumDistributableFee · accounts GetMinimumDistributableFeeInstructionAccounts.

No data fields.

Required accounts: 4; extras go to remaining.

Fields of GetMinimumDistributableFeeInstructionAccounts, in account order:

#FieldType
0mintPubkey
1bonding_curvePubkey
2sharing_configPubkey
3creator_vaultPubkey
4…remainingVec<AccountMeta>

Initialize#

From the program's IDL:

Creates the global state.

Discriminator afaf6d1f0d989bed · data Initialize · accounts InitializeInstructionAccounts.

No data fields.

Required accounts: 3; extras go to remaining.

Fields of InitializeInstructionAccounts, in account order:

#FieldType
0globalPubkey
1userPubkey
2system_programPubkey
3…remainingVec<AccountMeta>

InitUserVolumeAccumulator#

Discriminator 5e06ca73ff60e8b7 · data InitUserVolumeAccumulator · accounts InitUserVolumeAccumulatorInstructionAccounts.

No data fields.

Required accounts: 6; extras go to remaining.

Fields of InitUserVolumeAccumulatorInstructionAccounts, in account order:

#FieldType
0payerPubkey
1userPubkey
2user_volume_accumulatorPubkey
3system_programPubkey
4event_authorityPubkey
5programPubkey
6…remainingVec<AccountMeta>

Migrate#

From the program's IDL:

Migrates liquidity to pump_amm if the bonding curve is complete

Discriminator 9beae792ec9ea21e · data Migrate · accounts MigrateInstructionAccounts.

No data fields.

Required accounts: 25; extras go to remaining.

Fields of MigrateInstructionAccounts, in account order:

#FieldType
0globalPubkey
1withdraw_authorityPubkey
2mintPubkey
3bonding_curvePubkey
4associated_bonding_curvePubkey
5userPubkey
6system_programPubkey
7token_programPubkey
8pump_ammPubkey
9poolPubkey
10pool_authorityPubkey
11pool_authority_mint_accountPubkey
12pool_authority_wsol_accountPubkey
13amm_global_configPubkey
14wsol_mintPubkey
15lp_mintPubkey
16user_pool_token_accountPubkey
17pool_base_token_accountPubkey
18pool_quote_token_accountPubkey
19token2022_programPubkey
20associated_token_programPubkey
21pump_amm_event_authorityPubkey
22event_authorityPubkey
23programPubkey
24rentPubkey
25…remainingVec<AccountMeta>

MigrateBondingCurveCreator#

Discriminator 577c34bf3426d6e8 · data MigrateBondingCurveCreator · accounts MigrateBondingCurveCreatorInstructionAccounts.

No data fields.

Required accounts: 5; extras go to remaining.

Fields of MigrateBondingCurveCreatorInstructionAccounts, in account order:

#FieldType
0mintPubkey
1bonding_curvePubkey
2sharing_configPubkey
3event_authorityPubkey
4programPubkey
5…remainingVec<AccountMeta>

MigrateV2#

From the program's IDL:

Migrates liquidity to pump_amm if the bonding curve is complete

Discriminator bbcb121fceedfe29 · data MigrateV2 · accounts MigrateV2InstructionAccounts.

No data fields.

Required accounts: 27; extras go to remaining.

Fields of MigrateV2InstructionAccounts, in account order:

#FieldType
0globalPubkey
1withdraw_authorityPubkey
2base_mintPubkey
3quote_mintPubkey
4bonding_curvePubkey
5associated_base_bonding_curvePubkey
6associated_quote_bonding_curvePubkey
7userPubkey
8system_programPubkey
9pump_ammPubkey
10poolPubkey
11pool_authorityPubkey
12pool_authority_mint_accountPubkey
13pool_authority_quote_accountPubkey
14amm_global_configPubkey
15lp_mintPubkey
16user_pool_token_accountPubkey
17pool_base_token_accountPubkey
18pool_quote_token_accountPubkey
19base_token_programPubkey
20quote_token_programPubkey
21token2022_programPubkey
22associated_token_programPubkey
23pump_amm_event_authorityPubkey
24rentPubkey
25event_authorityPubkey
26programPubkey
27…remainingVec<AccountMeta>

RemoveQuoteMint#

Discriminator b141df2658d19e9b · data RemoveQuoteMint · accounts RemoveQuoteMintInstructionAccounts.

FieldType
quote_mintPubkey

Required accounts: 4; extras go to remaining.

Fields of RemoveQuoteMintInstructionAccounts, in account order:

#FieldType
0globalPubkey
1authorityPubkey
2event_authorityPubkey
3programPubkey
4…remainingVec<AccountMeta>

Sell#

From the program's IDL:

Sells tokens into a bonding curve.
For cashback coins, pass as remaining_accounts: [0] user_volume_accumulator,
[1] bonding_curve_v2. If provided and valid, creator_fee goes to user_volume_accumulator. Otherwise, falls back to transferring creator_fee to creator_vault.

Discriminator 33e685a4017f83ad · data Sell · accounts SellInstructionAccounts.

FieldType
amountu64
min_sol_outputu64

Required accounts: 14; extras go to remaining.

Fields of SellInstructionAccounts, in account order:

#FieldType
0globalPubkey
1fee_recipientPubkey
2mintPubkey
3bonding_curvePubkey
4associated_bonding_curvePubkey
5associated_userPubkey
6userPubkey
7system_programPubkey
8creator_vaultPubkey
9token_programPubkey
10event_authorityPubkey
11programPubkey
12fee_configPubkey
13fee_programPubkey
14…remainingVec<AccountMeta>

SellV2#

Discriminator 5df6823ce7e940b2 · data SellV2 · accounts SellV2InstructionAccounts.

FieldType
amountu64
min_sol_outputu64

Required accounts: 26; extras go to remaining.

Fields of SellV2InstructionAccounts, in account order:

#FieldType
0globalPubkey
1base_mintPubkey
2quote_mintPubkey
3base_token_programPubkey
4quote_token_programPubkey
5associated_token_programPubkey
6fee_recipientPubkey
7associated_quote_fee_recipientPubkey
8buyback_fee_recipientPubkey
9associated_quote_buyback_fee_recipientPubkey
10bonding_curvePubkey
11associated_base_bonding_curvePubkey
12associated_quote_bonding_curvePubkey
13userPubkey
14associated_base_userPubkey
15associated_quote_userPubkey
16creator_vaultPubkey
17associated_creator_vaultPubkey
18sharing_configPubkey
19user_volume_accumulatorPubkey
20associated_user_volume_accumulatorPubkey
21fee_configPubkey
22fee_programPubkey
23system_programPubkey
24event_authorityPubkey
25programPubkey
26…remainingVec<AccountMeta>

SetCreator#

From the program's IDL:

Allows Global::set_creator_authority to set the bonding curve creator from
Metaplex metadata or input argument

Discriminator fe94ff70cf8eaaa5 · data SetCreator · accounts SetCreatorInstructionAccounts.

FieldType
creatorPubkey

Required accounts: 7; extras go to remaining.

Fields of SetCreatorInstructionAccounts, in account order:

#FieldType
0set_creator_authorityPubkey
1globalPubkey
2mintPubkey
3metadataPubkey
4bonding_curvePubkey
5event_authorityPubkey
6programPubkey
7…remainingVec<AccountMeta>

SetMayhemVirtualParams#

Discriminator 3da9bcbf99952a61 · data SetMayhemVirtualParams · accounts SetMayhemVirtualParamsInstructionAccounts.

No data fields.

Required accounts: 8; extras go to remaining.

Fields of SetMayhemVirtualParamsInstructionAccounts, in account order:

#FieldType
0sol_vault_authorityPubkey
1mayhem_token_vaultPubkey
2mintPubkey
3globalPubkey
4bonding_curvePubkey
5token_programPubkey
6event_authorityPubkey
7programPubkey
8…remainingVec<AccountMeta>

SetMetaplexCreator#

From the program's IDL:

Syncs the bonding curve creator with the Metaplex metadata creator if it exists

Discriminator 8a60aed93055c5f6 · data SetMetaplexCreator · accounts SetMetaplexCreatorInstructionAccounts.

No data fields.

Required accounts: 5; extras go to remaining.

Fields of SetMetaplexCreatorInstructionAccounts, in account order:

#FieldType
0mintPubkey
1metadataPubkey
2bonding_curvePubkey
3event_authorityPubkey
4programPubkey
5…remainingVec<AccountMeta>

SetParams#

From the program's IDL:

Sets the global state parameters.

Discriminator 1beab2349302bb8d · data SetParams · accounts SetParamsInstructionAccounts.

FieldType
initial_virtual_token_reservesu64
initial_virtual_sol_reservesu64
initial_real_token_reservesu64
token_total_supplyu64
fee_basis_pointsu64
withdraw_authorityPubkey
enable_migratebool
pool_migration_feeu64
creator_fee_basis_pointsu64
set_creator_authorityPubkey
admin_set_creator_authorityPubkey

Required accounts: 4; extras go to remaining.

Fields of SetParamsInstructionAccounts, in account order:

#FieldType
0globalPubkey
1authorityPubkey
2event_authorityPubkey
3programPubkey
4…remainingVec<AccountMeta>

SetReservedFeeRecipients#

Discriminator 6faca2e87259d58e · data SetReservedFeeRecipients · accounts SetReservedFeeRecipientsInstructionAccounts.

FieldType
whitelist_pdaPubkey

Required accounts: 4; extras go to remaining.

Fields of SetReservedFeeRecipientsInstructionAccounts, in account order:

#FieldType
0globalPubkey
1authorityPubkey
2event_authorityPubkey
3programPubkey
4…remainingVec<AccountMeta>

SetVirtualQuoteReserves#

Discriminator 6587bf6809581460 · data SetVirtualQuoteReserves · accounts SetVirtualQuoteReservesInstructionAccounts.

FieldType
initial_virtual_quote_reservesu64

Required accounts: 4; extras go to remaining.

Fields of SetVirtualQuoteReservesInstructionAccounts, in account order:

#FieldType
0globalPubkey
1authorityPubkey
2event_authorityPubkey
3programPubkey
4…remainingVec<AccountMeta>

SyncUserVolumeAccumulator#

Discriminator 561fc057a3574fee · data SyncUserVolumeAccumulator · accounts SyncUserVolumeAccumulatorInstructionAccounts.

No data fields.

Required accounts: 5; extras go to remaining.

Fields of SyncUserVolumeAccumulatorInstructionAccounts, in account order:

#FieldType
0userPubkey
1global_volume_accumulatorPubkey
2user_volume_accumulatorPubkey
3event_authorityPubkey
4programPubkey
5…remainingVec<AccountMeta>

ToggleCashbackEnabled#

Discriminator 7367e0ffbd5956c3 · data ToggleCashbackEnabled · accounts ToggleCashbackEnabledInstructionAccounts.

FieldType
enabledbool

Required accounts: 4; extras go to remaining.

Fields of ToggleCashbackEnabledInstructionAccounts, in account order:

#FieldType
0globalPubkey
1authorityPubkey
2event_authorityPubkey
3programPubkey
4…remainingVec<AccountMeta>

ToggleCreateV2#

Discriminator 1cffe6f0ac6bcbab · data ToggleCreateV2 · accounts ToggleCreateV2InstructionAccounts.

FieldType
enabledbool

Required accounts: 4; extras go to remaining.

Fields of ToggleCreateV2InstructionAccounts, in account order:

#FieldType
0globalPubkey
1authorityPubkey
2event_authorityPubkey
3programPubkey
4…remainingVec<AccountMeta>

ToggleMayhemMode#

Discriminator 01096fd0641fffa3 · data ToggleMayhemMode · accounts ToggleMayhemModeInstructionAccounts.

FieldType
enabledbool

Required accounts: 4; extras go to remaining.

Fields of ToggleMayhemModeInstructionAccounts, in account order:

#FieldType
0globalPubkey
1authorityPubkey
2event_authorityPubkey
3programPubkey
4…remainingVec<AccountMeta>

UpdateBuybackConfig#

Discriminator fbe0ab92a01a71e9 · data UpdateBuybackConfig · accounts UpdateBuybackConfigInstructionAccounts.

FieldType
buyback_basis_pointsOption<u64>

Required accounts: 4; extras go to remaining.

Fields of UpdateBuybackConfigInstructionAccounts, in account order:

#FieldType
0globalPubkey
1authorityPubkey
2event_authorityPubkey
3programPubkey
4…remainingVec<AccountMeta>

UpdateGlobalAuthority#

Discriminator e3b54ac4d01561d5 · data UpdateGlobalAuthority · accounts UpdateGlobalAuthorityInstructionAccounts.

No data fields.

Required accounts: 5; extras go to remaining.

Fields of UpdateGlobalAuthorityInstructionAccounts, in account order:

#FieldType
0globalPubkey
1authorityPubkey
2new_authorityPubkey
3event_authorityPubkey
4programPubkey
5…remainingVec<AccountMeta>

CpiEvent#

Anchor self-CPI that carries one of the program's events. data is the CpiEvent enum.

Discriminator e445a52e51cb9a1d · data CpiEvent · accounts CpiEventInstructionAccounts.

Required accounts: 2; extras go to remaining.

Fields of CpiEventInstructionAccounts, in account order:

#FieldType
0programPubkey
1event_authorityPubkey
2…remainingVec<AccountMeta>

Accounts#

Variants of PumpfunAccount. Each wraps a boxed struct from carbon_pumpfun_decoder::accounts::<module>. decode_account only considers accounts owned by PROGRAM_ID and returns the first variant that matches.

BondingCurve#

Discriminator 17b7f83760d8ac60 · accounts::bonding_curve::BondingCurve.

FieldType
virtual_token_reservesu64
virtual_quote_reservesu64
real_token_reservesu64
real_quote_reservesu64
token_total_supplyu64
completebool
creatorPubkey
is_mayhem_modebool
is_cashback_coinbool
quote_mintPubkey

FeeConfig#

Discriminator 8f3492bbdb7b4c9b · accounts::fee_config::FeeConfig.

FieldType
bumpu8
adminPubkey
flat_feesFees
fee_tiersVec<FeeTier>
stable_fee_tiersVec<FeeTier>

Global#

Discriminator a7e8e8b1c86c727f · accounts::global::Global.

FieldTypeDescription
initializedboolUnused
authorityPubkey
fee_recipientPubkey
initial_virtual_token_reservesu64
initial_virtual_sol_reservesu64
initial_real_token_reservesu64
token_total_supplyu64
fee_basis_pointsu64
withdraw_authorityPubkey
enable_migrateboolUnused
pool_migration_feeu64
creator_fee_basis_pointsu64
fee_recipients[Pubkey; 7]
set_creator_authorityPubkey
admin_set_creator_authorityPubkey
create_v2_enabledbool
whitelist_pdaPubkey
reserved_fee_recipientPubkey
mayhem_mode_enabledbool
reserved_fee_recipients[Pubkey; 7]
is_cashback_enabledbool
buyback_fee_recipients[Pubkey; 8]
buyback_basis_pointsu64
initial_virtual_quote_reservesu64
whitelisted_quote_mints[Pubkey; 1]

GlobalVolumeAccumulator#

Discriminator ca2af62b8ebe1eff · accounts::global_volume_accumulator::GlobalVolumeAccumulator.

FieldType
start_timei64
end_timei64
seconds_in_a_dayi64
mintPubkey
total_token_supply[u64; 30]
sol_volumes[u64; 30]

SharingConfig#

Discriminator d84a0900388c5d4b · accounts::sharing_config::SharingConfig.

FieldType
bumpu8
versionu8
statusConfigStatus
mintPubkey
adminPubkey
admin_revokedbool
shareholdersVec<Shareholder>

UserVolumeAccumulator#

Discriminator 56ff700e66359afa · accounts::user_volume_accumulator::UserVolumeAccumulator.

FieldType
userPubkey
needs_claimbool
total_unclaimed_tokensu64
total_claimed_tokensu64
current_sol_volumeu64
last_update_timestampi64
has_total_claimed_tokensbool
cashback_earnedu64
total_cashback_claimedu64

Events#

Variants of instructions::CpiEvent, decoded from the CpiEvent instruction. Each wraps a struct from carbon_pumpfun_decoder::events::<module>. The discriminator is the 8-byte event discriminator that follows the e445a52e51cb9a1d CPI-event tag.

AdminSetCreatorEvent#

Discriminator 4045c0681d1e196b · events::admin_set_creator_event::AdminSetCreatorEventEvent.

FieldType
timestampi64
admin_set_creator_authorityPubkey
mintPubkey
bonding_curvePubkey
old_creatorPubkey
new_creatorPubkey

AdminSetIdlAuthorityEvent#

Discriminator f53b46224bb96d5c · events::admin_set_idl_authority_event::AdminSetIdlAuthorityEventEvent.

FieldType
idl_authorityPubkey

AdminUpdateTokenIncentivesEvent#

Discriminator 93fa6c78f71d43de · events::admin_update_token_incentives_event::AdminUpdateTokenIncentivesEventEvent.

FieldType
start_timei64
end_timei64
day_numberu64
token_supply_per_dayu64
mintPubkey
seconds_in_a_dayi64
timestampi64

ClaimCashbackEvent#

Discriminator e2d6f62107f293e5 · events::claim_cashback_event::ClaimCashbackEventEvent.

FieldType
userPubkey
amountu64
timestampi64
total_claimedu64
total_cashback_earnedu64

ClaimTokenIncentivesEvent#

Discriminator 4facf631cd5bcee8 · events::claim_token_incentives_event::ClaimTokenIncentivesEventEvent.

FieldType
userPubkey
mintPubkey
amountu64
timestampi64
total_claimed_tokensu64
current_sol_volumeu64

CloseUserVolumeAccumulatorEvent#

Discriminator 929fbdac925838f4 · events::close_user_volume_accumulator_event::CloseUserVolumeAccumulatorEventEvent.

FieldType
userPubkey
timestampi64
total_unclaimed_tokensu64
total_claimed_tokensu64
current_sol_volumeu64
last_update_timestampi64

CollectCreatorFeeEvent#

Discriminator 7a027f010ebf0caf · events::collect_creator_fee_event::CollectCreatorFeeEventEvent.

FieldType
timestampi64
creatorPubkey
creator_feeu64

CompleteEvent#

Discriminator 5f72619cd42e9808 · events::complete_event::CompleteEventEvent.

FieldType
userPubkey
mintPubkey
bonding_curvePubkey
timestampi64
quote_mintPubkey

CompletePumpAmmMigrationEvent#

Discriminator bde95db95c94ea94 · events::complete_pump_amm_migration_event::CompletePumpAmmMigrationEventEvent.

FieldType
userPubkey
mintPubkey
mint_amountu64
sol_amountu64
pool_migration_feeu64
bonding_curvePubkey
timestampi64
poolPubkey

CreateEvent#

Discriminator 1b72a94ddeeb6376 · events::create_event::CreateEventEvent.

FieldType
nameString
symbolString
uriString
mintPubkey
bonding_curvePubkey
userPubkey
creatorPubkey
timestampi64
virtual_token_reservesu64
virtual_sol_reservesu64
real_token_reservesu64
token_total_supplyu64
token_programPubkey
is_mayhem_modebool
is_cashback_enabledbool
quote_mintPubkey
virtual_quote_reservesu64

DistributeCreatorFeesEvent#

Discriminator a537817004b3ca28 · events::distribute_creator_fees_event::DistributeCreatorFeesEventEvent.

FieldType
timestampi64
mintPubkey
bonding_curvePubkey
sharing_configPubkey
adminPubkey
shareholdersVec<Shareholder>
distributedu64

ExtendAccountEvent#

Discriminator 6161d7905d92167c · events::extend_account_event::ExtendAccountEventEvent.

FieldType
accountPubkey
userPubkey
current_sizeu64
new_sizeu64
timestampi64

InitUserVolumeAccumulatorEvent#

Discriminator 86240d48e86582d8 · events::init_user_volume_accumulator_event::InitUserVolumeAccumulatorEventEvent.

FieldType
payerPubkey
userPubkey
timestampi64

MigrateBondingCurveCreatorEvent#

Discriminator 9ba768dcd56cf303 · events::migrate_bonding_curve_creator_event::MigrateBondingCurveCreatorEventEvent.

FieldType
timestampi64
mintPubkey
bonding_curvePubkey
sharing_configPubkey
old_creatorPubkey
new_creatorPubkey

MinimumDistributableFeeEvent#

Discriminator a8d884efebb63134 · events::minimum_distributable_fee_event::MinimumDistributableFeeEventEvent.

FieldType
minimum_requiredu64
distributable_feesu64
can_distributebool

ReservedFeeRecipientsEvent#

Discriminator 2bbcfa12dd4bbb5f · events::reserved_fee_recipients_event::ReservedFeeRecipientsEventEvent.

FieldType
timestampi64
reserved_fee_recipientPubkey
reserved_fee_recipients[Pubkey; 7]

SetCreatorEvent#

Discriminator ed347b25f5fb48d2 · events::set_creator_event::SetCreatorEventEvent.

FieldType
timestampi64
mintPubkey
bonding_curvePubkey
creatorPubkey

SetMetaplexCreatorEvent#

Discriminator 8ecb06207f69bfa2 · events::set_metaplex_creator_event::SetMetaplexCreatorEventEvent.

FieldType
timestampi64
mintPubkey
bonding_curvePubkey
metadataPubkey
creatorPubkey

SetParamsEvent#

Discriminator dfc39ff63e308f83 · events::set_params_event::SetParamsEventEvent.

FieldType
initial_virtual_token_reservesu64
initial_virtual_sol_reservesu64
initial_real_token_reservesu64
final_real_sol_reservesu64
token_total_supplyu64
fee_basis_pointsu64
withdraw_authorityPubkey
enable_migratebool
pool_migration_feeu64
creator_fee_basis_pointsu64
fee_recipients[Pubkey; 8]
timestampi64
set_creator_authorityPubkey
admin_set_creator_authorityPubkey

SyncUserVolumeAccumulatorEvent#

Discriminator c57aa77c74515bff · events::sync_user_volume_accumulator_event::SyncUserVolumeAccumulatorEventEvent.

FieldType
userPubkey
total_claimed_tokens_beforeu64
total_claimed_tokens_afteru64
timestampi64

TradeEvent#

Discriminator bddb7fd34ee661ee · events::trade_event::TradeEventEvent.

FieldType
mintPubkey
sol_amountu64
token_amountu64
is_buybool
userPubkey
timestampi64
virtual_sol_reservesu64
virtual_token_reservesu64
real_sol_reservesu64
real_token_reservesu64
fee_recipientPubkey
fee_basis_pointsu64
feeu64
creatorPubkey
creator_fee_basis_pointsu64
creator_feeu64
track_volumebool
total_unclaimed_tokensu64
total_claimed_tokensu64
current_sol_volumeu64
last_update_timestampi64
ix_nameString
mayhem_modebool
cashback_fee_basis_pointsu64
cashbacku64
buyback_fee_basis_pointsu64
buyback_feeu64
shareholdersVec<Shareholder>
quote_mintPubkey
quote_amountu64
virtual_quote_reservesu64
real_quote_reservesu64

UpdateGlobalAuthorityEvent#

Discriminator b6c3892a23cecff7 · events::update_global_authority_event::UpdateGlobalAuthorityEventEvent.

FieldType
globalPubkey
authorityPubkey
new_authorityPubkey
timestampi64

UpdateMayhemVirtualParamsEvent#

Discriminator 757be4b6a1a8dcd6 · events::update_mayhem_virtual_params_event::UpdateMayhemVirtualParamsEventEvent.

FieldType
timestampi64
mintPubkey
virtual_token_reservesu64
virtual_sol_reservesu64
new_virtual_token_reservesu64
new_virtual_sol_reservesu64
real_token_reservesu64
real_sol_reservesu64

Types#

Types used by the instructions, accounts and events above, exported from carbon_pumpfun_decoder::types.

AdminSetCreatorEvent#

Struct types::AdminSetCreatorEvent. Same fields as the AdminSetCreatorEvent event.

AdminSetIdlAuthorityEvent#

Struct types::AdminSetIdlAuthorityEvent. Same fields as the AdminSetIdlAuthorityEvent event.

AdminUpdateTokenIncentivesEvent#

Struct types::AdminUpdateTokenIncentivesEvent. Same fields as the AdminUpdateTokenIncentivesEvent event.

ClaimCashbackEvent#

Struct types::ClaimCashbackEvent. Same fields as the ClaimCashbackEvent event.

ClaimTokenIncentivesEvent#

Struct types::ClaimTokenIncentivesEvent. Same fields as the ClaimTokenIncentivesEvent event.

CloseUserVolumeAccumulatorEvent#

Struct types::CloseUserVolumeAccumulatorEvent. Same fields as the CloseUserVolumeAccumulatorEvent event.

CollectCreatorFeeEvent#

Struct types::CollectCreatorFeeEvent. Same fields as the CollectCreatorFeeEvent event.

CompleteEvent#

Struct types::CompleteEvent. Same fields as the CompleteEvent event.

CompletePumpAmmMigrationEvent#

Struct types::CompletePumpAmmMigrationEvent. Same fields as the CompletePumpAmmMigrationEvent event.

ConfigStatus#

Enum types::ConfigStatus.

Variant
Paused
Active

CreateEvent#

Struct types::CreateEvent. Same fields as the CreateEvent event.

DistributeCreatorFeesEvent#

Struct types::DistributeCreatorFeesEvent. Same fields as the DistributeCreatorFeesEvent event.

ExtendAccountEvent#

Struct types::ExtendAccountEvent. Same fields as the ExtendAccountEvent event.

Fees#

Struct types::Fees.

FieldType
lp_fee_bpsu64
protocol_fee_bpsu64
creator_fee_bpsu64

FeeTier#

Struct types::FeeTier.

FieldType
market_cap_lamports_thresholdu128
feesFees

InitUserVolumeAccumulatorEvent#

Struct types::InitUserVolumeAccumulatorEvent. Same fields as the InitUserVolumeAccumulatorEvent event.

MigrateBondingCurveCreatorEvent#

Struct types::MigrateBondingCurveCreatorEvent. Same fields as the MigrateBondingCurveCreatorEvent event.

MinimumDistributableFeeEvent#

Struct types::MinimumDistributableFeeEvent. Same fields as the MinimumDistributableFeeEvent event.

OptionBool#

Tuple struct types::OptionBool (bool).

ReservedFeeRecipientsEvent#

Struct types::ReservedFeeRecipientsEvent. Same fields as the ReservedFeeRecipientsEvent event.

SetCreatorEvent#

Struct types::SetCreatorEvent. Same fields as the SetCreatorEvent event.

SetMetaplexCreatorEvent#

Struct types::SetMetaplexCreatorEvent. Same fields as the SetMetaplexCreatorEvent event.

SetParamsEvent#

Struct types::SetParamsEvent. Same fields as the SetParamsEvent event.

Shareholder#

Struct types::Shareholder.

FieldType
addressPubkey
share_bpsu16

SyncUserVolumeAccumulatorEvent#

Struct types::SyncUserVolumeAccumulatorEvent. Same fields as the SyncUserVolumeAccumulatorEvent event.

TradeEvent#

From the program's IDL:

ix_name: "buy" | "sell" | "buy_exact_sol_in"

Struct types::TradeEvent. Same fields as the TradeEvent event.

UpdateGlobalAuthorityEvent#

Struct types::UpdateGlobalAuthorityEvent. Same fields as the UpdateGlobalAuthorityEvent event.

UpdateMayhemVirtualParamsEvent#

Struct types::UpdateMayhemVirtualParamsEvent. Same fields as the UpdateMayhemVirtualParamsEvent event.

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.