Boop decoder

Decode Boop instructions, accounts and events in Rust with carbon-boop-decoder 2.0.0. Program ID boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4.

On this page

carbon-boop-decoder decodes the instructions, accounts and events of the Boop program (boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4): 29 instructions, 4 account types, 25 events. It is generated with Codama from the program's IDL; see decoders for how decoders plug into a pipeline.

Cratecarbon-boop-decoder 2.0.0
Installcargo add carbon-boop-decoder@2.0.0
Program IDboop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4 (carbon_boop_decoder::PROGRAM_ID)
CategoryLaunchpads
Decodercarbon_boop_decoder::BoopDecoder
Instruction enuminstructions::BoopInstruction
Account enumaccounts::BoopAccount
Event enuminstructions::CpiEvent
Featuresserde, postgres, graphql (none enabled by default)
API docsdocs.rs/carbon-boop-decoder/2.0.0
Sourcedecoders/boop-decoder

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

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 Boop transactions from the public RPC and prints every decoded BuyToken instruction. Add the dependencies:

Terminal
cargo add carbon-core@2.0.0 carbon-boop-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_boop_decoder::{instructions::BoopInstruction, BoopDecoder, 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(BoopDecoder, InstructionLogger)
        .build()?
        .run()
        .await
}

struct InstructionLogger;

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

Each BuyToken instruction prints one line with the transaction signature and the decoded BuyToken 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 BoopInstruction::CpiEvent { data: CpiEvent::AuthorityTransferCancelledEvent(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_boop_decoder::{accounts::BoopAccount, BoopDecoder, 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(BoopDecoder, AccountLogger)
        .build()?
        .run()
        .await
}

struct AccountLogger;

impl Processor<AccountProcessorInputType<'_, BoopAccount>> for AccountLogger {
    async fn process(
        &mut self,
        input: &AccountProcessorInputType<'_, BoopAccount>,
    ) -> CarbonResult<()> {
        if let BoopAccount::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 BoopInstruction. Each is BoopInstruction::<Variant> { program_id, data, accounts }, where data and accounts are the types listed under the variant, exported from carbon_boop_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 boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4.
  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.

AddOperators#

Discriminator a5c73ed651360496 · data AddOperators · accounts AddOperatorsInstructionAccounts.

FieldType
operatorsVec<Pubkey>

Required accounts: 3; extras go to remaining.

Fields of AddOperatorsInstructionAccounts, in account order:

#FieldType
0configPubkey
1authorityPubkey
2system_programPubkey
3…remainingVec<AccountMeta>

BuyToken#

Discriminator 8a7f0e5b26577369 · data BuyToken · accounts BuyTokenInstructionAccounts.

FieldType
buy_amountu64
amount_out_minu64

Required accounts: 13; extras go to remaining.

Fields of BuyTokenInstructionAccounts, in account order:

#FieldType
0mintPubkey
1bonding_curvePubkey
2trading_fees_vaultPubkey
3bonding_curve_vaultPubkey
4bonding_curve_sol_vaultPubkey
5recipient_token_accountPubkey
6buyerPubkey
7configPubkey
8vault_authorityPubkey
9wsolPubkey
10system_programPubkey
11token_programPubkey
12associated_token_programPubkey
13…remainingVec<AccountMeta>

CancelAuthorityTransfer#

Discriminator 5e837db8b7187de5 · data CancelAuthorityTransfer · accounts CancelAuthorityTransferInstructionAccounts.

No data fields.

Required accounts: 3; extras go to remaining.

Fields of CancelAuthorityTransferInstructionAccounts, in account order:

#FieldType
0authorityPubkey
1configPubkey
2system_programPubkey
3…remainingVec<AccountMeta>

CloseBondingCurveVault#

Discriminator bd47bdef71423bbd · data CloseBondingCurveVault · accounts CloseBondingCurveVaultInstructionAccounts.

No data fields.

Required accounts: 12; extras go to remaining.

Fields of CloseBondingCurveVaultInstructionAccounts, in account order:

#FieldType
0configPubkey
1operatorPubkey
2vault_authorityPubkey
3bonding_curvePubkey
4bonding_curve_vaultPubkey
5mintPubkey
6recipient_token_accountPubkey
7recipientPubkey
8token_programPubkey
9system_programPubkey
10associated_token_programPubkey
11rentPubkey
12…remainingVec<AccountMeta>

CollectMeteoraTradingFees#

Discriminator f95f7e5b51a253fa · data CollectMeteoraTradingFees · accounts CollectMeteoraTradingFeesInstructionAccounts.

No data fields.

Required accounts: 18; extras go to remaining.

Fields of CollectMeteoraTradingFeesInstructionAccounts, in account order:

#FieldType
0operatorPubkey
1protocol_fee_recipientPubkey
2configPubkey
3pool_authorityPubkey
4poolPubkey
5positionPubkey
6token_a_accountPubkey
7token_b_accountPubkey
8token_a_vaultPubkey
9token_b_vaultPubkey
10token_a_mintPubkey
11token_b_mintPubkey
12position_nft_accountPubkey
13vault_authorityPubkey
14token_programPubkey
15associated_token_programPubkey
16event_authorityPubkey
17cp_amm_programPubkey
18…remainingVec<AccountMeta>

CollectMeteoraTradingFeesV2#

Discriminator 60276d2e05a10f39 · data CollectMeteoraTradingFeesV2 · accounts CollectMeteoraTradingFeesV2InstructionAccounts.

No data fields.

Required accounts: 19; extras go to remaining.

Fields of CollectMeteoraTradingFeesV2InstructionAccounts, in account order:

#FieldType
0operatorPubkey
1protocol_fee_recipientPubkey
2configPubkey
3pool_authorityPubkey
4poolPubkey
5positionPubkey
6token_a_accountPubkey
7token_b_accountPubkey
8token_a_vaultPubkey
9token_b_vaultPubkey
10token_a_mintPubkey
11token_b_mintPubkey
12position_nft_accountPubkey
13vault_authorityPubkey
14token_programPubkey
15associated_token_programPubkey
16event_authorityPubkey
17cp_amm_programPubkey
18system_programPubkey
19…remainingVec<AccountMeta>

CollectTradingFees#

Discriminator bd26cdea514d1901 · data CollectTradingFees · accounts CollectTradingFeesInstructionAccounts.

No data fields.

Required accounts: 24; extras go to remaining.

Fields of CollectTradingFeesInstructionAccounts, in account order:

#FieldType
0operatorPubkey
1protocol_fee_recipientPubkey
2configPubkey
3lock_programPubkey
4vault_authorityPubkey
5authorityPubkey
6fee_nft_accountPubkey
7locked_liquidityPubkey
8cpmm_programPubkey
9cp_authorityPubkey
10pool_statePubkey
11lp_mintPubkey
12recipient_token0_accountPubkey
13recipient_token1_accountPubkey
14token0_vaultPubkey
15token1_vaultPubkey
16vault0_mintPubkey
17vault1_mintPubkey
18locked_lp_vaultPubkey
19system_programPubkey
20associated_token_programPubkey
21token_programPubkey
22token_program2022Pubkey
23memo_programPubkey
24…remainingVec<AccountMeta>

CollectTradingFeesV2#

Discriminator b48aa09bf358a807 · data CollectTradingFeesV2 · accounts CollectTradingFeesV2InstructionAccounts.

No data fields.

Required accounts: 24; extras go to remaining.

Fields of CollectTradingFeesV2InstructionAccounts, in account order:

#FieldType
0operatorPubkey
1protocol_fee_recipientPubkey
2configPubkey
3lock_programPubkey
4vault_authorityPubkey
5authorityPubkey
6fee_nft_accountPubkey
7locked_liquidityPubkey
8cpmm_programPubkey
9cp_authorityPubkey
10pool_statePubkey
11lp_mintPubkey
12recipient_token0_accountPubkey
13recipient_token1_accountPubkey
14token0_vaultPubkey
15token1_vaultPubkey
16vault0_mintPubkey
17vault1_mintPubkey
18locked_lp_vaultPubkey
19system_programPubkey
20associated_token_programPubkey
21token_programPubkey
22token_program2022Pubkey
23memo_programPubkey
24…remainingVec<AccountMeta>

CompleteAuthorityTransfer#

Discriminator 51e95b84af1f978d · data CompleteAuthorityTransfer · accounts CompleteAuthorityTransferInstructionAccounts.

No data fields.

Required accounts: 3; extras go to remaining.

Fields of CompleteAuthorityTransferInstructionAccounts, in account order:

#FieldType
0pending_authorityPubkey
1configPubkey
2system_programPubkey
3…remainingVec<AccountMeta>

CreateMeteoraPool#

Discriminator f6fe2125e1b029e8 · data CreateMeteoraPool · accounts CreateMeteoraPoolInstructionAccounts.

No data fields.

Required accounts: 21; extras go to remaining.

Fields of CreateMeteoraPoolInstructionAccounts, in account order:

#FieldType
0operatorPubkey
1configPubkey
2vault_authorityPubkey
3cp_amm_configPubkey
4pool_authorityPubkey
5poolPubkey
6positionPubkey
7position_nft_mintPubkey
8position_nft_accountPubkey
9token_a_mintPubkey
10token_b_mintPubkey
11token_a_vaultPubkey
12token_b_vaultPubkey
13bonding_curvePubkey
14bonding_curve_vaultPubkey
15bonding_curve_wsol_vaultPubkey
16token_programPubkey
17token2022_programPubkey
18system_programPubkey
19event_authorityPubkey
20cp_amm_programPubkey
21…remainingVec<AccountMeta>

CreateRaydiumPool#

Discriminator 412d774dccb25402 · data CreateRaydiumPool · accounts CreateRaydiumPoolInstructionAccounts.

No data fields.

Required accounts: 22; extras go to remaining.

Fields of CreateRaydiumPoolInstructionAccounts, in account order:

#FieldType
0cpmm_programPubkey
1amm_configPubkey
2authorityPubkey
3pool_statePubkey
4token0_mintPubkey
5token1_mintPubkey
6lp_mintPubkey
7vault_authorityPubkey
8bonding_curvePubkey
9bonding_curve_vaultPubkey
10bonding_curve_wsol_vaultPubkey
11creator_lp_tokenPubkey
12token0_vaultPubkey
13token1_vaultPubkey
14create_pool_feePubkey
15observation_statePubkey
16operatorPubkey
17configPubkey
18token_programPubkey
19associated_token_programPubkey
20system_programPubkey
21rentPubkey
22…remainingVec<AccountMeta>

CreateRaydiumRandomPool#

Discriminator 4e2cad1d84b404ac · data CreateRaydiumRandomPool · accounts CreateRaydiumRandomPoolInstructionAccounts.

No data fields.

Required accounts: 22; extras go to remaining.

Fields of CreateRaydiumRandomPoolInstructionAccounts, in account order:

#FieldType
0cpmm_programPubkey
1amm_configPubkey
2authorityPubkey
3pool_statePubkey
4token0_mintPubkey
5token1_mintPubkey
6lp_mintPubkey
7vault_authorityPubkey
8bonding_curvePubkey
9bonding_curve_vaultPubkey
10bonding_curve_wsol_vaultPubkey
11creator_lp_tokenPubkey
12token0_vaultPubkey
13token1_vaultPubkey
14create_pool_feePubkey
15observation_statePubkey
16operatorPubkey
17configPubkey
18token_programPubkey
19associated_token_programPubkey
20system_programPubkey
21rentPubkey
22…remainingVec<AccountMeta>

CreateToken#

Discriminator 5434cce4188cea4b · data CreateToken · accounts CreateTokenInstructionAccounts.

FieldType
saltu64
nameString
symbolString
uriString

Required accounts: 8; extras go to remaining.

Fields of CreateTokenInstructionAccounts, in account order:

#FieldType
0configPubkey
1metadataPubkey
2mintPubkey
3payerPubkey
4rentPubkey
5system_programPubkey
6token_programPubkey
7token_metadata_programPubkey
8…remainingVec<AccountMeta>

CreateTokenFallback#

Discriminator fdb87ec7ebe8aca2 · data CreateTokenFallback · accounts CreateTokenFallbackInstructionAccounts.

FieldType
saltu64
nameString
symbolString
uriString

Required accounts: 8; extras go to remaining.

Fields of CreateTokenFallbackInstructionAccounts, in account order:

#FieldType
0configPubkey
1metadataPubkey
2mintPubkey
3payerPubkey
4rentPubkey
5system_programPubkey
6token_programPubkey
7token_metadata_programPubkey
8…remainingVec<AccountMeta>

DeployBondingCurve#

Discriminator b459c74ca8ecd98a · data DeployBondingCurve · accounts DeployBondingCurveInstructionAccounts.

FieldType
creatorPubkey
saltu64

Required accounts: 10; extras go to remaining.

Fields of DeployBondingCurveInstructionAccounts, in account order:

#FieldType
0mintPubkey
1vault_authorityPubkey
2bonding_curvePubkey
3bonding_curve_sol_vaultPubkey
4bonding_curve_vaultPubkey
5configPubkey
6payerPubkey
7system_programPubkey
8token_programPubkey
9associated_token_programPubkey
10…remainingVec<AccountMeta>

DeployBondingCurveFallback#

Discriminator 35e6ac544dae163d · data DeployBondingCurveFallback · accounts DeployBondingCurveFallbackInstructionAccounts.

FieldType
creatorPubkey
saltu64

Required accounts: 10; extras go to remaining.

Fields of DeployBondingCurveFallbackInstructionAccounts, in account order:

#FieldType
0mintPubkey
1vault_authorityPubkey
2bonding_curvePubkey
3bonding_curve_sol_vaultPubkey
4bonding_curve_vaultPubkey
5configPubkey
6payerPubkey
7system_programPubkey
8token_programPubkey
9associated_token_programPubkey
10…remainingVec<AccountMeta>

DepositIntoRaydium#

Discriminator a859631e753158e0 · data DepositIntoRaydium · accounts DepositIntoRaydiumInstructionAccounts.

FieldType
lp_token_amountu64
maximum_token0_amountu64
maximum_token1_amountu64

Required accounts: 21; extras go to remaining.

Fields of DepositIntoRaydiumInstructionAccounts, in account order:

#FieldType
0configPubkey
1amm_configPubkey
2operatorPubkey
3operator_wsol_accountPubkey
4vault_authorityPubkey
5authorityPubkey
6pool_statePubkey
7token0_vaultPubkey
8token1_vaultPubkey
9bonding_curve_vaultPubkey
10bonding_curve_wsol_vaultPubkey
11token_programPubkey
12token_program2022Pubkey
13system_programPubkey
14associated_token_programPubkey
15lp_mintPubkey
16cpmm_programPubkey
17owner_lp_tokenPubkey
18bonding_curvePubkey
19token0_mintPubkey
20token1_mintPubkey
21…remainingVec<AccountMeta>

Graduate#

Discriminator 2debe1b511da4082 · data Graduate · accounts GraduateInstructionAccounts.

No data fields.

Required accounts: 15; extras go to remaining.

Fields of GraduateInstructionAccounts, in account order:

#FieldType
0mintPubkey
1wsolPubkey
2protocol_fee_recipientPubkey
3token_distributorPubkey
4token_distributor_token_accountPubkey
5vault_authorityPubkey
6bonding_curve_sol_vaultPubkey
7bonding_curvePubkey
8bonding_curve_vaultPubkey
9bonding_curve_wsol_accountPubkey
10operatorPubkey
11configPubkey
12system_programPubkey
13token_programPubkey
14associated_token_programPubkey
15…remainingVec<AccountMeta>

Initialize#

Discriminator afaf6d1f0d989bed · data Initialize · accounts InitializeInstructionAccounts.

FieldType
protocol_fee_recipientPubkey
token_distributorPubkey

Required accounts: 3; extras go to remaining.

Fields of InitializeInstructionAccounts, in account order:

#FieldType
0configPubkey
1authorityPubkey
2system_programPubkey
3…remainingVec<AccountMeta>

InitiateAuthorityTransfer#

Discriminator d22b65d7778c6ada · data InitiateAuthorityTransfer · accounts InitiateAuthorityTransferInstructionAccounts.

FieldType
new_authorityPubkey

Required accounts: 3; extras go to remaining.

Fields of InitiateAuthorityTransferInstructionAccounts, in account order:

#FieldType
0authorityPubkey
1configPubkey
2system_programPubkey
3…remainingVec<AccountMeta>

LockRaydiumLiquidity#

Discriminator adff94067a638c16 · data LockRaydiumLiquidity · accounts LockRaydiumLiquidityInstructionAccounts.

No data fields.

Required accounts: 22; extras go to remaining.

Fields of LockRaydiumLiquidityInstructionAccounts, in account order:

#FieldType
0lock_programPubkey
1vault_authorityPubkey
2authorityPubkey
3fee_nft_ownerPubkey
4fee_nft_mintPubkey
5fee_nft_accountPubkey
6pool_statePubkey
7locked_liquidityPubkey
8lp_mintPubkey
9liquidity_owner_lpPubkey
10locked_lp_vaultPubkey
11token0_vaultPubkey
12token1_vaultPubkey
13operatorPubkey
14configPubkey
15bonding_curvePubkey
16metadata_accountPubkey
17rentPubkey
18system_programPubkey
19token_programPubkey
20associated_token_programPubkey
21metadata_programPubkey
22…remainingVec<AccountMeta>

RemoveOperators#

Discriminator 2a145953de25046d · data RemoveOperators · accounts RemoveOperatorsInstructionAccounts.

FieldType
operatorsVec<Pubkey>

Required accounts: 3; extras go to remaining.

Fields of RemoveOperatorsInstructionAccounts, in account order:

#FieldType
0configPubkey
1authorityPubkey
2system_programPubkey
3…remainingVec<AccountMeta>

SellToken#

Discriminator 6d3d28bbe6b087ae · data SellToken · accounts SellTokenInstructionAccounts.

FieldType
sell_amountu64
amount_out_minu64

Required accounts: 12; extras go to remaining.

Fields of SellTokenInstructionAccounts, in account order:

#FieldType
0mintPubkey
1bonding_curvePubkey
2trading_fees_vaultPubkey
3bonding_curve_vaultPubkey
4bonding_curve_sol_vaultPubkey
5seller_token_accountPubkey
6sellerPubkey
7recipientPubkey
8configPubkey
9system_programPubkey
10token_programPubkey
11associated_token_programPubkey
12…remainingVec<AccountMeta>

SplitPostGraduationTradingFees#

Discriminator f1b2b14526bb3ab0 · data SplitPostGraduationTradingFees · accounts SplitPostGraduationTradingFeesInstructionAccounts.

No data fields.

Required accounts: 24; extras go to remaining.

Fields of SplitPostGraduationTradingFeesInstructionAccounts, in account order:

#FieldType
0operatorPubkey
1mintPubkey
2wsolPubkey
3configPubkey
4vault_authorityPubkey
5bonding_curvePubkey
6trading_fees_vaultPubkey
7fee_splitter_programPubkey
8system_programPubkey
9token_programPubkey
10associated_token_programPubkey
11fee_splitter_configPubkey
12fee_splitter_creator_vaultPubkey
13fee_splitter_vault_authorityPubkey
14fee_splitter_creator_vault_authorityPubkey
15fee_splitter_staking_mintPubkey
16fee_splitter_wsol_vaultPubkey
17fee_splitter_creator_vault_authority_wsol_vaultPubkey
18fee_splitter_treasury_wsol_vaultPubkey
19fee_splitter_team_wsol_vaultPubkey
20fee_splitter_reward_poolPubkey
21fee_splitter_reward_pool_staking_vaultPubkey
22fee_splitter_reward_pool_reward_vaultPubkey
23fee_splitter_reward_pool_programPubkey
24…remainingVec<AccountMeta>

SplitTradingFees#

Discriminator 607ee12fb9d5323a · data SplitTradingFees · accounts SplitTradingFeesInstructionAccounts.

No data fields.

Required accounts: 24; extras go to remaining.

Fields of SplitTradingFeesInstructionAccounts, in account order:

#FieldType
0operatorPubkey
1mintPubkey
2wsolPubkey
3configPubkey
4vault_authorityPubkey
5bonding_curvePubkey
6trading_fees_vaultPubkey
7fee_splitter_programPubkey
8system_programPubkey
9token_programPubkey
10associated_token_programPubkey
11fee_splitter_configPubkey
12fee_splitter_creator_vaultPubkey
13fee_splitter_vault_authorityPubkey
14fee_splitter_creator_vault_authorityPubkey
15fee_splitter_staking_mintPubkey
16fee_splitter_wsol_vaultPubkey
17fee_splitter_creator_vault_authority_wsol_vaultPubkey
18fee_splitter_treasury_wsol_vaultPubkey
19fee_splitter_team_wsol_vaultPubkey
20fee_splitter_reward_poolPubkey
21fee_splitter_reward_pool_staking_vaultPubkey
22fee_splitter_reward_pool_reward_vaultPubkey
23fee_splitter_reward_pool_programPubkey
24…remainingVec<AccountMeta>

SwapSolForTokensOnRaydium#

Discriminator 6bf883ef98ea3623 · data SwapSolForTokensOnRaydium · accounts SwapSolForTokensOnRaydiumInstructionAccounts.

FieldType
amount_inu64
minimum_amount_outu64

Required accounts: 16; extras go to remaining.

Fields of SwapSolForTokensOnRaydiumInstructionAccounts, in account order:

#FieldType
0configPubkey
1bonding_curvePubkey
2amm_configPubkey
3operatorPubkey
4vault_authorityPubkey
5authorityPubkey
6pool_statePubkey
7input_vaultPubkey
8output_vaultPubkey
9bonding_curve_vaultPubkey
10bonding_curve_wsol_vaultPubkey
11output_token_mintPubkey
12input_token_mintPubkey
13token_programPubkey
14cp_swap_programPubkey
15observation_statePubkey
16…remainingVec<AccountMeta>

SwapTokensForSolOnRaydium#

Discriminator d8ac82942262d7a3 · data SwapTokensForSolOnRaydium · accounts SwapTokensForSolOnRaydiumInstructionAccounts.

FieldType
amount_inu64
minimum_amount_outu64

Required accounts: 16; extras go to remaining.

Fields of SwapTokensForSolOnRaydiumInstructionAccounts, in account order:

#FieldType
0configPubkey
1bonding_curvePubkey
2amm_configPubkey
3operatorPubkey
4vault_authorityPubkey
5authorityPubkey
6pool_statePubkey
7input_vaultPubkey
8output_vaultPubkey
9bonding_curve_vaultPubkey
10bonding_curve_wsol_vaultPubkey
11input_token_mintPubkey
12output_token_mintPubkey
13token_programPubkey
14cp_swap_programPubkey
15observation_statePubkey
16…remainingVec<AccountMeta>

TogglePaused#

Discriminator 365393c67b61da48 · data TogglePaused · accounts TogglePausedInstructionAccounts.

No data fields.

Required accounts: 2; extras go to remaining.

Fields of TogglePausedInstructionAccounts, in account order:

#FieldType
0authorityPubkey
1configPubkey
2…remainingVec<AccountMeta>

UpdateConfig#

Discriminator 1d9efcbf0a53db63 · data UpdateConfig · accounts UpdateConfigInstructionAccounts.

FieldType
new_protocol_fee_recipientPubkey
new_virtual_sol_reservesu64
new_virtual_token_reservesu64
new_graduation_targetu64
new_graduation_feeu64
new_damping_termu8
new_swap_fee_basis_pointsu8
new_token_for_stakers_basis_pointsu16
new_token_amount_for_raydium_liquidityu64
new_max_graduation_price_deviation_basis_pointsu16
new_max_swap_amount_for_pool_price_correction_basis_pointsu16

Required accounts: 3; extras go to remaining.

Fields of UpdateConfigInstructionAccounts, in account order:

#FieldType
0configPubkey
1authorityPubkey
2system_programPubkey
3…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 BoopAccount. Each wraps a boxed struct from carbon_boop_decoder::accounts::<module>. decode_account only considers accounts owned by PROGRAM_ID and returns the first variant that matches.

AmmConfig#

Discriminator daf42168cbcb2b6f · accounts::amm_config::AmmConfig.

FieldTypeDescription
bumpu8Bump to identify PDA
disable_create_poolboolStatus to control if new pool can be create
indexu16Config index
trade_fee_rateu64The trade fee, denominated in hundredths of a bip (10^-6)
protocol_fee_rateu64The protocol fee
fund_fee_rateu64The fund fee, denominated in hundredths of a bip (10^-6)
create_pool_feeu64Fee for create a new pool
protocol_ownerPubkeyAddress of the protocol fee owner
fund_ownerPubkeyAddress of the fund fee owner
padding[u64; 16]padding

BondingCurve#

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

FieldTypeDescription
creatorPubkey
mintPubkey
virtual_sol_reservesu64
virtual_token_reservesu64virtual token reserves is deprecated, we now use the xyk formula instead and it only requires virtual sol reserves to maintain backwards compatibility, if damping term is 30, we use the old formula and we still need virtual_token_reserves to be set correctly
graduation_targetu64
graduation_feeu64
sol_reservesu64
token_reservesu64
damping_termu8In reality, this is now more like a bonding_curve_selector
swap_fee_basis_pointsu8
token_for_stakers_basis_pointsu16
statusBondingCurveStatus

Config#

Discriminator 9b0caae01efacc82 · accounts::config::Config.

FieldType
is_pausedbool
authorityPubkey
pending_authorityPubkey
operatorsVec<Pubkey>
protocol_fee_recipientPubkey
token_distributorPubkey
virtual_sol_reservesu64
virtual_token_reservesu64
graduation_targetu64
graduation_feeu64
damping_termu8
token_for_stakers_basis_pointsu16
swap_fee_basis_pointsu8
token_amount_for_raydium_liquidityu64
max_graduation_price_deviation_basis_pointsu16
max_swap_amount_for_pool_price_correction_basis_pointsu16

LockedCpLiquidityState#

Discriminator 190aeec5cfea4916 · accounts::locked_cp_liquidity_state::LockedCpLiquidityState.

FieldTypeDescription
locked_lp_amountu64The Locked liquidity amount without claimed lp fee
claimed_lp_amountu64Claimed lp fee amount
unclaimed_lp_amountu64Unclaimed lp fee amount
last_lpu64Last updated cp pool lp total supply
last_ku128Last updated cp pool k
recent_epochu64Account update recent epoch
pool_idPubkeyThe ID of the pool with which this record is connected
fee_nft_mintPubkeynft mint to check who has authority to collect fee
locked_ownerPubkeyThe owner who has locked liquidity
locked_lp_mintPubkeyThe mint of locked lp token
padding[u64; 8]Unused bytes for future upgrades.

Events#

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

AuthorityTransferCancelledEvent#

Discriminator c0798ce0e5600d8f · events::authority_transfer_cancelled_event::AuthorityTransferCancelledEventEvent.

No fields.

AuthorityTransferCompletedEvent#

Discriminator a384d980f35c5af9 · events::authority_transfer_completed_event::AuthorityTransferCompletedEventEvent.

FieldType
old_authorityPubkey
new_authorityPubkey

AuthorityTransferInitiatedEvent#

Discriminator 79f65f9be56d94cd · events::authority_transfer_initiated_event::AuthorityTransferInitiatedEventEvent.

FieldType
old_authorityPubkey
new_authorityPubkey

BondingCurveDeployedEvent#

Discriminator e150b222d927b894 · events::bonding_curve_deployed_event::BondingCurveDeployedEventEvent.

FieldType
mintPubkey
creatorPubkey

BondingCurveDeployedFallbackEvent#

Discriminator 6afcf373c79ff71f · events::bonding_curve_deployed_fallback_event::BondingCurveDeployedFallbackEventEvent.

FieldType
mintPubkey
creatorPubkey

BondingCurveVaultClosedEvent#

Discriminator b9249c52bda4cf4f · events::bonding_curve_vault_closed_event::BondingCurveVaultClosedEventEvent.

FieldType
mintPubkey
recipientPubkey
amountu64

ConfigUpdatedEvent#

Discriminator f59e81633c64d6dc · events::config_updated_event::ConfigUpdatedEventEvent.

FieldType
protocol_fee_recipientPubkey
virtual_sol_reservesu64
virtual_token_reservesu64
graduation_targetu64
graduation_feeu64
damping_termu8
swap_fee_basis_pointsu8
token_for_stakers_basis_pointsu16
token_amount_for_raydium_liquidityu64
max_graduation_price_deviation_basis_pointsu16
max_swap_amount_for_pool_price_correction_basis_pointsu16

LiquidityDepositedIntoRaydiumEvent#

Discriminator ec32611bc665f814 · events::liquidity_deposited_into_raydium_event::LiquidityDepositedIntoRaydiumEventEvent.

FieldType
pool_statePubkey
mintPubkey
lp_token_amountu64
tokens_depositedu64
wsol_depositedu64

OperatorsAddedEvent#

Discriminator f73a7038cbba7098 · events::operators_added_event::OperatorsAddedEventEvent.

FieldType
operatorsVec<Pubkey>

OperatorsRemovedEvent#

Discriminator 2c484b46972a3559 · events::operators_removed_event::OperatorsRemovedEventEvent.

FieldType
operatorsVec<Pubkey>

PausedToggledEvent#

Discriminator 8fdee4e006e640b0 · events::paused_toggled_event::PausedToggledEventEvent.

FieldType
is_pausedbool

PostGraduationTradingFeesSplitEvent#

Discriminator 22e7105124cb9ec4 · events::post_graduation_trading_fees_split_event::PostGraduationTradingFeesSplitEventEvent.

FieldType
amountu64
creatorPubkey

RaydiumLiquidityLockedEvent#

Discriminator acbd08f189af3b64 · events::raydium_liquidity_locked_event::RaydiumLiquidityLockedEventEvent.

FieldType
pool_statePubkey
mintPubkey
lp_amountu64

RaydiumPoolCreatedEvent#

Discriminator aab215d754de2265 · events::raydium_pool_created_event::RaydiumPoolCreatedEventEvent.

FieldType
pool_statePubkey
mintPubkey

RaydiumRandomPoolCreatedEvent#

Discriminator 98fb80989eeb5335 · events::raydium_random_pool_created_event::RaydiumRandomPoolCreatedEventEvent.

FieldType
pool_statePubkey
mintPubkey

SwapSolForTokensOnRaydiumEvent#

Discriminator f70108a6dd747162 · events::swap_sol_for_tokens_on_raydium_event::SwapSolForTokensOnRaydiumEventEvent.

FieldType
mintPubkey
amount_inu64
amount_outu64

SwapTokensForSolOnRaydiumEvent#

Discriminator 4cf9dda241467620 · events::swap_tokens_for_sol_on_raydium_event::SwapTokensForSolOnRaydiumEventEvent.

FieldType
mintPubkey
amount_inu64
amount_outu64

TokenBoughtEvent#

Discriminator 4759de7cd7c0e68a · events::token_bought_event::TokenBoughtEventEvent.

FieldType
mintPubkey
amount_inu64
amount_outu64
swap_feeu64
buyerPubkey
recipientPubkey

TokenCreatedEvent#

Discriminator 607a718a32e39539 · events::token_created_event::TokenCreatedEventEvent.

FieldType
nameString
symbolString
uriString

TokenCreatedFallbackEvent#

Discriminator 9dca235ca5a32738 · events::token_created_fallback_event::TokenCreatedFallbackEventEvent.

FieldType
nameString
symbolString
uriString

TokenGraduatedEvent#

Discriminator 49746f1a5cd9928d · events::token_graduated_event::TokenGraduatedEventEvent.

FieldType
mintPubkey
sol_for_liquidityu64
graduation_feeu64
token_for_distributoru64

TokenSoldEvent#

Discriminator ccefb64df1334d42 · events::token_sold_event::TokenSoldEventEvent.

FieldType
mintPubkey
amount_inu64
amount_outu64
swap_feeu64
sellerPubkey
recipientPubkey

TradingFeesCollectedEvent#

Discriminator e13f1a3786f3d2cb · events::trading_fees_collected_event::TradingFeesCollectedEventEvent.

FieldType
pool_statePubkey
mintPubkey

TradingFeesCollectedV2Event#

Discriminator 17f682fa0b31f0b3 · events::trading_fees_collected_v2_event::TradingFeesCollectedV2EventEvent.

FieldType
pool_statePubkey
mintPubkey

TradingFeesSplitEvent#

Discriminator 713c9f11fdae877a · events::trading_fees_split_event::TradingFeesSplitEventEvent.

FieldType
amountu64
creatorPubkey

Types#

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

AuthorityTransferCancelledEvent#

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

AuthorityTransferCompletedEvent#

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

AuthorityTransferInitiatedEvent#

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

BondingCurveDeployedEvent#

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

BondingCurveDeployedFallbackEvent#

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

BondingCurveStatus#

Enum types::BondingCurveStatus.

Variant
Trading
Graduated
PoolPriceCorrected
LiquidityProvisioned
LiquidityLocked

BondingCurveVaultClosedEvent#

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

ConfigUpdatedEvent#

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

LiquidityDepositedIntoRaydiumEvent#

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

OperatorsAddedEvent#

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

OperatorsRemovedEvent#

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

PausedToggledEvent#

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

PostGraduationTradingFeesSplitEvent#

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

RaydiumLiquidityLockedEvent#

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

RaydiumPoolCreatedEvent#

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

RaydiumRandomPoolCreatedEvent#

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

SwapSolForTokensOnRaydiumEvent#

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

SwapTokensForSolOnRaydiumEvent#

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

TokenBoughtEvent#

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

TokenCreatedEvent#

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

TokenCreatedFallbackEvent#

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

TokenGraduatedEvent#

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

TokenSoldEvent#

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

TradingFeesCollectedEvent#

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

TradingFeesCollectedV2Event#

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

TradingFeesSplitEvent#

Struct types::TradingFeesSplitEvent. Same fields as the TradingFeesSplitEvent 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.