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.
| Crate | carbon-boop-decoder 2.0.0 |
| Install | cargo add carbon-boop-decoder@2. |
| Program ID | boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4 (carbon_) |
| Category | Launchpads |
| Decoder | carbon_ |
| Instruction enum | instructions:: |
| Account enum | accounts:: |
| Event enum | instructions:: |
| Features | serde, postgres, graphql (none enabled by default) |
| API docs | docs.rs/carbon-boop-decoder/2.0.0 |
| Source | decoders/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:
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/fulluse {
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(())
}
}RUST_LOG=info cargo runEach 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:: (import instructions::); see Events. If CpiEvent never arrives, the program logs its events with emit! instead: decode them with decode_.
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:
cargo add carbon-rpc-program-subscribe-datasource@2.0.0 solana-client@4.2.2use {
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(())
}
}RUST_LOG=info cargo runEach 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::, where data and accounts are the types listed under the variant, exported from carbon_. 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:
- The instruction's program ID is
boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4. - The data starts with the variant's discriminator, and the rest deserializes into its data type.
- 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_ too. Accounts after the listed ones are in accounts. as AccountMetas. The decoder doesn't record whether an account signed or was writable: read that from input. and ., 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_ | Pubkey |
| 3… | remaining | Vec< |
BuyToken#
Discriminator 8a7f0e5b26577369 · data BuyToken · accounts BuyTokenInstructionAccounts.
| Field | Type |
|---|---|
buy_amount | u64 |
amount_ | u64 |
Required accounts: 13; extras go to remaining.
Fields of BuyTokenInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | mint | Pubkey |
| 1 | bonding_ | Pubkey |
| 2 | trading_ | Pubkey |
| 3 | bonding_ | Pubkey |
| 4 | bonding_ | Pubkey |
| 5 | recipient_ | Pubkey |
| 6 | buyer | Pubkey |
| 7 | config | Pubkey |
| 8 | vault_ | Pubkey |
| 9 | wsol | Pubkey |
| 10 | system_ | Pubkey |
| 11 | token_ | Pubkey |
| 12 | associated_ | Pubkey |
| 13… | remaining | Vec< |
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_ | Pubkey |
| 3… | remaining | Vec< |
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_ | Pubkey |
| 3 | bonding_ | Pubkey |
| 4 | bonding_ | Pubkey |
| 5 | mint | Pubkey |
| 6 | recipient_ | Pubkey |
| 7 | recipient | Pubkey |
| 8 | token_ | Pubkey |
| 9 | system_ | Pubkey |
| 10 | associated_ | Pubkey |
| 11 | rent | Pubkey |
| 12… | remaining | Vec< |
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_ | Pubkey |
| 2 | config | Pubkey |
| 3 | pool_ | Pubkey |
| 4 | pool | Pubkey |
| 5 | position | Pubkey |
| 6 | token_ | Pubkey |
| 7 | token_ | Pubkey |
| 8 | token_ | Pubkey |
| 9 | token_ | Pubkey |
| 10 | token_ | Pubkey |
| 11 | token_ | Pubkey |
| 12 | position_ | Pubkey |
| 13 | vault_ | Pubkey |
| 14 | token_ | Pubkey |
| 15 | associated_ | Pubkey |
| 16 | event_ | Pubkey |
| 17 | cp_ | Pubkey |
| 18… | remaining | Vec< |
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_ | Pubkey |
| 2 | config | Pubkey |
| 3 | pool_ | Pubkey |
| 4 | pool | Pubkey |
| 5 | position | Pubkey |
| 6 | token_ | Pubkey |
| 7 | token_ | Pubkey |
| 8 | token_ | Pubkey |
| 9 | token_ | Pubkey |
| 10 | token_ | Pubkey |
| 11 | token_ | Pubkey |
| 12 | position_ | Pubkey |
| 13 | vault_ | Pubkey |
| 14 | token_ | Pubkey |
| 15 | associated_ | Pubkey |
| 16 | event_ | Pubkey |
| 17 | cp_ | Pubkey |
| 18 | system_ | Pubkey |
| 19… | remaining | Vec< |
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_ | Pubkey |
| 2 | config | Pubkey |
| 3 | lock_ | Pubkey |
| 4 | vault_ | Pubkey |
| 5 | authority | Pubkey |
| 6 | fee_ | Pubkey |
| 7 | locked_ | Pubkey |
| 8 | cpmm_ | Pubkey |
| 9 | cp_ | Pubkey |
| 10 | pool_state | Pubkey |
| 11 | lp_mint | Pubkey |
| 12 | recipient_ | Pubkey |
| 13 | recipient_ | Pubkey |
| 14 | token0_ | Pubkey |
| 15 | token1_ | Pubkey |
| 16 | vault0_mint | Pubkey |
| 17 | vault1_mint | Pubkey |
| 18 | locked_ | Pubkey |
| 19 | system_ | Pubkey |
| 20 | associated_ | Pubkey |
| 21 | token_ | Pubkey |
| 22 | token_ | Pubkey |
| 23 | memo_ | Pubkey |
| 24… | remaining | Vec< |
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_ | Pubkey |
| 2 | config | Pubkey |
| 3 | lock_ | Pubkey |
| 4 | vault_ | Pubkey |
| 5 | authority | Pubkey |
| 6 | fee_ | Pubkey |
| 7 | locked_ | Pubkey |
| 8 | cpmm_ | Pubkey |
| 9 | cp_ | Pubkey |
| 10 | pool_state | Pubkey |
| 11 | lp_mint | Pubkey |
| 12 | recipient_ | Pubkey |
| 13 | recipient_ | Pubkey |
| 14 | token0_ | Pubkey |
| 15 | token1_ | Pubkey |
| 16 | vault0_mint | Pubkey |
| 17 | vault1_mint | Pubkey |
| 18 | locked_ | Pubkey |
| 19 | system_ | Pubkey |
| 20 | associated_ | Pubkey |
| 21 | token_ | Pubkey |
| 22 | token_ | Pubkey |
| 23 | memo_ | Pubkey |
| 24… | remaining | Vec< |
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_ | Pubkey |
| 1 | config | Pubkey |
| 2 | system_ | Pubkey |
| 3… | remaining | Vec< |
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_ | Pubkey |
| 3 | cp_ | Pubkey |
| 4 | pool_ | Pubkey |
| 5 | pool | Pubkey |
| 6 | position | Pubkey |
| 7 | position_ | Pubkey |
| 8 | position_ | Pubkey |
| 9 | token_ | Pubkey |
| 10 | token_ | Pubkey |
| 11 | token_ | Pubkey |
| 12 | token_ | Pubkey |
| 13 | bonding_ | Pubkey |
| 14 | bonding_ | Pubkey |
| 15 | bonding_ | Pubkey |
| 16 | token_ | Pubkey |
| 17 | token2022_ | Pubkey |
| 18 | system_ | Pubkey |
| 19 | event_ | Pubkey |
| 20 | cp_ | Pubkey |
| 21… | remaining | Vec< |
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_ | 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_ | Pubkey |
| 8 | bonding_ | Pubkey |
| 9 | bonding_ | Pubkey |
| 10 | bonding_ | Pubkey |
| 11 | creator_ | Pubkey |
| 12 | token0_ | Pubkey |
| 13 | token1_ | Pubkey |
| 14 | create_ | Pubkey |
| 15 | observation_ | Pubkey |
| 16 | operator | Pubkey |
| 17 | config | Pubkey |
| 18 | token_ | Pubkey |
| 19 | associated_ | Pubkey |
| 20 | system_ | Pubkey |
| 21 | rent | Pubkey |
| 22… | remaining | Vec< |
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_ | 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_ | Pubkey |
| 8 | bonding_ | Pubkey |
| 9 | bonding_ | Pubkey |
| 10 | bonding_ | Pubkey |
| 11 | creator_ | Pubkey |
| 12 | token0_ | Pubkey |
| 13 | token1_ | Pubkey |
| 14 | create_ | Pubkey |
| 15 | observation_ | Pubkey |
| 16 | operator | Pubkey |
| 17 | config | Pubkey |
| 18 | token_ | Pubkey |
| 19 | associated_ | Pubkey |
| 20 | system_ | Pubkey |
| 21 | rent | Pubkey |
| 22… | remaining | Vec< |
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_ | Pubkey |
| 6 | token_ | Pubkey |
| 7 | token_ | Pubkey |
| 8… | remaining | Vec< |
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_ | Pubkey |
| 6 | token_ | Pubkey |
| 7 | token_ | Pubkey |
| 8… | remaining | Vec< |
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_ | Pubkey |
| 2 | bonding_ | Pubkey |
| 3 | bonding_ | Pubkey |
| 4 | bonding_ | Pubkey |
| 5 | config | Pubkey |
| 6 | payer | Pubkey |
| 7 | system_ | Pubkey |
| 8 | token_ | Pubkey |
| 9 | associated_ | Pubkey |
| 10… | remaining | Vec< |
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_ | Pubkey |
| 2 | bonding_ | Pubkey |
| 3 | bonding_ | Pubkey |
| 4 | bonding_ | Pubkey |
| 5 | config | Pubkey |
| 6 | payer | Pubkey |
| 7 | system_ | Pubkey |
| 8 | token_ | Pubkey |
| 9 | associated_ | Pubkey |
| 10… | remaining | Vec< |
DepositIntoRaydium#
Discriminator a859631e753158e0 · data DepositIntoRaydium · accounts DepositIntoRaydiumInstructionAccounts.
| Field | Type |
|---|---|
lp_ | u64 |
maximum_ | u64 |
maximum_ | 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_ | Pubkey |
| 4 | vault_ | Pubkey |
| 5 | authority | Pubkey |
| 6 | pool_state | Pubkey |
| 7 | token0_ | Pubkey |
| 8 | token1_ | Pubkey |
| 9 | bonding_ | Pubkey |
| 10 | bonding_ | Pubkey |
| 11 | token_ | Pubkey |
| 12 | token_ | Pubkey |
| 13 | system_ | Pubkey |
| 14 | associated_ | Pubkey |
| 15 | lp_mint | Pubkey |
| 16 | cpmm_ | Pubkey |
| 17 | owner_ | Pubkey |
| 18 | bonding_ | Pubkey |
| 19 | token0_mint | Pubkey |
| 20 | token1_mint | Pubkey |
| 21… | remaining | Vec< |
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_ | Pubkey |
| 3 | token_ | Pubkey |
| 4 | token_ | Pubkey |
| 5 | vault_ | Pubkey |
| 6 | bonding_ | Pubkey |
| 7 | bonding_ | Pubkey |
| 8 | bonding_ | Pubkey |
| 9 | bonding_ | Pubkey |
| 10 | operator | Pubkey |
| 11 | config | Pubkey |
| 12 | system_ | Pubkey |
| 13 | token_ | Pubkey |
| 14 | associated_ | Pubkey |
| 15… | remaining | Vec< |
Initialize#
Discriminator afaf6d1f0d989bed · data Initialize · accounts InitializeInstructionAccounts.
| Field | Type |
|---|---|
protocol_ | Pubkey |
token_ | Pubkey |
Required accounts: 3; extras go to remaining.
Fields of InitializeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | config | Pubkey |
| 1 | authority | Pubkey |
| 2 | system_ | Pubkey |
| 3… | remaining | Vec< |
InitiateAuthorityTransfer#
Discriminator d22b65d7778c6ada · data InitiateAuthorityTransfer · accounts InitiateAuthorityTransferInstructionAccounts.
| Field | Type |
|---|---|
new_ | Pubkey |
Required accounts: 3; extras go to remaining.
Fields of InitiateAuthorityTransferInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | authority | Pubkey |
| 1 | config | Pubkey |
| 2 | system_ | Pubkey |
| 3… | remaining | Vec< |
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_ | Pubkey |
| 1 | vault_ | Pubkey |
| 2 | authority | Pubkey |
| 3 | fee_ | Pubkey |
| 4 | fee_ | Pubkey |
| 5 | fee_ | Pubkey |
| 6 | pool_state | Pubkey |
| 7 | locked_ | Pubkey |
| 8 | lp_mint | Pubkey |
| 9 | liquidity_ | Pubkey |
| 10 | locked_ | Pubkey |
| 11 | token0_ | Pubkey |
| 12 | token1_ | Pubkey |
| 13 | operator | Pubkey |
| 14 | config | Pubkey |
| 15 | bonding_ | Pubkey |
| 16 | metadata_ | Pubkey |
| 17 | rent | Pubkey |
| 18 | system_ | Pubkey |
| 19 | token_ | Pubkey |
| 20 | associated_ | Pubkey |
| 21 | metadata_ | Pubkey |
| 22… | remaining | Vec< |
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_ | Pubkey |
| 3… | remaining | Vec< |
SellToken#
Discriminator 6d3d28bbe6b087ae · data SellToken · accounts SellTokenInstructionAccounts.
| Field | Type |
|---|---|
sell_amount | u64 |
amount_ | u64 |
Required accounts: 12; extras go to remaining.
Fields of SellTokenInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | mint | Pubkey |
| 1 | bonding_ | Pubkey |
| 2 | trading_ | Pubkey |
| 3 | bonding_ | Pubkey |
| 4 | bonding_ | Pubkey |
| 5 | seller_ | Pubkey |
| 6 | seller | Pubkey |
| 7 | recipient | Pubkey |
| 8 | config | Pubkey |
| 9 | system_ | Pubkey |
| 10 | token_ | Pubkey |
| 11 | associated_ | Pubkey |
| 12… | remaining | Vec< |
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_ | Pubkey |
| 5 | bonding_ | Pubkey |
| 6 | trading_ | Pubkey |
| 7 | fee_ | Pubkey |
| 8 | system_ | Pubkey |
| 9 | token_ | Pubkey |
| 10 | associated_ | Pubkey |
| 11 | fee_ | Pubkey |
| 12 | fee_ | Pubkey |
| 13 | fee_ | Pubkey |
| 14 | fee_ | Pubkey |
| 15 | fee_ | Pubkey |
| 16 | fee_ | Pubkey |
| 17 | fee_ | Pubkey |
| 18 | fee_ | Pubkey |
| 19 | fee_ | Pubkey |
| 20 | fee_ | Pubkey |
| 21 | fee_ | Pubkey |
| 22 | fee_ | Pubkey |
| 23 | fee_ | Pubkey |
| 24… | remaining | Vec< |
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_ | Pubkey |
| 5 | bonding_ | Pubkey |
| 6 | trading_ | Pubkey |
| 7 | fee_ | Pubkey |
| 8 | system_ | Pubkey |
| 9 | token_ | Pubkey |
| 10 | associated_ | Pubkey |
| 11 | fee_ | Pubkey |
| 12 | fee_ | Pubkey |
| 13 | fee_ | Pubkey |
| 14 | fee_ | Pubkey |
| 15 | fee_ | Pubkey |
| 16 | fee_ | Pubkey |
| 17 | fee_ | Pubkey |
| 18 | fee_ | Pubkey |
| 19 | fee_ | Pubkey |
| 20 | fee_ | Pubkey |
| 21 | fee_ | Pubkey |
| 22 | fee_ | Pubkey |
| 23 | fee_ | Pubkey |
| 24… | remaining | Vec< |
SwapSolForTokensOnRaydium#
Discriminator 6bf883ef98ea3623 · data SwapSolForTokensOnRaydium · accounts SwapSolForTokensOnRaydiumInstructionAccounts.
| Field | Type |
|---|---|
amount_in | u64 |
minimum_ | u64 |
Required accounts: 16; extras go to remaining.
Fields of SwapSolForTokensOnRaydiumInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | config | Pubkey |
| 1 | bonding_ | Pubkey |
| 2 | amm_config | Pubkey |
| 3 | operator | Pubkey |
| 4 | vault_ | Pubkey |
| 5 | authority | Pubkey |
| 6 | pool_state | Pubkey |
| 7 | input_vault | Pubkey |
| 8 | output_ | Pubkey |
| 9 | bonding_ | Pubkey |
| 10 | bonding_ | Pubkey |
| 11 | output_ | Pubkey |
| 12 | input_ | Pubkey |
| 13 | token_ | Pubkey |
| 14 | cp_ | Pubkey |
| 15 | observation_ | Pubkey |
| 16… | remaining | Vec< |
SwapTokensForSolOnRaydium#
Discriminator d8ac82942262d7a3 · data SwapTokensForSolOnRaydium · accounts SwapTokensForSolOnRaydiumInstructionAccounts.
| Field | Type |
|---|---|
amount_in | u64 |
minimum_ | u64 |
Required accounts: 16; extras go to remaining.
Fields of SwapTokensForSolOnRaydiumInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | config | Pubkey |
| 1 | bonding_ | Pubkey |
| 2 | amm_config | Pubkey |
| 3 | operator | Pubkey |
| 4 | vault_ | Pubkey |
| 5 | authority | Pubkey |
| 6 | pool_state | Pubkey |
| 7 | input_vault | Pubkey |
| 8 | output_ | Pubkey |
| 9 | bonding_ | Pubkey |
| 10 | bonding_ | Pubkey |
| 11 | input_ | Pubkey |
| 12 | output_ | Pubkey |
| 13 | token_ | Pubkey |
| 14 | cp_ | Pubkey |
| 15 | observation_ | Pubkey |
| 16… | remaining | Vec< |
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< |
UpdateConfig#
Discriminator 1d9efcbf0a53db63 · data UpdateConfig · accounts UpdateConfigInstructionAccounts.
| Field | Type |
|---|---|
new_ | Pubkey |
new_ | u64 |
new_ | u64 |
new_ | u64 |
new_ | u64 |
new_ | u8 |
new_ | u8 |
new_ | u16 |
new_ | u64 |
new_ | u16 |
new_ | u16 |
Required accounts: 3; extras go to remaining.
Fields of UpdateConfigInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | config | Pubkey |
| 1 | authority | Pubkey |
| 2 | system_ | Pubkey |
| 3… | remaining | Vec< |
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:
| # | Field | Type |
|---|---|---|
| 0 | program | Pubkey |
| 1 | event_ | Pubkey |
| 2… | remaining | Vec< |
Accounts#
Variants of BoopAccount. Each wraps a boxed struct from carbon_. decode_ only considers accounts owned by PROGRAM_ID and returns the first variant that matches.
AmmConfig#
Discriminator daf42168cbcb2b6f · accounts::.
| Field | Type | Description |
|---|---|---|
bump | u8 | Bump to identify PDA |
disable_ | bool | Status to control if new pool can be create |
index | u16 | Config index |
trade_ | u64 | The trade fee, denominated in hundredths of a bip (10^-6) |
protocol_ | u64 | The protocol fee |
fund_ | u64 | The fund fee, denominated in hundredths of a bip (10^-6) |
create_ | u64 | Fee for create a new pool |
protocol_ | Pubkey | Address of the protocol fee owner |
fund_owner | Pubkey | Address of the fund fee owner |
padding | [u64; 16] | padding |
BondingCurve#
Discriminator 17b7f83760d8ac60 · accounts::.
| Field | Type | Description |
|---|---|---|
creator | Pubkey | |
mint | Pubkey | |
virtual_ | u64 | |
virtual_ | 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_ | u64 | |
graduation_ | u64 | |
sol_ | u64 | |
token_ | u64 | |
damping_ | u8 | In reality, this is now more like a bonding_curve_selector |
swap_ | u8 | |
token_ | u16 | |
status | BondingCurveStatus |
Config#
Discriminator 9b0caae01efacc82 · accounts::.
| Field | Type |
|---|---|
is_paused | bool |
authority | Pubkey |
pending_ | Pubkey |
operators | Vec<Pubkey> |
protocol_ | Pubkey |
token_ | Pubkey |
virtual_ | u64 |
virtual_ | u64 |
graduation_ | u64 |
graduation_ | u64 |
damping_ | u8 |
token_ | u16 |
swap_ | u8 |
token_ | u64 |
max_ | u16 |
max_ | u16 |
LockedCpLiquidityState#
Discriminator 190aeec5cfea4916 · accounts::.
| Field | Type | Description |
|---|---|---|
locked_ | u64 | The Locked liquidity amount without claimed lp fee |
claimed_ | u64 | Claimed lp fee amount |
unclaimed_ | u64 | Unclaimed lp fee amount |
last_lp | u64 | Last updated cp pool lp total supply |
last_k | u128 | Last updated cp pool k |
recent_ | u64 | Account update recent epoch |
pool_id | Pubkey | The ID of the pool with which this record is connected |
fee_ | Pubkey | nft mint to check who has authority to collect fee |
locked_ | Pubkey | The owner who has locked liquidity |
locked_ | Pubkey | The mint of locked lp token |
padding | [u64; 8] | Unused bytes for future upgrades. |
Events#
Variants of instructions::, decoded from the CpiEvent instruction. Each wraps a struct from carbon_. The discriminator is the 8-byte event discriminator that follows the e445a52e51cb9a1d CPI-event tag.
AuthorityTransferCancelledEvent#
Discriminator c0798ce0e5600d8f · events::.
No fields.
AuthorityTransferCompletedEvent#
Discriminator a384d980f35c5af9 · events::.
| Field | Type |
|---|---|
old_ | Pubkey |
new_ | Pubkey |
AuthorityTransferInitiatedEvent#
Discriminator 79f65f9be56d94cd · events::.
| Field | Type |
|---|---|
old_ | Pubkey |
new_ | Pubkey |
BondingCurveDeployedEvent#
Discriminator e150b222d927b894 · events::.
| Field | Type |
|---|---|
mint | Pubkey |
creator | Pubkey |
BondingCurveDeployedFallbackEvent#
Discriminator 6afcf373c79ff71f · events::.
| Field | Type |
|---|---|
mint | Pubkey |
creator | Pubkey |
BondingCurveVaultClosedEvent#
Discriminator b9249c52bda4cf4f · events::.
| Field | Type |
|---|---|
mint | Pubkey |
recipient | Pubkey |
amount | u64 |
ConfigUpdatedEvent#
Discriminator f59e81633c64d6dc · events::.
| Field | Type |
|---|---|
protocol_ | Pubkey |
virtual_ | u64 |
virtual_ | u64 |
graduation_ | u64 |
graduation_ | u64 |
damping_ | u8 |
swap_ | u8 |
token_ | u16 |
token_ | u64 |
max_ | u16 |
max_ | u16 |
LiquidityDepositedIntoRaydiumEvent#
Discriminator ec32611bc665f814 · events::.
| Field | Type |
|---|---|
pool_state | Pubkey |
mint | Pubkey |
lp_ | u64 |
tokens_ | u64 |
wsol_ | u64 |
OperatorsAddedEvent#
Discriminator f73a7038cbba7098 · events::.
| Field | Type |
|---|---|
operators | Vec<Pubkey> |
OperatorsRemovedEvent#
Discriminator 2c484b46972a3559 · events::.
| Field | Type |
|---|---|
operators | Vec<Pubkey> |
PausedToggledEvent#
Discriminator 8fdee4e006e640b0 · events::.
| Field | Type |
|---|---|
is_paused | bool |
PostGraduationTradingFeesSplitEvent#
Discriminator 22e7105124cb9ec4 · events::.
| Field | Type |
|---|---|
amount | u64 |
creator | Pubkey |
RaydiumLiquidityLockedEvent#
Discriminator acbd08f189af3b64 · events::.
| Field | Type |
|---|---|
pool_state | Pubkey |
mint | Pubkey |
lp_amount | u64 |
RaydiumPoolCreatedEvent#
Discriminator aab215d754de2265 · events::.
| Field | Type |
|---|---|
pool_state | Pubkey |
mint | Pubkey |
RaydiumRandomPoolCreatedEvent#
Discriminator 98fb80989eeb5335 · events::.
| Field | Type |
|---|---|
pool_state | Pubkey |
mint | Pubkey |
SwapSolForTokensOnRaydiumEvent#
Discriminator f70108a6dd747162 · events::.
| Field | Type |
|---|---|
mint | Pubkey |
amount_in | u64 |
amount_out | u64 |
SwapTokensForSolOnRaydiumEvent#
Discriminator 4cf9dda241467620 · events::.
| Field | Type |
|---|---|
mint | Pubkey |
amount_in | u64 |
amount_out | u64 |
TokenBoughtEvent#
Discriminator 4759de7cd7c0e68a · events::.
| Field | Type |
|---|---|
mint | Pubkey |
amount_in | u64 |
amount_out | u64 |
swap_fee | u64 |
buyer | Pubkey |
recipient | Pubkey |
TokenCreatedEvent#
Discriminator 607a718a32e39539 · events::.
| Field | Type |
|---|---|
name | String |
symbol | String |
uri | String |
TokenCreatedFallbackEvent#
Discriminator 9dca235ca5a32738 · events::.
| Field | Type |
|---|---|
name | String |
symbol | String |
uri | String |
TokenGraduatedEvent#
Discriminator 49746f1a5cd9928d · events::.
| Field | Type |
|---|---|
mint | Pubkey |
sol_ | u64 |
graduation_ | u64 |
token_ | u64 |
TokenSoldEvent#
Discriminator ccefb64df1334d42 · events::.
| Field | Type |
|---|---|
mint | Pubkey |
amount_in | u64 |
amount_out | u64 |
swap_fee | u64 |
seller | Pubkey |
recipient | Pubkey |
TradingFeesCollectedEvent#
Discriminator e13f1a3786f3d2cb · events::.
| Field | Type |
|---|---|
pool_state | Pubkey |
mint | Pubkey |
TradingFeesCollectedV2Event#
Discriminator 17f682fa0b31f0b3 · events::.
| Field | Type |
|---|---|
pool_state | Pubkey |
mint | Pubkey |
TradingFeesSplitEvent#
Discriminator 713c9f11fdae877a · events::.
| Field | Type |
|---|---|
amount | u64 |
creator | Pubkey |
Types#
Types used by the instructions, accounts and events above, exported from carbon_.
AuthorityTransferCancelledEvent#
Struct types::. Same fields as the AuthorityTransferCancelledEvent event.
AuthorityTransferCompletedEvent#
Struct types::. Same fields as the AuthorityTransferCompletedEvent event.
AuthorityTransferInitiatedEvent#
Struct types::. Same fields as the AuthorityTransferInitiatedEvent event.
BondingCurveDeployedEvent#
Struct types::. Same fields as the BondingCurveDeployedEvent event.
BondingCurveDeployedFallbackEvent#
Struct types::. Same fields as the BondingCurveDeployedFallbackEvent event.
BondingCurveStatus#
Enum types::.
| Variant |
|---|
Trading |
Graduated |
PoolPriceCorrected |
LiquidityProvisioned |
LiquidityLocked |
BondingCurveVaultClosedEvent#
Struct types::. Same fields as the BondingCurveVaultClosedEvent event.
ConfigUpdatedEvent#
Struct types::. Same fields as the ConfigUpdatedEvent event.
LiquidityDepositedIntoRaydiumEvent#
Struct types::. Same fields as the LiquidityDepositedIntoRaydiumEvent event.
OperatorsAddedEvent#
Struct types::. Same fields as the OperatorsAddedEvent event.
OperatorsRemovedEvent#
Struct types::. Same fields as the OperatorsRemovedEvent event.
PausedToggledEvent#
Struct types::. Same fields as the PausedToggledEvent event.
PostGraduationTradingFeesSplitEvent#
Struct types::. Same fields as the PostGraduationTradingFeesSplitEvent event.
RaydiumLiquidityLockedEvent#
Struct types::. Same fields as the RaydiumLiquidityLockedEvent event.
RaydiumPoolCreatedEvent#
Struct types::. Same fields as the RaydiumPoolCreatedEvent event.
RaydiumRandomPoolCreatedEvent#
Struct types::. Same fields as the RaydiumRandomPoolCreatedEvent event.
SwapSolForTokensOnRaydiumEvent#
Struct types::. Same fields as the SwapSolForTokensOnRaydiumEvent event.
SwapTokensForSolOnRaydiumEvent#
Struct types::. Same fields as the SwapTokensForSolOnRaydiumEvent event.
TokenBoughtEvent#
Struct types::. Same fields as the TokenBoughtEvent event.
TokenCreatedEvent#
Struct types::. Same fields as the TokenCreatedEvent event.
TokenCreatedFallbackEvent#
Struct types::. Same fields as the TokenCreatedFallbackEvent event.
TokenGraduatedEvent#
Struct types::. Same fields as the TokenGraduatedEvent event.
TokenSoldEvent#
Struct types::. Same fields as the TokenSoldEvent event.
TradingFeesCollectedEvent#
Struct types::. Same fields as the TradingFeesCollectedEvent event.
TradingFeesCollectedV2Event#
Struct types::. Same fields as the TradingFeesCollectedV2Event event.
TradingFeesSplitEvent#
Struct types::. Same fields as the TradingFeesSplitEvent event.