# Boop decoder (Carbon 2.0)

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

`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](https://carbon.sevenlabs.org/concepts/decoders.md) for how decoders plug into a pipeline.

|                  |                                                                                                   |
| ---------------- | ------------------------------------------------------------------------------------------------- |
| Crate            | [`carbon-boop-decoder`](https://crates.io/crates/carbon-boop-decoder/2.0.0) 2.0.0                 |
| Install          | `cargo add carbon-boop-decoder@2.0.0`                                                             |
| Program ID       | `boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4` (`carbon_boop_decoder::PROGRAM_ID`)                 |
| Category         | [Launchpads](https://carbon.sevenlabs.org/decoders/launchpads.md)                                 |
| Decoder          | `carbon_boop_decoder::BoopDecoder`                                                                |
| Instruction enum | `instructions::BoopInstruction`                                                                   |
| Account enum     | `accounts::BoopAccount`                                                                           |
| Event enum       | `instructions::CpiEvent`                                                                          |
| Features         | `serde`, `postgres`, `graphql` (none enabled by default)                                          |
| API docs         | [docs.rs/carbon-boop-decoder/2.0.0](https://docs.rs/carbon-boop-decoder/2.0.0)                    |
| Source           | [decoders/boop-decoder](https://github.com/sevenlabs-hq/carbon/tree/v2.0.0/decoders/boop-decoder) |

Other launchpad decoders: [Meteora DBC](https://carbon.sevenlabs.org/decoders/meteora-dbc.md), [Moonshot](https://carbon.sevenlabs.org/decoders/moonshot.md), [Pump.fun](https://carbon.sevenlabs.org/decoders/pumpfun.md), [Raydium Launchpad](https://carbon.sevenlabs.org/decoders/raydium-launchpad.md), [Vertigo](https://carbon.sevenlabs.org/decoders/vertigo.md), [Virtuals](https://carbon.sevenlabs.org/decoders/virtuals.md), [Wavebreak](https://carbon.sevenlabs.org/decoders/wavebreak.md). To decode several in one pipeline, see [launchpad decoders](https://carbon.sevenlabs.org/decoders/launchpads.md).

The `serde` feature derives `Serialize`/`Deserialize` on every type, `postgres` adds tables and processors for [Postgres](https://carbon.sevenlabs.org/guides/postgres.md), and `graphql` adds a schema for the [GraphQL server](https://carbon.sevenlabs.org/guides/graphql.md).

## Usage

This program crawls recent Boop transactions from the public RPC and prints every decoded `BuyToken` instruction. Add the dependencies:

```sh
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`:

```rust
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(())
    }
}
```

```sh
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](https://carbon.sevenlabs.org/guides/stream-with-rpc.md) 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](#events). If `CpiEvent` never arrives, the program logs its events with `emit!` instead: decode them with [`decode_log_events`](https://carbon.sevenlabs.org/concepts/instructions.md#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:

```sh
cargo add carbon-rpc-program-subscribe-datasource@2.0.0 solana-client@4.2.2
```

`src/main.rs`:

```rust
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(())
    }
}
```

```sh
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](https://carbon.sevenlabs.org/guides/load-account-state.md).

## 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 `AccountMeta`s. 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`.

| Field       | Type          |
| ----------- | ------------- |
| `operators` | `Vec<Pubkey>` |

Required accounts: 3; extras go to `remaining`.

Fields of `AddOperatorsInstructionAccounts`, in account order:

| #  | Field            | Type               |
| -- | ---------------- | ------------------ |
| 0  | `config`         | `Pubkey`           |
| 1  | `authority`      | `Pubkey`           |
| 2  | `system_program` | `Pubkey`           |
| 3… | `remaining`      | `Vec<AccountMeta>` |

### `BuyToken`

Discriminator `8a7f0e5b26577369` · data `BuyToken` · accounts `BuyTokenInstructionAccounts`.

| Field            | Type  |
| ---------------- | ----- |
| `buy_amount`     | `u64` |
| `amount_out_min` | `u64` |

Required accounts: 13; extras go to `remaining`.

Fields of `BuyTokenInstructionAccounts`, in account order:

| #   | Field                      | Type               |
| --- | -------------------------- | ------------------ |
| 0   | `mint`                     | `Pubkey`           |
| 1   | `bonding_curve`            | `Pubkey`           |
| 2   | `trading_fees_vault`       | `Pubkey`           |
| 3   | `bonding_curve_vault`      | `Pubkey`           |
| 4   | `bonding_curve_sol_vault`  | `Pubkey`           |
| 5   | `recipient_token_account`  | `Pubkey`           |
| 6   | `buyer`                    | `Pubkey`           |
| 7   | `config`                   | `Pubkey`           |
| 8   | `vault_authority`          | `Pubkey`           |
| 9   | `wsol`                     | `Pubkey`           |
| 10  | `system_program`           | `Pubkey`           |
| 11  | `token_program`            | `Pubkey`           |
| 12  | `associated_token_program` | `Pubkey`           |
| 13… | `remaining`                | `Vec<AccountMeta>` |

### `CancelAuthorityTransfer`

Discriminator `5e837db8b7187de5` · data `CancelAuthorityTransfer` · accounts `CancelAuthorityTransferInstructionAccounts`.

No data fields.

Required accounts: 3; extras go to `remaining`.

Fields of `CancelAuthorityTransferInstructionAccounts`, in account order:

| #  | Field            | Type               |
| -- | ---------------- | ------------------ |
| 0  | `authority`      | `Pubkey`           |
| 1  | `config`         | `Pubkey`           |
| 2  | `system_program` | `Pubkey`           |
| 3… | `remaining`      | `Vec<AccountMeta>` |

### `CloseBondingCurveVault`

Discriminator `bd47bdef71423bbd` · data `CloseBondingCurveVault` · accounts `CloseBondingCurveVaultInstructionAccounts`.

No data fields.

Required accounts: 12; extras go to `remaining`.

Fields of `CloseBondingCurveVaultInstructionAccounts`, in account order:

| #   | Field                      | Type               |
| --- | -------------------------- | ------------------ |
| 0   | `config`                   | `Pubkey`           |
| 1   | `operator`                 | `Pubkey`           |
| 2   | `vault_authority`          | `Pubkey`           |
| 3   | `bonding_curve`            | `Pubkey`           |
| 4   | `bonding_curve_vault`      | `Pubkey`           |
| 5   | `mint`                     | `Pubkey`           |
| 6   | `recipient_token_account`  | `Pubkey`           |
| 7   | `recipient`                | `Pubkey`           |
| 8   | `token_program`            | `Pubkey`           |
| 9   | `system_program`           | `Pubkey`           |
| 10  | `associated_token_program` | `Pubkey`           |
| 11  | `rent`                     | `Pubkey`           |
| 12… | `remaining`                | `Vec<AccountMeta>` |

### `CollectMeteoraTradingFees`

Discriminator `f95f7e5b51a253fa` · data `CollectMeteoraTradingFees` · accounts `CollectMeteoraTradingFeesInstructionAccounts`.

No data fields.

Required accounts: 18; extras go to `remaining`.

Fields of `CollectMeteoraTradingFeesInstructionAccounts`, in account order:

| #   | Field                      | Type               |
| --- | -------------------------- | ------------------ |
| 0   | `operator`                 | `Pubkey`           |
| 1   | `protocol_fee_recipient`   | `Pubkey`           |
| 2   | `config`                   | `Pubkey`           |
| 3   | `pool_authority`           | `Pubkey`           |
| 4   | `pool`                     | `Pubkey`           |
| 5   | `position`                 | `Pubkey`           |
| 6   | `token_a_account`          | `Pubkey`           |
| 7   | `token_b_account`          | `Pubkey`           |
| 8   | `token_a_vault`            | `Pubkey`           |
| 9   | `token_b_vault`            | `Pubkey`           |
| 10  | `token_a_mint`             | `Pubkey`           |
| 11  | `token_b_mint`             | `Pubkey`           |
| 12  | `position_nft_account`     | `Pubkey`           |
| 13  | `vault_authority`          | `Pubkey`           |
| 14  | `token_program`            | `Pubkey`           |
| 15  | `associated_token_program` | `Pubkey`           |
| 16  | `event_authority`          | `Pubkey`           |
| 17  | `cp_amm_program`           | `Pubkey`           |
| 18… | `remaining`                | `Vec<AccountMeta>` |

### `CollectMeteoraTradingFeesV2`

Discriminator `60276d2e05a10f39` · data `CollectMeteoraTradingFeesV2` · accounts `CollectMeteoraTradingFeesV2InstructionAccounts`.

No data fields.

Required accounts: 19; extras go to `remaining`.

Fields of `CollectMeteoraTradingFeesV2InstructionAccounts`, in account order:

| #   | Field                      | Type               |
| --- | -------------------------- | ------------------ |
| 0   | `operator`                 | `Pubkey`           |
| 1   | `protocol_fee_recipient`   | `Pubkey`           |
| 2   | `config`                   | `Pubkey`           |
| 3   | `pool_authority`           | `Pubkey`           |
| 4   | `pool`                     | `Pubkey`           |
| 5   | `position`                 | `Pubkey`           |
| 6   | `token_a_account`          | `Pubkey`           |
| 7   | `token_b_account`          | `Pubkey`           |
| 8   | `token_a_vault`            | `Pubkey`           |
| 9   | `token_b_vault`            | `Pubkey`           |
| 10  | `token_a_mint`             | `Pubkey`           |
| 11  | `token_b_mint`             | `Pubkey`           |
| 12  | `position_nft_account`     | `Pubkey`           |
| 13  | `vault_authority`          | `Pubkey`           |
| 14  | `token_program`            | `Pubkey`           |
| 15  | `associated_token_program` | `Pubkey`           |
| 16  | `event_authority`          | `Pubkey`           |
| 17  | `cp_amm_program`           | `Pubkey`           |
| 18  | `system_program`           | `Pubkey`           |
| 19… | `remaining`                | `Vec<AccountMeta>` |

### `CollectTradingFees`

Discriminator `bd26cdea514d1901` · data `CollectTradingFees` · accounts `CollectTradingFeesInstructionAccounts`.

No data fields.

Required accounts: 24; extras go to `remaining`.

Fields of `CollectTradingFeesInstructionAccounts`, in account order:

| #   | Field                      | Type               |
| --- | -------------------------- | ------------------ |
| 0   | `operator`                 | `Pubkey`           |
| 1   | `protocol_fee_recipient`   | `Pubkey`           |
| 2   | `config`                   | `Pubkey`           |
| 3   | `lock_program`             | `Pubkey`           |
| 4   | `vault_authority`          | `Pubkey`           |
| 5   | `authority`                | `Pubkey`           |
| 6   | `fee_nft_account`          | `Pubkey`           |
| 7   | `locked_liquidity`         | `Pubkey`           |
| 8   | `cpmm_program`             | `Pubkey`           |
| 9   | `cp_authority`             | `Pubkey`           |
| 10  | `pool_state`               | `Pubkey`           |
| 11  | `lp_mint`                  | `Pubkey`           |
| 12  | `recipient_token0_account` | `Pubkey`           |
| 13  | `recipient_token1_account` | `Pubkey`           |
| 14  | `token0_vault`             | `Pubkey`           |
| 15  | `token1_vault`             | `Pubkey`           |
| 16  | `vault0_mint`              | `Pubkey`           |
| 17  | `vault1_mint`              | `Pubkey`           |
| 18  | `locked_lp_vault`          | `Pubkey`           |
| 19  | `system_program`           | `Pubkey`           |
| 20  | `associated_token_program` | `Pubkey`           |
| 21  | `token_program`            | `Pubkey`           |
| 22  | `token_program2022`        | `Pubkey`           |
| 23  | `memo_program`             | `Pubkey`           |
| 24… | `remaining`                | `Vec<AccountMeta>` |

### `CollectTradingFeesV2`

Discriminator `b48aa09bf358a807` · data `CollectTradingFeesV2` · accounts `CollectTradingFeesV2InstructionAccounts`.

No data fields.

Required accounts: 24; extras go to `remaining`.

Fields of `CollectTradingFeesV2InstructionAccounts`, in account order:

| #   | Field                      | Type               |
| --- | -------------------------- | ------------------ |
| 0   | `operator`                 | `Pubkey`           |
| 1   | `protocol_fee_recipient`   | `Pubkey`           |
| 2   | `config`                   | `Pubkey`           |
| 3   | `lock_program`             | `Pubkey`           |
| 4   | `vault_authority`          | `Pubkey`           |
| 5   | `authority`                | `Pubkey`           |
| 6   | `fee_nft_account`          | `Pubkey`           |
| 7   | `locked_liquidity`         | `Pubkey`           |
| 8   | `cpmm_program`             | `Pubkey`           |
| 9   | `cp_authority`             | `Pubkey`           |
| 10  | `pool_state`               | `Pubkey`           |
| 11  | `lp_mint`                  | `Pubkey`           |
| 12  | `recipient_token0_account` | `Pubkey`           |
| 13  | `recipient_token1_account` | `Pubkey`           |
| 14  | `token0_vault`             | `Pubkey`           |
| 15  | `token1_vault`             | `Pubkey`           |
| 16  | `vault0_mint`              | `Pubkey`           |
| 17  | `vault1_mint`              | `Pubkey`           |
| 18  | `locked_lp_vault`          | `Pubkey`           |
| 19  | `system_program`           | `Pubkey`           |
| 20  | `associated_token_program` | `Pubkey`           |
| 21  | `token_program`            | `Pubkey`           |
| 22  | `token_program2022`        | `Pubkey`           |
| 23  | `memo_program`             | `Pubkey`           |
| 24… | `remaining`                | `Vec<AccountMeta>` |

### `CompleteAuthorityTransfer`

Discriminator `51e95b84af1f978d` · data `CompleteAuthorityTransfer` · accounts `CompleteAuthorityTransferInstructionAccounts`.

No data fields.

Required accounts: 3; extras go to `remaining`.

Fields of `CompleteAuthorityTransferInstructionAccounts`, in account order:

| #  | Field               | Type               |
| -- | ------------------- | ------------------ |
| 0  | `pending_authority` | `Pubkey`           |
| 1  | `config`            | `Pubkey`           |
| 2  | `system_program`    | `Pubkey`           |
| 3… | `remaining`         | `Vec<AccountMeta>` |

### `CreateMeteoraPool`

Discriminator `f6fe2125e1b029e8` · data `CreateMeteoraPool` · accounts `CreateMeteoraPoolInstructionAccounts`.

No data fields.

Required accounts: 21; extras go to `remaining`.

Fields of `CreateMeteoraPoolInstructionAccounts`, in account order:

| #   | Field                      | Type               |
| --- | -------------------------- | ------------------ |
| 0   | `operator`                 | `Pubkey`           |
| 1   | `config`                   | `Pubkey`           |
| 2   | `vault_authority`          | `Pubkey`           |
| 3   | `cp_amm_config`            | `Pubkey`           |
| 4   | `pool_authority`           | `Pubkey`           |
| 5   | `pool`                     | `Pubkey`           |
| 6   | `position`                 | `Pubkey`           |
| 7   | `position_nft_mint`        | `Pubkey`           |
| 8   | `position_nft_account`     | `Pubkey`           |
| 9   | `token_a_mint`             | `Pubkey`           |
| 10  | `token_b_mint`             | `Pubkey`           |
| 11  | `token_a_vault`            | `Pubkey`           |
| 12  | `token_b_vault`            | `Pubkey`           |
| 13  | `bonding_curve`            | `Pubkey`           |
| 14  | `bonding_curve_vault`      | `Pubkey`           |
| 15  | `bonding_curve_wsol_vault` | `Pubkey`           |
| 16  | `token_program`            | `Pubkey`           |
| 17  | `token2022_program`        | `Pubkey`           |
| 18  | `system_program`           | `Pubkey`           |
| 19  | `event_authority`          | `Pubkey`           |
| 20  | `cp_amm_program`           | `Pubkey`           |
| 21… | `remaining`                | `Vec<AccountMeta>` |

### `CreateRaydiumPool`

Discriminator `412d774dccb25402` · data `CreateRaydiumPool` · accounts `CreateRaydiumPoolInstructionAccounts`.

No data fields.

Required accounts: 22; extras go to `remaining`.

Fields of `CreateRaydiumPoolInstructionAccounts`, in account order:

| #   | Field                      | Type               |
| --- | -------------------------- | ------------------ |
| 0   | `cpmm_program`             | `Pubkey`           |
| 1   | `amm_config`               | `Pubkey`           |
| 2   | `authority`                | `Pubkey`           |
| 3   | `pool_state`               | `Pubkey`           |
| 4   | `token0_mint`              | `Pubkey`           |
| 5   | `token1_mint`              | `Pubkey`           |
| 6   | `lp_mint`                  | `Pubkey`           |
| 7   | `vault_authority`          | `Pubkey`           |
| 8   | `bonding_curve`            | `Pubkey`           |
| 9   | `bonding_curve_vault`      | `Pubkey`           |
| 10  | `bonding_curve_wsol_vault` | `Pubkey`           |
| 11  | `creator_lp_token`         | `Pubkey`           |
| 12  | `token0_vault`             | `Pubkey`           |
| 13  | `token1_vault`             | `Pubkey`           |
| 14  | `create_pool_fee`          | `Pubkey`           |
| 15  | `observation_state`        | `Pubkey`           |
| 16  | `operator`                 | `Pubkey`           |
| 17  | `config`                   | `Pubkey`           |
| 18  | `token_program`            | `Pubkey`           |
| 19  | `associated_token_program` | `Pubkey`           |
| 20  | `system_program`           | `Pubkey`           |
| 21  | `rent`                     | `Pubkey`           |
| 22… | `remaining`                | `Vec<AccountMeta>` |

### `CreateRaydiumRandomPool`

Discriminator `4e2cad1d84b404ac` · data `CreateRaydiumRandomPool` · accounts `CreateRaydiumRandomPoolInstructionAccounts`.

No data fields.

Required accounts: 22; extras go to `remaining`.

Fields of `CreateRaydiumRandomPoolInstructionAccounts`, in account order:

| #   | Field                      | Type               |
| --- | -------------------------- | ------------------ |
| 0   | `cpmm_program`             | `Pubkey`           |
| 1   | `amm_config`               | `Pubkey`           |
| 2   | `authority`                | `Pubkey`           |
| 3   | `pool_state`               | `Pubkey`           |
| 4   | `token0_mint`              | `Pubkey`           |
| 5   | `token1_mint`              | `Pubkey`           |
| 6   | `lp_mint`                  | `Pubkey`           |
| 7   | `vault_authority`          | `Pubkey`           |
| 8   | `bonding_curve`            | `Pubkey`           |
| 9   | `bonding_curve_vault`      | `Pubkey`           |
| 10  | `bonding_curve_wsol_vault` | `Pubkey`           |
| 11  | `creator_lp_token`         | `Pubkey`           |
| 12  | `token0_vault`             | `Pubkey`           |
| 13  | `token1_vault`             | `Pubkey`           |
| 14  | `create_pool_fee`          | `Pubkey`           |
| 15  | `observation_state`        | `Pubkey`           |
| 16  | `operator`                 | `Pubkey`           |
| 17  | `config`                   | `Pubkey`           |
| 18  | `token_program`            | `Pubkey`           |
| 19  | `associated_token_program` | `Pubkey`           |
| 20  | `system_program`           | `Pubkey`           |
| 21  | `rent`                     | `Pubkey`           |
| 22… | `remaining`                | `Vec<AccountMeta>` |

### `CreateToken`

Discriminator `5434cce4188cea4b` · data `CreateToken` · accounts `CreateTokenInstructionAccounts`.

| Field    | Type     |
| -------- | -------- |
| `salt`   | `u64`    |
| `name`   | `String` |
| `symbol` | `String` |
| `uri`    | `String` |

Required accounts: 8; extras go to `remaining`.

Fields of `CreateTokenInstructionAccounts`, in account order:

| #  | Field                    | Type               |
| -- | ------------------------ | ------------------ |
| 0  | `config`                 | `Pubkey`           |
| 1  | `metadata`               | `Pubkey`           |
| 2  | `mint`                   | `Pubkey`           |
| 3  | `payer`                  | `Pubkey`           |
| 4  | `rent`                   | `Pubkey`           |
| 5  | `system_program`         | `Pubkey`           |
| 6  | `token_program`          | `Pubkey`           |
| 7  | `token_metadata_program` | `Pubkey`           |
| 8… | `remaining`              | `Vec<AccountMeta>` |

### `CreateTokenFallback`

Discriminator `fdb87ec7ebe8aca2` · data `CreateTokenFallback` · accounts `CreateTokenFallbackInstructionAccounts`.

| Field    | Type     |
| -------- | -------- |
| `salt`   | `u64`    |
| `name`   | `String` |
| `symbol` | `String` |
| `uri`    | `String` |

Required accounts: 8; extras go to `remaining`.

Fields of `CreateTokenFallbackInstructionAccounts`, in account order:

| #  | Field                    | Type               |
| -- | ------------------------ | ------------------ |
| 0  | `config`                 | `Pubkey`           |
| 1  | `metadata`               | `Pubkey`           |
| 2  | `mint`                   | `Pubkey`           |
| 3  | `payer`                  | `Pubkey`           |
| 4  | `rent`                   | `Pubkey`           |
| 5  | `system_program`         | `Pubkey`           |
| 6  | `token_program`          | `Pubkey`           |
| 7  | `token_metadata_program` | `Pubkey`           |
| 8… | `remaining`              | `Vec<AccountMeta>` |

### `DeployBondingCurve`

Discriminator `b459c74ca8ecd98a` · data `DeployBondingCurve` · accounts `DeployBondingCurveInstructionAccounts`.

| Field     | Type     |
| --------- | -------- |
| `creator` | `Pubkey` |
| `salt`    | `u64`    |

Required accounts: 10; extras go to `remaining`.

Fields of `DeployBondingCurveInstructionAccounts`, in account order:

| #   | Field                      | Type               |
| --- | -------------------------- | ------------------ |
| 0   | `mint`                     | `Pubkey`           |
| 1   | `vault_authority`          | `Pubkey`           |
| 2   | `bonding_curve`            | `Pubkey`           |
| 3   | `bonding_curve_sol_vault`  | `Pubkey`           |
| 4   | `bonding_curve_vault`      | `Pubkey`           |
| 5   | `config`                   | `Pubkey`           |
| 6   | `payer`                    | `Pubkey`           |
| 7   | `system_program`           | `Pubkey`           |
| 8   | `token_program`            | `Pubkey`           |
| 9   | `associated_token_program` | `Pubkey`           |
| 10… | `remaining`                | `Vec<AccountMeta>` |

### `DeployBondingCurveFallback`

Discriminator `35e6ac544dae163d` · data `DeployBondingCurveFallback` · accounts `DeployBondingCurveFallbackInstructionAccounts`.

| Field     | Type     |
| --------- | -------- |
| `creator` | `Pubkey` |
| `salt`    | `u64`    |

Required accounts: 10; extras go to `remaining`.

Fields of `DeployBondingCurveFallbackInstructionAccounts`, in account order:

| #   | Field                      | Type               |
| --- | -------------------------- | ------------------ |
| 0   | `mint`                     | `Pubkey`           |
| 1   | `vault_authority`          | `Pubkey`           |
| 2   | `bonding_curve`            | `Pubkey`           |
| 3   | `bonding_curve_sol_vault`  | `Pubkey`           |
| 4   | `bonding_curve_vault`      | `Pubkey`           |
| 5   | `config`                   | `Pubkey`           |
| 6   | `payer`                    | `Pubkey`           |
| 7   | `system_program`           | `Pubkey`           |
| 8   | `token_program`            | `Pubkey`           |
| 9   | `associated_token_program` | `Pubkey`           |
| 10… | `remaining`                | `Vec<AccountMeta>` |

### `DepositIntoRaydium`

Discriminator `a859631e753158e0` · data `DepositIntoRaydium` · accounts `DepositIntoRaydiumInstructionAccounts`.

| Field                   | Type  |
| ----------------------- | ----- |
| `lp_token_amount`       | `u64` |
| `maximum_token0_amount` | `u64` |
| `maximum_token1_amount` | `u64` |

Required accounts: 21; extras go to `remaining`.

Fields of `DepositIntoRaydiumInstructionAccounts`, in account order:

| #   | Field                      | Type               |
| --- | -------------------------- | ------------------ |
| 0   | `config`                   | `Pubkey`           |
| 1   | `amm_config`               | `Pubkey`           |
| 2   | `operator`                 | `Pubkey`           |
| 3   | `operator_wsol_account`    | `Pubkey`           |
| 4   | `vault_authority`          | `Pubkey`           |
| 5   | `authority`                | `Pubkey`           |
| 6   | `pool_state`               | `Pubkey`           |
| 7   | `token0_vault`             | `Pubkey`           |
| 8   | `token1_vault`             | `Pubkey`           |
| 9   | `bonding_curve_vault`      | `Pubkey`           |
| 10  | `bonding_curve_wsol_vault` | `Pubkey`           |
| 11  | `token_program`            | `Pubkey`           |
| 12  | `token_program2022`        | `Pubkey`           |
| 13  | `system_program`           | `Pubkey`           |
| 14  | `associated_token_program` | `Pubkey`           |
| 15  | `lp_mint`                  | `Pubkey`           |
| 16  | `cpmm_program`             | `Pubkey`           |
| 17  | `owner_lp_token`           | `Pubkey`           |
| 18  | `bonding_curve`            | `Pubkey`           |
| 19  | `token0_mint`              | `Pubkey`           |
| 20  | `token1_mint`              | `Pubkey`           |
| 21… | `remaining`                | `Vec<AccountMeta>` |

### `Graduate`

Discriminator `2debe1b511da4082` · data `Graduate` · accounts `GraduateInstructionAccounts`.

No data fields.

Required accounts: 15; extras go to `remaining`.

Fields of `GraduateInstructionAccounts`, in account order:

| #   | Field                             | Type               |
| --- | --------------------------------- | ------------------ |
| 0   | `mint`                            | `Pubkey`           |
| 1   | `wsol`                            | `Pubkey`           |
| 2   | `protocol_fee_recipient`          | `Pubkey`           |
| 3   | `token_distributor`               | `Pubkey`           |
| 4   | `token_distributor_token_account` | `Pubkey`           |
| 5   | `vault_authority`                 | `Pubkey`           |
| 6   | `bonding_curve_sol_vault`         | `Pubkey`           |
| 7   | `bonding_curve`                   | `Pubkey`           |
| 8   | `bonding_curve_vault`             | `Pubkey`           |
| 9   | `bonding_curve_wsol_account`      | `Pubkey`           |
| 10  | `operator`                        | `Pubkey`           |
| 11  | `config`                          | `Pubkey`           |
| 12  | `system_program`                  | `Pubkey`           |
| 13  | `token_program`                   | `Pubkey`           |
| 14  | `associated_token_program`        | `Pubkey`           |
| 15… | `remaining`                       | `Vec<AccountMeta>` |

### `Initialize`

Discriminator `afaf6d1f0d989bed` · data `Initialize` · accounts `InitializeInstructionAccounts`.

| Field                    | Type     |
| ------------------------ | -------- |
| `protocol_fee_recipient` | `Pubkey` |
| `token_distributor`      | `Pubkey` |

Required accounts: 3; extras go to `remaining`.

Fields of `InitializeInstructionAccounts`, in account order:

| #  | Field            | Type               |
| -- | ---------------- | ------------------ |
| 0  | `config`         | `Pubkey`           |
| 1  | `authority`      | `Pubkey`           |
| 2  | `system_program` | `Pubkey`           |
| 3… | `remaining`      | `Vec<AccountMeta>` |

### `InitiateAuthorityTransfer`

Discriminator `d22b65d7778c6ada` · data `InitiateAuthorityTransfer` · accounts `InitiateAuthorityTransferInstructionAccounts`.

| Field           | Type     |
| --------------- | -------- |
| `new_authority` | `Pubkey` |

Required accounts: 3; extras go to `remaining`.

Fields of `InitiateAuthorityTransferInstructionAccounts`, in account order:

| #  | Field            | Type               |
| -- | ---------------- | ------------------ |
| 0  | `authority`      | `Pubkey`           |
| 1  | `config`         | `Pubkey`           |
| 2  | `system_program` | `Pubkey`           |
| 3… | `remaining`      | `Vec<AccountMeta>` |

### `LockRaydiumLiquidity`

Discriminator `adff94067a638c16` · data `LockRaydiumLiquidity` · accounts `LockRaydiumLiquidityInstructionAccounts`.

No data fields.

Required accounts: 22; extras go to `remaining`.

Fields of `LockRaydiumLiquidityInstructionAccounts`, in account order:

| #   | Field                      | Type               |
| --- | -------------------------- | ------------------ |
| 0   | `lock_program`             | `Pubkey`           |
| 1   | `vault_authority`          | `Pubkey`           |
| 2   | `authority`                | `Pubkey`           |
| 3   | `fee_nft_owner`            | `Pubkey`           |
| 4   | `fee_nft_mint`             | `Pubkey`           |
| 5   | `fee_nft_account`          | `Pubkey`           |
| 6   | `pool_state`               | `Pubkey`           |
| 7   | `locked_liquidity`         | `Pubkey`           |
| 8   | `lp_mint`                  | `Pubkey`           |
| 9   | `liquidity_owner_lp`       | `Pubkey`           |
| 10  | `locked_lp_vault`          | `Pubkey`           |
| 11  | `token0_vault`             | `Pubkey`           |
| 12  | `token1_vault`             | `Pubkey`           |
| 13  | `operator`                 | `Pubkey`           |
| 14  | `config`                   | `Pubkey`           |
| 15  | `bonding_curve`            | `Pubkey`           |
| 16  | `metadata_account`         | `Pubkey`           |
| 17  | `rent`                     | `Pubkey`           |
| 18  | `system_program`           | `Pubkey`           |
| 19  | `token_program`            | `Pubkey`           |
| 20  | `associated_token_program` | `Pubkey`           |
| 21  | `metadata_program`         | `Pubkey`           |
| 22… | `remaining`                | `Vec<AccountMeta>` |

### `RemoveOperators`

Discriminator `2a145953de25046d` · data `RemoveOperators` · accounts `RemoveOperatorsInstructionAccounts`.

| Field       | Type          |
| ----------- | ------------- |
| `operators` | `Vec<Pubkey>` |

Required accounts: 3; extras go to `remaining`.

Fields of `RemoveOperatorsInstructionAccounts`, in account order:

| #  | Field            | Type               |
| -- | ---------------- | ------------------ |
| 0  | `config`         | `Pubkey`           |
| 1  | `authority`      | `Pubkey`           |
| 2  | `system_program` | `Pubkey`           |
| 3… | `remaining`      | `Vec<AccountMeta>` |

### `SellToken`

Discriminator `6d3d28bbe6b087ae` · data `SellToken` · accounts `SellTokenInstructionAccounts`.

| Field            | Type  |
| ---------------- | ----- |
| `sell_amount`    | `u64` |
| `amount_out_min` | `u64` |

Required accounts: 12; extras go to `remaining`.

Fields of `SellTokenInstructionAccounts`, in account order:

| #   | Field                      | Type               |
| --- | -------------------------- | ------------------ |
| 0   | `mint`                     | `Pubkey`           |
| 1   | `bonding_curve`            | `Pubkey`           |
| 2   | `trading_fees_vault`       | `Pubkey`           |
| 3   | `bonding_curve_vault`      | `Pubkey`           |
| 4   | `bonding_curve_sol_vault`  | `Pubkey`           |
| 5   | `seller_token_account`     | `Pubkey`           |
| 6   | `seller`                   | `Pubkey`           |
| 7   | `recipient`                | `Pubkey`           |
| 8   | `config`                   | `Pubkey`           |
| 9   | `system_program`           | `Pubkey`           |
| 10  | `token_program`            | `Pubkey`           |
| 11  | `associated_token_program` | `Pubkey`           |
| 12… | `remaining`                | `Vec<AccountMeta>` |

### `SplitPostGraduationTradingFees`

Discriminator `f1b2b14526bb3ab0` · data `SplitPostGraduationTradingFees` · accounts `SplitPostGraduationTradingFeesInstructionAccounts`.

No data fields.

Required accounts: 24; extras go to `remaining`.

Fields of `SplitPostGraduationTradingFeesInstructionAccounts`, in account order:

| #   | Field                                             | Type               |
| --- | ------------------------------------------------- | ------------------ |
| 0   | `operator`                                        | `Pubkey`           |
| 1   | `mint`                                            | `Pubkey`           |
| 2   | `wsol`                                            | `Pubkey`           |
| 3   | `config`                                          | `Pubkey`           |
| 4   | `vault_authority`                                 | `Pubkey`           |
| 5   | `bonding_curve`                                   | `Pubkey`           |
| 6   | `trading_fees_vault`                              | `Pubkey`           |
| 7   | `fee_splitter_program`                            | `Pubkey`           |
| 8   | `system_program`                                  | `Pubkey`           |
| 9   | `token_program`                                   | `Pubkey`           |
| 10  | `associated_token_program`                        | `Pubkey`           |
| 11  | `fee_splitter_config`                             | `Pubkey`           |
| 12  | `fee_splitter_creator_vault`                      | `Pubkey`           |
| 13  | `fee_splitter_vault_authority`                    | `Pubkey`           |
| 14  | `fee_splitter_creator_vault_authority`            | `Pubkey`           |
| 15  | `fee_splitter_staking_mint`                       | `Pubkey`           |
| 16  | `fee_splitter_wsol_vault`                         | `Pubkey`           |
| 17  | `fee_splitter_creator_vault_authority_wsol_vault` | `Pubkey`           |
| 18  | `fee_splitter_treasury_wsol_vault`                | `Pubkey`           |
| 19  | `fee_splitter_team_wsol_vault`                    | `Pubkey`           |
| 20  | `fee_splitter_reward_pool`                        | `Pubkey`           |
| 21  | `fee_splitter_reward_pool_staking_vault`          | `Pubkey`           |
| 22  | `fee_splitter_reward_pool_reward_vault`           | `Pubkey`           |
| 23  | `fee_splitter_reward_pool_program`                | `Pubkey`           |
| 24… | `remaining`                                       | `Vec<AccountMeta>` |

### `SplitTradingFees`

Discriminator `607ee12fb9d5323a` · data `SplitTradingFees` · accounts `SplitTradingFeesInstructionAccounts`.

No data fields.

Required accounts: 24; extras go to `remaining`.

Fields of `SplitTradingFeesInstructionAccounts`, in account order:

| #   | Field                                             | Type               |
| --- | ------------------------------------------------- | ------------------ |
| 0   | `operator`                                        | `Pubkey`           |
| 1   | `mint`                                            | `Pubkey`           |
| 2   | `wsol`                                            | `Pubkey`           |
| 3   | `config`                                          | `Pubkey`           |
| 4   | `vault_authority`                                 | `Pubkey`           |
| 5   | `bonding_curve`                                   | `Pubkey`           |
| 6   | `trading_fees_vault`                              | `Pubkey`           |
| 7   | `fee_splitter_program`                            | `Pubkey`           |
| 8   | `system_program`                                  | `Pubkey`           |
| 9   | `token_program`                                   | `Pubkey`           |
| 10  | `associated_token_program`                        | `Pubkey`           |
| 11  | `fee_splitter_config`                             | `Pubkey`           |
| 12  | `fee_splitter_creator_vault`                      | `Pubkey`           |
| 13  | `fee_splitter_vault_authority`                    | `Pubkey`           |
| 14  | `fee_splitter_creator_vault_authority`            | `Pubkey`           |
| 15  | `fee_splitter_staking_mint`                       | `Pubkey`           |
| 16  | `fee_splitter_wsol_vault`                         | `Pubkey`           |
| 17  | `fee_splitter_creator_vault_authority_wsol_vault` | `Pubkey`           |
| 18  | `fee_splitter_treasury_wsol_vault`                | `Pubkey`           |
| 19  | `fee_splitter_team_wsol_vault`                    | `Pubkey`           |
| 20  | `fee_splitter_reward_pool`                        | `Pubkey`           |
| 21  | `fee_splitter_reward_pool_staking_vault`          | `Pubkey`           |
| 22  | `fee_splitter_reward_pool_reward_vault`           | `Pubkey`           |
| 23  | `fee_splitter_reward_pool_program`                | `Pubkey`           |
| 24… | `remaining`                                       | `Vec<AccountMeta>` |

### `SwapSolForTokensOnRaydium`

Discriminator `6bf883ef98ea3623` · data `SwapSolForTokensOnRaydium` · accounts `SwapSolForTokensOnRaydiumInstructionAccounts`.

| Field                | Type  |
| -------------------- | ----- |
| `amount_in`          | `u64` |
| `minimum_amount_out` | `u64` |

Required accounts: 16; extras go to `remaining`.

Fields of `SwapSolForTokensOnRaydiumInstructionAccounts`, in account order:

| #   | Field                      | Type               |
| --- | -------------------------- | ------------------ |
| 0   | `config`                   | `Pubkey`           |
| 1   | `bonding_curve`            | `Pubkey`           |
| 2   | `amm_config`               | `Pubkey`           |
| 3   | `operator`                 | `Pubkey`           |
| 4   | `vault_authority`          | `Pubkey`           |
| 5   | `authority`                | `Pubkey`           |
| 6   | `pool_state`               | `Pubkey`           |
| 7   | `input_vault`              | `Pubkey`           |
| 8   | `output_vault`             | `Pubkey`           |
| 9   | `bonding_curve_vault`      | `Pubkey`           |
| 10  | `bonding_curve_wsol_vault` | `Pubkey`           |
| 11  | `output_token_mint`        | `Pubkey`           |
| 12  | `input_token_mint`         | `Pubkey`           |
| 13  | `token_program`            | `Pubkey`           |
| 14  | `cp_swap_program`          | `Pubkey`           |
| 15  | `observation_state`        | `Pubkey`           |
| 16… | `remaining`                | `Vec<AccountMeta>` |

### `SwapTokensForSolOnRaydium`

Discriminator `d8ac82942262d7a3` · data `SwapTokensForSolOnRaydium` · accounts `SwapTokensForSolOnRaydiumInstructionAccounts`.

| Field                | Type  |
| -------------------- | ----- |
| `amount_in`          | `u64` |
| `minimum_amount_out` | `u64` |

Required accounts: 16; extras go to `remaining`.

Fields of `SwapTokensForSolOnRaydiumInstructionAccounts`, in account order:

| #   | Field                      | Type               |
| --- | -------------------------- | ------------------ |
| 0   | `config`                   | `Pubkey`           |
| 1   | `bonding_curve`            | `Pubkey`           |
| 2   | `amm_config`               | `Pubkey`           |
| 3   | `operator`                 | `Pubkey`           |
| 4   | `vault_authority`          | `Pubkey`           |
| 5   | `authority`                | `Pubkey`           |
| 6   | `pool_state`               | `Pubkey`           |
| 7   | `input_vault`              | `Pubkey`           |
| 8   | `output_vault`             | `Pubkey`           |
| 9   | `bonding_curve_vault`      | `Pubkey`           |
| 10  | `bonding_curve_wsol_vault` | `Pubkey`           |
| 11  | `input_token_mint`         | `Pubkey`           |
| 12  | `output_token_mint`        | `Pubkey`           |
| 13  | `token_program`            | `Pubkey`           |
| 14  | `cp_swap_program`          | `Pubkey`           |
| 15  | `observation_state`        | `Pubkey`           |
| 16… | `remaining`                | `Vec<AccountMeta>` |

### `TogglePaused`

Discriminator `365393c67b61da48` · data `TogglePaused` · accounts `TogglePausedInstructionAccounts`.

No data fields.

Required accounts: 2; extras go to `remaining`.

Fields of `TogglePausedInstructionAccounts`, in account order:

| #  | Field       | Type               |
| -- | ----------- | ------------------ |
| 0  | `authority` | `Pubkey`           |
| 1  | `config`    | `Pubkey`           |
| 2… | `remaining` | `Vec<AccountMeta>` |

### `UpdateConfig`

Discriminator `1d9efcbf0a53db63` · data `UpdateConfig` · accounts `UpdateConfigInstructionAccounts`.

| Field                                                        | Type     |
| ------------------------------------------------------------ | -------- |
| `new_protocol_fee_recipient`                                 | `Pubkey` |
| `new_virtual_sol_reserves`                                   | `u64`    |
| `new_virtual_token_reserves`                                 | `u64`    |
| `new_graduation_target`                                      | `u64`    |
| `new_graduation_fee`                                         | `u64`    |
| `new_damping_term`                                           | `u8`     |
| `new_swap_fee_basis_points`                                  | `u8`     |
| `new_token_for_stakers_basis_points`                         | `u16`    |
| `new_token_amount_for_raydium_liquidity`                     | `u64`    |
| `new_max_graduation_price_deviation_basis_points`            | `u16`    |
| `new_max_swap_amount_for_pool_price_correction_basis_points` | `u16`    |

Required accounts: 3; extras go to `remaining`.

Fields of `UpdateConfigInstructionAccounts`, in account order:

| #  | Field            | Type               |
| -- | ---------------- | ------------------ |
| 0  | `config`         | `Pubkey`           |
| 1  | `authority`      | `Pubkey`           |
| 2  | `system_program` | `Pubkey`           |
| 3… | `remaining`      | `Vec<AccountMeta>` |

### `CpiEvent`

Anchor self-CPI that carries one of the program's [events](#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:

| #  | Field             | Type               |
| -- | ----------------- | ------------------ |
| 0  | `program`         | `Pubkey`           |
| 1  | `event_authority` | `Pubkey`           |
| 2… | `remaining`       | `Vec<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`.

| Field                 | Type        | Description                                               |
| --------------------- | ----------- | --------------------------------------------------------- |
| `bump`                | `u8`        | Bump to identify PDA                                      |
| `disable_create_pool` | `bool`      | Status to control if new pool can be create               |
| `index`               | `u16`       | Config index                                              |
| `trade_fee_rate`      | `u64`       | The trade fee, denominated in hundredths of a bip (10^-6) |
| `protocol_fee_rate`   | `u64`       | The protocol fee                                          |
| `fund_fee_rate`       | `u64`       | The fund fee, denominated in hundredths of a bip (10^-6)  |
| `create_pool_fee`     | `u64`       | Fee for create a new pool                                 |
| `protocol_owner`      | `Pubkey`    | Address of the protocol fee owner                         |
| `fund_owner`          | `Pubkey`    | Address of the fund fee owner                             |
| `padding`             | `[u64; 16]` | padding                                                   |

### `BondingCurve`

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

| Field                            | Type                                        | Description                                                                                                                                                                                                                                                        |
| -------------------------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `creator`                        | `Pubkey`                                    |                                                                                                                                                                                                                                                                    |
| `mint`                           | `Pubkey`                                    |                                                                                                                                                                                                                                                                    |
| `virtual_sol_reserves`           | `u64`                                       |                                                                                                                                                                                                                                                                    |
| `virtual_token_reserves`         | `u64`                                       | virtual 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_target`              | `u64`                                       |                                                                                                                                                                                                                                                                    |
| `graduation_fee`                 | `u64`                                       |                                                                                                                                                                                                                                                                    |
| `sol_reserves`                   | `u64`                                       |                                                                                                                                                                                                                                                                    |
| `token_reserves`                 | `u64`                                       |                                                                                                                                                                                                                                                                    |
| `damping_term`                   | `u8`                                        | In reality, this is now more like a bonding_curve_selector                                                                                                                                                                                                         |
| `swap_fee_basis_points`          | `u8`                                        |                                                                                                                                                                                                                                                                    |
| `token_for_stakers_basis_points` | `u16`                                       |                                                                                                                                                                                                                                                                    |
| `status`                         | [`BondingCurveStatus`](#bondingcurvestatus) |                                                                                                                                                                                                                                                                    |

### `Config`

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

| Field                                                    | Type          |
| -------------------------------------------------------- | ------------- |
| `is_paused`                                              | `bool`        |
| `authority`                                              | `Pubkey`      |
| `pending_authority`                                      | `Pubkey`      |
| `operators`                                              | `Vec<Pubkey>` |
| `protocol_fee_recipient`                                 | `Pubkey`      |
| `token_distributor`                                      | `Pubkey`      |
| `virtual_sol_reserves`                                   | `u64`         |
| `virtual_token_reserves`                                 | `u64`         |
| `graduation_target`                                      | `u64`         |
| `graduation_fee`                                         | `u64`         |
| `damping_term`                                           | `u8`          |
| `token_for_stakers_basis_points`                         | `u16`         |
| `swap_fee_basis_points`                                  | `u8`          |
| `token_amount_for_raydium_liquidity`                     | `u64`         |
| `max_graduation_price_deviation_basis_points`            | `u16`         |
| `max_swap_amount_for_pool_price_correction_basis_points` | `u16`         |

### `LockedCpLiquidityState`

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

| Field                 | Type       | Description                                            |
| --------------------- | ---------- | ------------------------------------------------------ |
| `locked_lp_amount`    | `u64`      | The Locked liquidity amount without claimed lp fee     |
| `claimed_lp_amount`   | `u64`      | Claimed lp fee amount                                  |
| `unclaimed_lp_amount` | `u64`      | Unclaimed lp fee amount                                |
| `last_lp`             | `u64`      | Last updated cp pool lp total supply                   |
| `last_k`              | `u128`     | Last updated cp pool k                                 |
| `recent_epoch`        | `u64`      | Account update recent epoch                            |
| `pool_id`             | `Pubkey`   | The ID of the pool with which this record is connected |
| `fee_nft_mint`        | `Pubkey`   | nft mint to check who has authority to collect fee     |
| `locked_owner`        | `Pubkey`   | The owner who has locked liquidity                     |
| `locked_lp_mint`      | `Pubkey`   | The 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`.

| Field           | Type     |
| --------------- | -------- |
| `old_authority` | `Pubkey` |
| `new_authority` | `Pubkey` |

### `AuthorityTransferInitiatedEvent`

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

| Field           | Type     |
| --------------- | -------- |
| `old_authority` | `Pubkey` |
| `new_authority` | `Pubkey` |

### `BondingCurveDeployedEvent`

Discriminator `e150b222d927b894` · `events::bonding_curve_deployed_event::BondingCurveDeployedEventEvent`.

| Field     | Type     |
| --------- | -------- |
| `mint`    | `Pubkey` |
| `creator` | `Pubkey` |

### `BondingCurveDeployedFallbackEvent`

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

| Field     | Type     |
| --------- | -------- |
| `mint`    | `Pubkey` |
| `creator` | `Pubkey` |

### `BondingCurveVaultClosedEvent`

Discriminator `b9249c52bda4cf4f` · `events::bonding_curve_vault_closed_event::BondingCurveVaultClosedEventEvent`.

| Field       | Type     |
| ----------- | -------- |
| `mint`      | `Pubkey` |
| `recipient` | `Pubkey` |
| `amount`    | `u64`    |

### `ConfigUpdatedEvent`

Discriminator `f59e81633c64d6dc` · `events::config_updated_event::ConfigUpdatedEventEvent`.

| Field                                                    | Type     |
| -------------------------------------------------------- | -------- |
| `protocol_fee_recipient`                                 | `Pubkey` |
| `virtual_sol_reserves`                                   | `u64`    |
| `virtual_token_reserves`                                 | `u64`    |
| `graduation_target`                                      | `u64`    |
| `graduation_fee`                                         | `u64`    |
| `damping_term`                                           | `u8`     |
| `swap_fee_basis_points`                                  | `u8`     |
| `token_for_stakers_basis_points`                         | `u16`    |
| `token_amount_for_raydium_liquidity`                     | `u64`    |
| `max_graduation_price_deviation_basis_points`            | `u16`    |
| `max_swap_amount_for_pool_price_correction_basis_points` | `u16`    |

### `LiquidityDepositedIntoRaydiumEvent`

Discriminator `ec32611bc665f814` · `events::liquidity_deposited_into_raydium_event::LiquidityDepositedIntoRaydiumEventEvent`.

| Field              | Type     |
| ------------------ | -------- |
| `pool_state`       | `Pubkey` |
| `mint`             | `Pubkey` |
| `lp_token_amount`  | `u64`    |
| `tokens_deposited` | `u64`    |
| `wsol_deposited`   | `u64`    |

### `OperatorsAddedEvent`

Discriminator `f73a7038cbba7098` · `events::operators_added_event::OperatorsAddedEventEvent`.

| Field       | Type          |
| ----------- | ------------- |
| `operators` | `Vec<Pubkey>` |

### `OperatorsRemovedEvent`

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

| Field       | Type          |
| ----------- | ------------- |
| `operators` | `Vec<Pubkey>` |

### `PausedToggledEvent`

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

| Field       | Type   |
| ----------- | ------ |
| `is_paused` | `bool` |

### `PostGraduationTradingFeesSplitEvent`

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

| Field     | Type     |
| --------- | -------- |
| `amount`  | `u64`    |
| `creator` | `Pubkey` |

### `RaydiumLiquidityLockedEvent`

Discriminator `acbd08f189af3b64` · `events::raydium_liquidity_locked_event::RaydiumLiquidityLockedEventEvent`.

| Field        | Type     |
| ------------ | -------- |
| `pool_state` | `Pubkey` |
| `mint`       | `Pubkey` |
| `lp_amount`  | `u64`    |

### `RaydiumPoolCreatedEvent`

Discriminator `aab215d754de2265` · `events::raydium_pool_created_event::RaydiumPoolCreatedEventEvent`.

| Field        | Type     |
| ------------ | -------- |
| `pool_state` | `Pubkey` |
| `mint`       | `Pubkey` |

### `RaydiumRandomPoolCreatedEvent`

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

| Field        | Type     |
| ------------ | -------- |
| `pool_state` | `Pubkey` |
| `mint`       | `Pubkey` |

### `SwapSolForTokensOnRaydiumEvent`

Discriminator `f70108a6dd747162` · `events::swap_sol_for_tokens_on_raydium_event::SwapSolForTokensOnRaydiumEventEvent`.

| Field        | Type     |
| ------------ | -------- |
| `mint`       | `Pubkey` |
| `amount_in`  | `u64`    |
| `amount_out` | `u64`    |

### `SwapTokensForSolOnRaydiumEvent`

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

| Field        | Type     |
| ------------ | -------- |
| `mint`       | `Pubkey` |
| `amount_in`  | `u64`    |
| `amount_out` | `u64`    |

### `TokenBoughtEvent`

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

| Field        | Type     |
| ------------ | -------- |
| `mint`       | `Pubkey` |
| `amount_in`  | `u64`    |
| `amount_out` | `u64`    |
| `swap_fee`   | `u64`    |
| `buyer`      | `Pubkey` |
| `recipient`  | `Pubkey` |

### `TokenCreatedEvent`

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

| Field    | Type     |
| -------- | -------- |
| `name`   | `String` |
| `symbol` | `String` |
| `uri`    | `String` |

### `TokenCreatedFallbackEvent`

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

| Field    | Type     |
| -------- | -------- |
| `name`   | `String` |
| `symbol` | `String` |
| `uri`    | `String` |

### `TokenGraduatedEvent`

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

| Field                   | Type     |
| ----------------------- | -------- |
| `mint`                  | `Pubkey` |
| `sol_for_liquidity`     | `u64`    |
| `graduation_fee`        | `u64`    |
| `token_for_distributor` | `u64`    |

### `TokenSoldEvent`

Discriminator `ccefb64df1334d42` · `events::token_sold_event::TokenSoldEventEvent`.

| Field        | Type     |
| ------------ | -------- |
| `mint`       | `Pubkey` |
| `amount_in`  | `u64`    |
| `amount_out` | `u64`    |
| `swap_fee`   | `u64`    |
| `seller`     | `Pubkey` |
| `recipient`  | `Pubkey` |

### `TradingFeesCollectedEvent`

Discriminator `e13f1a3786f3d2cb` · `events::trading_fees_collected_event::TradingFeesCollectedEventEvent`.

| Field        | Type     |
| ------------ | -------- |
| `pool_state` | `Pubkey` |
| `mint`       | `Pubkey` |

### `TradingFeesCollectedV2Event`

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

| Field        | Type     |
| ------------ | -------- |
| `pool_state` | `Pubkey` |
| `mint`       | `Pubkey` |

### `TradingFeesSplitEvent`

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

| Field     | Type     |
| --------- | -------- |
| `amount`  | `u64`    |
| `creator` | `Pubkey` |

## 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`](#authoritytransfercancelledevent) event.

### `AuthorityTransferCompletedEvent`

Struct `types::AuthorityTransferCompletedEvent`. Same fields as the [`AuthorityTransferCompletedEvent`](#authoritytransfercompletedevent) event.

### `AuthorityTransferInitiatedEvent`

Struct `types::AuthorityTransferInitiatedEvent`. Same fields as the [`AuthorityTransferInitiatedEvent`](#authoritytransferinitiatedevent) event.

### `BondingCurveDeployedEvent`

Struct `types::BondingCurveDeployedEvent`. Same fields as the [`BondingCurveDeployedEvent`](#bondingcurvedeployedevent) event.

### `BondingCurveDeployedFallbackEvent`

Struct `types::BondingCurveDeployedFallbackEvent`. Same fields as the [`BondingCurveDeployedFallbackEvent`](#bondingcurvedeployedfallbackevent) event.

### `BondingCurveStatus`

Enum `types::BondingCurveStatus`.

| Variant                |
| ---------------------- |
| `Trading`              |
| `Graduated`            |
| `PoolPriceCorrected`   |
| `LiquidityProvisioned` |
| `LiquidityLocked`      |

### `BondingCurveVaultClosedEvent`

Struct `types::BondingCurveVaultClosedEvent`. Same fields as the [`BondingCurveVaultClosedEvent`](#bondingcurvevaultclosedevent) event.

### `ConfigUpdatedEvent`

Struct `types::ConfigUpdatedEvent`. Same fields as the [`ConfigUpdatedEvent`](#configupdatedevent) event.

### `LiquidityDepositedIntoRaydiumEvent`

Struct `types::LiquidityDepositedIntoRaydiumEvent`. Same fields as the [`LiquidityDepositedIntoRaydiumEvent`](#liquiditydepositedintoraydiumevent) event.

### `OperatorsAddedEvent`

Struct `types::OperatorsAddedEvent`. Same fields as the [`OperatorsAddedEvent`](#operatorsaddedevent) event.

### `OperatorsRemovedEvent`

Struct `types::OperatorsRemovedEvent`. Same fields as the [`OperatorsRemovedEvent`](#operatorsremovedevent) event.

### `PausedToggledEvent`

Struct `types::PausedToggledEvent`. Same fields as the [`PausedToggledEvent`](#pausedtoggledevent) event.

### `PostGraduationTradingFeesSplitEvent`

Struct `types::PostGraduationTradingFeesSplitEvent`. Same fields as the [`PostGraduationTradingFeesSplitEvent`](#postgraduationtradingfeessplitevent) event.

### `RaydiumLiquidityLockedEvent`

Struct `types::RaydiumLiquidityLockedEvent`. Same fields as the [`RaydiumLiquidityLockedEvent`](#raydiumliquiditylockedevent) event.

### `RaydiumPoolCreatedEvent`

Struct `types::RaydiumPoolCreatedEvent`. Same fields as the [`RaydiumPoolCreatedEvent`](#raydiumpoolcreatedevent) event.

### `RaydiumRandomPoolCreatedEvent`

Struct `types::RaydiumRandomPoolCreatedEvent`. Same fields as the [`RaydiumRandomPoolCreatedEvent`](#raydiumrandompoolcreatedevent) event.

### `SwapSolForTokensOnRaydiumEvent`

Struct `types::SwapSolForTokensOnRaydiumEvent`. Same fields as the [`SwapSolForTokensOnRaydiumEvent`](#swapsolfortokensonraydiumevent) event.

### `SwapTokensForSolOnRaydiumEvent`

Struct `types::SwapTokensForSolOnRaydiumEvent`. Same fields as the [`SwapTokensForSolOnRaydiumEvent`](#swaptokensforsolonraydiumevent) event.

### `TokenBoughtEvent`

Struct `types::TokenBoughtEvent`. Same fields as the [`TokenBoughtEvent`](#tokenboughtevent) event.

### `TokenCreatedEvent`

Struct `types::TokenCreatedEvent`. Same fields as the [`TokenCreatedEvent`](#tokencreatedevent) event.

### `TokenCreatedFallbackEvent`

Struct `types::TokenCreatedFallbackEvent`. Same fields as the [`TokenCreatedFallbackEvent`](#tokencreatedfallbackevent) event.

### `TokenGraduatedEvent`

Struct `types::TokenGraduatedEvent`. Same fields as the [`TokenGraduatedEvent`](#tokengraduatedevent) event.

### `TokenSoldEvent`

Struct `types::TokenSoldEvent`. Same fields as the [`TokenSoldEvent`](#tokensoldevent) event.

### `TradingFeesCollectedEvent`

Struct `types::TradingFeesCollectedEvent`. Same fields as the [`TradingFeesCollectedEvent`](#tradingfeescollectedevent) event.

### `TradingFeesCollectedV2Event`

Struct `types::TradingFeesCollectedV2Event`. Same fields as the [`TradingFeesCollectedV2Event`](#tradingfeescollectedv2event) event.

### `TradingFeesSplitEvent`

Struct `types::TradingFeesSplitEvent`. Same fields as the [`TradingFeesSplitEvent`](#tradingfeessplitevent) event.

---

Carbon 2.0.0 documentation · Web: https://carbon.sevenlabs.org/decoders/boop · Last updated 2026-11-09 · Index of all pages: https://carbon.sevenlabs.org/llms.txt
