Heaven decoder

Decode Heaven instructions, accounts and events in Rust with carbon-heaven-decoder 2.0.0. Program ID HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o.

On this page

carbon-heaven-decoder decodes the instructions, accounts and events of the Heaven program (HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o): 54 instructions, 6 account types, 7 events. It is generated with Codama from the program's IDL; see decoders for how decoders plug into a pipeline.

Cratecarbon-heaven-decoder 2.0.0
Installcargo add carbon-heaven-decoder@2.0.0
Program IDHEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o (carbon_heaven_decoder::PROGRAM_ID)
CategoryDEX & AMM
Decodercarbon_heaven_decoder::HeavenDecoder
Instruction enuminstructions::HeavenInstruction
Account enumaccounts::HeavenAccount
Event enuminstructions::CpiEvent
Featuresserde, postgres, graphql (none enabled by default)
API docsdocs.rs/carbon-heaven-decoder/2.0.0
Sourcedecoders/heaven-decoder

Other DEX and AMM decoders: BonkSwap, FluxBeam, Gavel, Jupiter Limit Order, Jupiter Limit Order v2, Kamino Limit Order, Lifinity AMM v2, Meteora DAMM v2, Meteora DLMM, Meteora Pools, OpenBook v2, Orca Whirlpools, PancakeSwap, Phoenix v1, PumpSwap, Raydium AMM v4, Raydium CLMM, Raydium CPMM, Raydium Stable Swap, Stabble Stable Swap, Stabble Weighted Swap. To decode several in one pipeline, see dEX and AMM 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 Heaven transactions from the public RPC and prints every decoded Buy instruction. Add the dependencies:

Terminal
cargo add carbon-core@2.0.0 carbon-heaven-decoder@2.0.0 carbon-rpc-transaction-crawler-datasource@2.0.0 carbon-log-metrics@2.0.0 env_logger tokio --features tokio/full
src/main.rs
use {
    carbon_core::{
        error::CarbonResult, instruction::InstructionProcessorInputType, pipeline::Pipeline,
        processor::Processor,
    },
    carbon_log_metrics::LogMetrics,
    carbon_heaven_decoder::{instructions::HeavenInstruction, HeavenDecoder, 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(HeavenDecoder, InstructionLogger)
        .build()?
        .run()
        .await
}

struct InstructionLogger;

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

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

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

Decode accounts#

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

Terminal
cargo add carbon-rpc-program-subscribe-datasource@2.0.0 solana-client@4.2.2
src/main.rs
use {
    carbon_core::{
        account::AccountProcessorInputType, error::CarbonResult, pipeline::Pipeline,
        processor::Processor,
    },
    carbon_log_metrics::LogMetrics,
    carbon_heaven_decoder::{accounts::HeavenAccount, HeavenDecoder, 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(HeavenDecoder, AccountLogger)
        .build()?
        .run()
        .await
}

struct AccountLogger;

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

Each update to a LiquidityPoolState 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 HeavenInstruction. Each is HeavenInstruction::<Variant> { program_id, data, accounts }, where data and accounts are the types listed under the variant, exported from carbon_heaven_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 HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o.
  2. The data starts with the variant's discriminator, and the rest deserializes into its data type.
  3. The instruction has at least as many accounts as the variant requires (the "Required accounts" count under each variant).

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

AddLiquidityProPool#

Discriminator 7d3b6c2a121c2207 · data AddLiquidityProPool · accounts AddLiquidityProPoolInstructionAccounts.

FieldType
paramsAddLiquidityParams

Required accounts: 15; extras go to remaining.

Fields of AddLiquidityProPoolInstructionAccounts, in account order:

#FieldType
0token_a_programPubkey
1token_b_programPubkey
2associated_token_programPubkey
3system_programPubkey
4liquidity_pool_statePubkey
5userPubkey
6payerPubkey
7token_a_mintPubkey
8token_b_mintPubkey
9user_token_a_vaultPubkey
10user_token_b_vaultPubkey
11token_a_vaultPubkey
12token_b_vaultPubkey
13protocol_configPubkey
14user_lp_positionPubkey
15…remainingVec<AccountMeta>

AdminBorrowSol#

Discriminator cc485fd7acc089fc · data AdminBorrowSol · accounts AdminBorrowSolInstructionAccounts.

FieldType
versionu16
amountu64

Required accounts: 10; extras go to remaining.

Fields of AdminBorrowSolInstructionAccounts, in account order:

#FieldType
0token_programPubkey
1associated_token_programPubkey
2payerPubkey
3adminPubkey
4protocol_config_statePubkey
5system_programPubkey
6protocol_staking_admin_statePubkey
7address_lookup_programPubkey
8instruction_sysvar_account_infoPubkey
9temp_sol_holderPubkey
10…remainingVec<AccountMeta>

AdminClaimMsol#

Discriminator 7c303cc7cb312429 · data AdminClaimMsol · accounts AdminClaimMsolInstructionAccounts.

FieldType
versionu16
ticket_numberu32

Required accounts: 10; extras go to remaining.

Fields of AdminClaimMsolInstructionAccounts, in account order:

#FieldType
0token_programPubkey
1associated_token_programPubkey
2payerPubkey
3adminPubkey
4protocol_config_statePubkey
5system_programPubkey
6protocol_staking_admin_statePubkey
7msol_ticketPubkey
8msol_mintPubkey
9msol_ticket_sol_spentPubkey
10…remainingVec<AccountMeta>

AdminClaimProCreatorTradingFees#

Discriminator 4482fa483c5e1f16 · data AdminClaimProCreatorTradingFees · accounts AdminClaimProCreatorTradingFeesInstructionAccounts.

FieldType
amountu64

Required accounts: 16; extras go to remaining.

Fields of AdminClaimProCreatorTradingFeesInstructionAccounts, in account order:

#FieldType
0token_a_programPubkey
1token_b_programPubkey
2associated_token_programPubkey
3system_programPubkey
4liquidity_pool_statePubkey
5userPubkey
6token_a_mintPubkey
7token_b_mintPubkey
8user_token_a_vaultPubkey
9user_token_b_vaultPubkey
10token_a_vaultPubkey
11token_b_vaultPubkey
12protocol_configPubkey
13instruction_sysvar_account_infoPubkey
14protocol_adminPubkey
15protocol_admin_statePubkey
16…remainingVec<AccountMeta>

AdminClaimStakingRewards#

Discriminator 18a3dcabe1dea6f8 · data AdminClaimStakingRewards · accounts AdminClaimStakingRewardsInstructionAccounts.

FieldType
versionu16
amountu64

Required accounts: 10; extras go to remaining.

Fields of AdminClaimStakingRewardsInstructionAccounts, in account order:

#FieldType
0token_programPubkey
1associated_token_programPubkey
2payerPubkey
3adminPubkey
4protocol_config_statePubkey
5protocol_config_wsol_vaultPubkey
6system_programPubkey
7protocol_staking_admin_statePubkey
8wsol_token_vaultPubkey
9wsol_mintPubkey
10…remainingVec<AccountMeta>

AdminClaimStandardCreatorTradingFees#

Discriminator b627a819603f4c11 · data AdminClaimStandardCreatorTradingFees · accounts AdminClaimStandardCreatorTradingFeesInstructionAccounts.

FieldType
amountu64

Required accounts: 16; extras go to remaining.

Fields of AdminClaimStandardCreatorTradingFeesInstructionAccounts, in account order:

#FieldType
0token_a_programPubkey
1token_b_programPubkey
2associated_token_programPubkey
3system_programPubkey
4liquidity_pool_statePubkey
5userPubkey
6token_a_mintPubkey
7token_b_mintPubkey
8user_token_a_vaultPubkey
9user_token_b_vaultPubkey
10token_a_vaultPubkey
11token_b_vaultPubkey
12protocol_configPubkey
13instruction_sysvar_account_infoPubkey
14protocol_adminPubkey
15protocol_admin_statePubkey
16…remainingVec<AccountMeta>

AdminDepositMsol#

Discriminator cebdd0a61351ca30 · data AdminDepositMsol · accounts AdminDepositMsolInstructionAccounts.

FieldType
versionu16
amountu64

Required accounts: 10; extras go to remaining.

Fields of AdminDepositMsolInstructionAccounts, in account order:

#FieldType
0token_programPubkey
1associated_token_programPubkey
2payerPubkey
3adminPubkey
4protocol_config_statePubkey
5system_programPubkey
6protocol_staking_admin_statePubkey
7address_lookup_programPubkey
8instruction_sysvar_account_infoPubkey
9temp_sol_holderPubkey
10…remainingVec<AccountMeta>

AdminMintMsol#

Discriminator 8cca39c361d5a813 · data AdminMintMsol · accounts AdminMintMsolInstructionAccounts.

FieldType
versionu16
amountu64

Required accounts: 10; extras go to remaining.

Fields of AdminMintMsolInstructionAccounts, in account order:

#FieldType
0token_programPubkey
1associated_token_programPubkey
2payerPubkey
3adminPubkey
4protocol_config_statePubkey
5system_programPubkey
6protocol_staking_admin_statePubkey
7address_lookup_programPubkey
8instruction_sysvar_account_infoPubkey
9temp_sol_holderPubkey
10…remainingVec<AccountMeta>

AdminRepaySol#

Discriminator 883d30e8a61acf2e · data AdminRepaySol · accounts AdminRepaySolInstructionAccounts.

FieldType
versionu16
amountu64

Required accounts: 10; extras go to remaining.

Fields of AdminRepaySolInstructionAccounts, in account order:

#FieldType
0token_programPubkey
1associated_token_programPubkey
2payerPubkey
3adminPubkey
4protocol_config_statePubkey
5system_programPubkey
6protocol_staking_admin_statePubkey
7address_lookup_programPubkey
8instruction_sysvar_account_infoPubkey
9temp_sol_holderPubkey
10…remainingVec<AccountMeta>

AdminSetTransferFee#

Discriminator e8c1a803505cd7b0 · data AdminSetTransferFee · accounts AdminSetTransferFeeInstructionAccounts.

FieldType
protocol_config_versionu16
transfer_fee_bpsu16
maximum_feeu64

Required accounts: 5; extras go to remaining.

Fields of AdminSetTransferFeeInstructionAccounts, in account order:

#FieldType
0token_a_programPubkey
1token_a_mintPubkey
2current_ownerPubkey
3protocol_owner_statePubkey
4protocol_configPubkey
5…remainingVec<AccountMeta>

AdminUnstakeMsol#

Discriminator fdda8dfc2809079a · data AdminUnstakeMsol · accounts AdminUnstakeMsolInstructionAccounts.

FieldType
versionu16
ticket_numberu32
amountu64

Required accounts: 10; extras go to remaining.

Fields of AdminUnstakeMsolInstructionAccounts, in account order:

#FieldType
0token_programPubkey
1associated_token_programPubkey
2payerPubkey
3adminPubkey
4protocol_config_statePubkey
5system_programPubkey
6protocol_staking_admin_statePubkey
7msol_ticketPubkey
8msol_mintPubkey
9msol_ticket_sol_spentPubkey
10…remainingVec<AccountMeta>

AdminUpdateProLiquidityPoolState#

Discriminator c845f14091928070 · data AdminUpdateProLiquidityPoolState · accounts AdminUpdateProLiquidityPoolStateInstructionAccounts.

Required accounts: 4; extras go to remaining.

Fields of AdminUpdateProLiquidityPoolStateInstructionAccounts, in account order:

#FieldType
0liquidity_pool_statePubkey
1protocol_configPubkey
2protocol_adminPubkey
3protocol_admin_statePubkey
4…remainingVec<AccountMeta>

AdminUpdateStandardLiquidityPoolState#

Discriminator 63e4293fddf4c8c7 · data AdminUpdateStandardLiquidityPoolState · accounts AdminUpdateStandardLiquidityPoolStateInstructionAccounts.

Required accounts: 4; extras go to remaining.

Fields of AdminUpdateStandardLiquidityPoolStateInstructionAccounts, in account order:

#FieldType
0liquidity_pool_statePubkey
1protocol_configPubkey
2protocol_adminPubkey
3protocol_admin_statePubkey
4…remainingVec<AccountMeta>

AdminWithdrawMsol#

Discriminator f9db8d48d26ed863 · data AdminWithdrawMsol · accounts AdminWithdrawMsolInstructionAccounts.

FieldType
versionu16
amountu64

Required accounts: 10; extras go to remaining.

Fields of AdminWithdrawMsolInstructionAccounts, in account order:

#FieldType
0token_programPubkey
1associated_token_programPubkey
2payerPubkey
3adminPubkey
4protocol_config_statePubkey
5system_programPubkey
6protocol_staking_admin_statePubkey
7address_lookup_programPubkey
8instruction_sysvar_account_infoPubkey
9temp_sol_holderPubkey
10…remainingVec<AccountMeta>

AdminWithdrawTransferFee#

Discriminator 754fa4cb7e4816f6 · data AdminWithdrawTransferFee · accounts AdminWithdrawTransferFeeInstructionAccounts.

FieldType
protocol_config_versionu16

Required accounts: 6; extras go to remaining.

Fields of AdminWithdrawTransferFeeInstructionAccounts, in account order:

#FieldType
0token_programPubkey
1mintPubkey
2receiverPubkey
3protocol_fee_admin_statePubkey
4adminPubkey
5protocol_configPubkey
6…remainingVec<AccountMeta>

Buy#

Discriminator 66063d1201daebea · data Buy · accounts BuyInstructionAccounts.

FieldType
paramsBuyParams

Required accounts: 14; extras go to remaining.

Fields of BuyInstructionAccounts, in account order:

#FieldType
0token_a_programPubkey
1token_b_programPubkey
2associated_token_programPubkey
3system_programPubkey
4liquidity_pool_statePubkey
5userPubkey
6token_a_mintPubkey
7token_b_mintPubkey
8user_token_a_vaultPubkey
9user_token_b_vaultPubkey
10token_a_vaultPubkey
11token_b_vaultPubkey
12protocol_configPubkey
13instruction_sysvar_account_infoPubkey
14…remainingVec<AccountMeta>

ClaimProCreatorTradingFeeProtocolFees#

Discriminator ea23ed0f8a31ec99 · data ClaimProCreatorTradingFeeProtocolFees · accounts ClaimProCreatorTradingFeeProtocolFeesInstructionAccounts.

FieldType
amountu64

Required accounts: 16; extras go to remaining.

Fields of ClaimProCreatorTradingFeeProtocolFeesInstructionAccounts, in account order:

#FieldType
0token_a_programPubkey
1token_b_programPubkey
2associated_token_programPubkey
3system_programPubkey
4liquidity_pool_statePubkey
5userPubkey
6token_a_mintPubkey
7token_b_mintPubkey
8user_token_a_vaultPubkey
9user_token_b_vaultPubkey
10token_a_vaultPubkey
11token_b_vaultPubkey
12protocol_configPubkey
13instruction_sysvar_account_infoPubkey
14protocol_adminPubkey
15protocol_admin_statePubkey
16…remainingVec<AccountMeta>

ClaimProCreatorTradingFees#

Discriminator 517b67716d968a5d · data ClaimProCreatorTradingFees · accounts ClaimProCreatorTradingFeesInstructionAccounts.

FieldType
amountu64

Required accounts: 14; extras go to remaining.

Fields of ClaimProCreatorTradingFeesInstructionAccounts, in account order:

#FieldType
0token_a_programPubkey
1token_b_programPubkey
2associated_token_programPubkey
3system_programPubkey
4liquidity_pool_statePubkey
5userPubkey
6token_a_mintPubkey
7token_b_mintPubkey
8user_token_a_vaultPubkey
9user_token_b_vaultPubkey
10token_a_vaultPubkey
11token_b_vaultPubkey
12protocol_configPubkey
13instruction_sysvar_account_infoPubkey
14…remainingVec<AccountMeta>

ClaimProLiquidityProviderTradingFees#

Discriminator f274e4342074ac94 · data ClaimProLiquidityProviderTradingFees · accounts ClaimProLiquidityProviderTradingFeesInstructionAccounts.

No data fields.

Required accounts: 13; extras go to remaining.

Fields of ClaimProLiquidityProviderTradingFeesInstructionAccounts, in account order:

#FieldType
0token_a_programPubkey
1token_b_programPubkey
2system_programPubkey
3liquidity_pool_statePubkey
4userPubkey
5token_a_mintPubkey
6token_b_mintPubkey
7user_token_a_vaultPubkey
8user_token_b_vaultPubkey
9token_a_vaultPubkey
10token_b_vaultPubkey
11protocol_configPubkey
12user_lp_positionPubkey
13…remainingVec<AccountMeta>

ClaimProProtocolTradingFees#

Discriminator ddc065bdff4fc239 · data ClaimProProtocolTradingFees · accounts ClaimProProtocolTradingFeesInstructionAccounts.

FieldType
amountu64

Required accounts: 16; extras go to remaining.

Fields of ClaimProProtocolTradingFeesInstructionAccounts, in account order:

#FieldType
0token_a_programPubkey
1token_b_programPubkey
2associated_token_programPubkey
3system_programPubkey
4liquidity_pool_statePubkey
5userPubkey
6token_a_mintPubkey
7token_b_mintPubkey
8user_token_a_vaultPubkey
9user_token_b_vaultPubkey
10token_a_vaultPubkey
11token_b_vaultPubkey
12protocol_configPubkey
13instruction_sysvar_account_infoPubkey
14protocol_adminPubkey
15protocol_admin_statePubkey
16…remainingVec<AccountMeta>

ClaimProReflectionTradingFees#

Discriminator ea9030fc6f06503a · data ClaimProReflectionTradingFees · accounts ClaimProReflectionTradingFeesInstructionAccounts.

FieldType
amountu64

Required accounts: 16; extras go to remaining.

Fields of ClaimProReflectionTradingFeesInstructionAccounts, in account order:

#FieldType
0token_a_programPubkey
1token_b_programPubkey
2associated_token_programPubkey
3system_programPubkey
4liquidity_pool_statePubkey
5userPubkey
6token_a_mintPubkey
7token_b_mintPubkey
8user_token_a_vaultPubkey
9user_token_b_vaultPubkey
10token_a_vaultPubkey
11token_b_vaultPubkey
12protocol_configPubkey
13instruction_sysvar_account_infoPubkey
14protocol_adminPubkey
15protocol_admin_statePubkey
16…remainingVec<AccountMeta>

ClaimStandardCreatorTradingFeeProtocolFees#

Discriminator 00c9e2e47f2d456e · data ClaimStandardCreatorTradingFeeProtocolFees · accounts ClaimStandardCreatorTradingFeeProtocolFeesInstructionAccounts.

FieldType
amountu64

Required accounts: 16; extras go to remaining.

Fields of ClaimStandardCreatorTradingFeeProtocolFeesInstructionAccounts, in account order:

#FieldType
0token_a_programPubkey
1token_b_programPubkey
2associated_token_programPubkey
3system_programPubkey
4liquidity_pool_statePubkey
5userPubkey
6token_a_mintPubkey
7token_b_mintPubkey
8user_token_a_vaultPubkey
9user_token_b_vaultPubkey
10token_a_vaultPubkey
11token_b_vaultPubkey
12protocol_configPubkey
13instruction_sysvar_account_infoPubkey
14protocol_adminPubkey
15protocol_admin_statePubkey
16…remainingVec<AccountMeta>

ClaimStandardCreatorTradingFees#

Discriminator a559dd34aaf9226f · data ClaimStandardCreatorTradingFees · accounts ClaimStandardCreatorTradingFeesInstructionAccounts.

FieldType
amountu64

Required accounts: 14; extras go to remaining.

Fields of ClaimStandardCreatorTradingFeesInstructionAccounts, in account order:

#FieldType
0token_a_programPubkey
1token_b_programPubkey
2associated_token_programPubkey
3system_programPubkey
4liquidity_pool_statePubkey
5userPubkey
6token_a_mintPubkey
7token_b_mintPubkey
8user_token_a_vaultPubkey
9user_token_b_vaultPubkey
10token_a_vaultPubkey
11token_b_vaultPubkey
12protocol_configPubkey
13instruction_sysvar_account_infoPubkey
14…remainingVec<AccountMeta>

ClaimStandardProtocolTradingFees#

Discriminator 54ce8cf53fd440ed · data ClaimStandardProtocolTradingFees · accounts ClaimStandardProtocolTradingFeesInstructionAccounts.

FieldType
amountu64

Required accounts: 16; extras go to remaining.

Fields of ClaimStandardProtocolTradingFeesInstructionAccounts, in account order:

#FieldType
0token_a_programPubkey
1token_b_programPubkey
2associated_token_programPubkey
3system_programPubkey
4liquidity_pool_statePubkey
5userPubkey
6token_a_mintPubkey
7token_b_mintPubkey
8user_token_a_vaultPubkey
9user_token_b_vaultPubkey
10token_a_vaultPubkey
11token_b_vaultPubkey
12protocol_configPubkey
13instruction_sysvar_account_infoPubkey
14protocol_adminPubkey
15protocol_admin_statePubkey
16…remainingVec<AccountMeta>

ClaimStandardReflectionTradingFees#

Discriminator 4694259366141e17 · data ClaimStandardReflectionTradingFees · accounts ClaimStandardReflectionTradingFeesInstructionAccounts.

FieldType
amountu64

Required accounts: 16; extras go to remaining.

Fields of ClaimStandardReflectionTradingFeesInstructionAccounts, in account order:

#FieldType
0token_a_programPubkey
1token_b_programPubkey
2associated_token_programPubkey
3system_programPubkey
4liquidity_pool_statePubkey
5userPubkey
6token_a_mintPubkey
7token_b_mintPubkey
8user_token_a_vaultPubkey
9user_token_b_vaultPubkey
10token_a_vaultPubkey
11token_b_vaultPubkey
12protocol_configPubkey
13instruction_sysvar_account_infoPubkey
14protocol_adminPubkey
15protocol_admin_statePubkey
16…remainingVec<AccountMeta>

CloseProtocolLookupTable#

Discriminator 4f48302777032a74 · data CloseProtocolLookupTable · accounts CloseProtocolLookupTableInstructionAccounts.

FieldType
versionu64

Required accounts: 7; extras go to remaining.

Fields of CloseProtocolLookupTableInstructionAccounts, in account order:

#FieldType
0payerPubkey
1system_programPubkey
2address_lookup_programPubkey
3authorityPubkey
4lookup_tablePubkey
5protocol_owner_statePubkey
6current_ownerPubkey
7…remainingVec<AccountMeta>

CreateOrUpdateProtocolFeeAdmin#

Discriminator 157eb014556f351f · data CreateOrUpdateProtocolFeeAdmin · accounts CreateOrUpdateProtocolFeeAdminInstructionAccounts.

No data fields.

Required accounts: 6; extras go to remaining.

Fields of CreateOrUpdateProtocolFeeAdminInstructionAccounts, in account order:

#FieldType
0system_programPubkey
1payerPubkey
2current_ownerPubkey
3protocol_owner_statePubkey
4new_adminPubkey
5protocol_fee_admin_statePubkey
6…remainingVec<AccountMeta>

CreateOrUpdateProtocolOwner#

Discriminator aa7c802830698b94 · data CreateOrUpdateProtocolOwner · accounts CreateOrUpdateProtocolOwnerInstructionAccounts.

No data fields.

Required accounts: 5; extras go to remaining.

Fields of CreateOrUpdateProtocolOwnerInstructionAccounts, in account order:

#FieldType
0system_programPubkey
1payerPubkey
2current_ownerPubkey
3new_ownerPubkey
4protocol_owner_statePubkey
5…remainingVec<AccountMeta>

CreateOrUpdateProtocolStakingAdmin#

Discriminator 04acc4d578321e89 · data CreateOrUpdateProtocolStakingAdmin · accounts CreateOrUpdateProtocolStakingAdminInstructionAccounts.

No data fields.

Required accounts: 6; extras go to remaining.

Fields of CreateOrUpdateProtocolStakingAdminInstructionAccounts, in account order:

#FieldType
0system_programPubkey
1payerPubkey
2current_ownerPubkey
3protocol_owner_statePubkey
4new_adminPubkey
5protocol_staking_admin_statePubkey
6…remainingVec<AccountMeta>

CreateProLiquidityPool#

Discriminator d16155bfbb1dc455 · data CreateProLiquidityPool · accounts CreateProLiquidityPoolInstructionAccounts.

FieldType
protocol_config_versionu16
paramsCreateProLiquidityPoolParams

Required accounts: 14; extras go to remaining.

Fields of CreateProLiquidityPoolInstructionAccounts, in account order:

#FieldType
0token_programPubkey
1associated_token_programPubkey
2system_programPubkey
3userPubkey
4payerPubkey
5token_a_mintPubkey
6token_b_mintPubkey
7user_token_a_vaultPubkey
8token_a_vaultPubkey
9token_b_vaultPubkey
10liquidity_pool_statePubkey
11protocol_configPubkey
12token_a_programPubkey
13user_lp_positionPubkey
14…remainingVec<AccountMeta>

CreateProtocolConfig#

Discriminator 7372186f0e3571fe · data CreateProtocolConfig · accounts CreateProtocolConfigInstructionAccounts.

FieldType
versionu16
paramsProtocolConfigParams

Required accounts: 9; extras go to remaining.

Fields of CreateProtocolConfigInstructionAccounts, in account order:

#FieldType
0token_programPubkey
1associated_token_programPubkey
2payerPubkey
3ownerPubkey
4protocol_config_statePubkey
5system_programPubkey
6protocol_owner_statePubkey
7msol_token_vaultPubkey
8msol_mintPubkey
9…remainingVec<AccountMeta>

CreateProtocolLookupTable#

Discriminator f9036399a8f1f3e4 · data CreateProtocolLookupTable · accounts CreateProtocolLookupTableInstructionAccounts.

FieldType
versionu64

Required accounts: 7; extras go to remaining.

Fields of CreateProtocolLookupTableInstructionAccounts, in account order:

#FieldType
0payerPubkey
1system_programPubkey
2address_lookup_programPubkey
3authorityPubkey
4lookup_tablePubkey
5protocol_owner_statePubkey
6current_ownerPubkey
7…remainingVec<AccountMeta>

CreateStandardLiquidityPool#

Discriminator 2a2b7e38e70ad035 · data CreateStandardLiquidityPool · accounts CreateStandardLiquidityPoolInstructionAccounts.

FieldType
protocol_config_versionu16
paramsCreateStandardLiquidityPoolParams

Required accounts: 13; extras go to remaining.

Fields of CreateStandardLiquidityPoolInstructionAccounts, in account order:

#FieldType
0token_programPubkey
1associated_token_programPubkey
2system_programPubkey
3userPubkey
4payerPubkey
5token_a_mintPubkey
6token_b_mintPubkey
7user_token_a_vaultPubkey
8token_a_vaultPubkey
9token_b_vaultPubkey
10liquidity_pool_statePubkey
11protocol_configPubkey
12token_a_programPubkey
13…remainingVec<AccountMeta>

CreatorSetProMarketCapCreatorFee#

Discriminator 75ce38021c25eceb · data CreatorSetProMarketCapCreatorFee · accounts CreatorSetProMarketCapCreatorFeeInstructionAccounts.

FieldType
feesFeeBrackets

Required accounts: 2; extras go to remaining.

Fields of CreatorSetProMarketCapCreatorFeeInstructionAccounts, in account order:

#FieldType
0liquidity_pool_statePubkey
1creatorPubkey
2…remainingVec<AccountMeta>

CreatorSetProMarketCapLpFee#

Discriminator 06c12209eb55fff6 · data CreatorSetProMarketCapLpFee · accounts CreatorSetProMarketCapLpFeeInstructionAccounts.

FieldType
feesFeeBrackets

Required accounts: 2; extras go to remaining.

Fields of CreatorSetProMarketCapLpFeeInstructionAccounts, in account order:

#FieldType
0liquidity_pool_statePubkey
1creatorPubkey
2…remainingVec<AccountMeta>

CreatorSetProMarketCapReflectionFee#

Discriminator e3ad60792de2a489 · data CreatorSetProMarketCapReflectionFee · accounts CreatorSetProMarketCapReflectionFeeInstructionAccounts.

FieldType
feesFeeBrackets

Required accounts: 2; extras go to remaining.

Fields of CreatorSetProMarketCapReflectionFeeInstructionAccounts, in account order:

#FieldType
0liquidity_pool_statePubkey
1creatorPubkey
2…remainingVec<AccountMeta>

CreatorSetProSlotCreatorFee#

Discriminator 15464de404e10353 · data CreatorSetProSlotCreatorFee · accounts CreatorSetProSlotCreatorFeeInstructionAccounts.

FieldType
feesSlotFeeBrackets

Required accounts: 2; extras go to remaining.

Fields of CreatorSetProSlotCreatorFeeInstructionAccounts, in account order:

#FieldType
0liquidity_pool_statePubkey
1creatorPubkey
2…remainingVec<AccountMeta>

CreatorToggleProDeposit#

Discriminator a08980cc2ab366ca · data CreatorToggleProDeposit · accounts CreatorToggleProDepositInstructionAccounts.

FieldType
enabledbool

Required accounts: 2; extras go to remaining.

Fields of CreatorToggleProDepositInstructionAccounts, in account order:

#FieldType
0liquidity_pool_statePubkey
1creatorPubkey
2…remainingVec<AccountMeta>

CreatorToggleProSwap#

Discriminator 8fbe0581e63b1c59 · data CreatorToggleProSwap · accounts CreatorToggleProSwapInstructionAccounts.

FieldType
enabledbool

Required accounts: 2; extras go to remaining.

Fields of CreatorToggleProSwapInstructionAccounts, in account order:

#FieldType
0liquidity_pool_statePubkey
1creatorPubkey
2…remainingVec<AccountMeta>

CreatorToggleProWithdraw#

Discriminator 202fea054d92f4b2 · data CreatorToggleProWithdraw · accounts CreatorToggleProWithdrawInstructionAccounts.

FieldType
enabledbool

Required accounts: 2; extras go to remaining.

Fields of CreatorToggleProWithdrawInstructionAccounts, in account order:

#FieldType
0liquidity_pool_statePubkey
1creatorPubkey
2…remainingVec<AccountMeta>

DeactivateProtocolLookupTable#

Discriminator da0c583a962c9848 · data DeactivateProtocolLookupTable · accounts DeactivateProtocolLookupTableInstructionAccounts.

FieldType
versionu64

Required accounts: 7; extras go to remaining.

Fields of DeactivateProtocolLookupTableInstructionAccounts, in account order:

#FieldType
0payerPubkey
1system_programPubkey
2address_lookup_programPubkey
3authorityPubkey
4lookup_tablePubkey
5protocol_owner_statePubkey
6current_ownerPubkey
7…remainingVec<AccountMeta>

ExtendProtocolLookupTable#

Discriminator 07e3c6016b711f58 · data ExtendProtocolLookupTable · accounts ExtendProtocolLookupTableInstructionAccounts.

FieldType
versionu64
addressesVec<Pubkey>

Required accounts: 7; extras go to remaining.

Fields of ExtendProtocolLookupTableInstructionAccounts, in account order:

#FieldType
0payerPubkey
1system_programPubkey
2address_lookup_programPubkey
3authorityPubkey
4lookup_tablePubkey
5protocol_owner_statePubkey
6current_ownerPubkey
7…remainingVec<AccountMeta>

InitializeProtocolLending#

Discriminator 00cdedf01b4f1b3b · data InitializeProtocolLending · accounts InitializeProtocolLendingInstructionAccounts.

FieldType
versionu16
recent_slotu64

Required accounts: 10; extras go to remaining.

Fields of InitializeProtocolLendingInstructionAccounts, in account order:

#FieldType
0token_programPubkey
1associated_token_programPubkey
2payerPubkey
3adminPubkey
4protocol_config_statePubkey
5system_programPubkey
6protocol_staking_admin_statePubkey
7address_lookup_programPubkey
8instruction_sysvar_account_infoPubkey
9temp_sol_holderPubkey
10…remainingVec<AccountMeta>

ProBuy#

Discriminator 67abc4ee9f2dbbf6 · data ProBuy · accounts ProBuyInstructionAccounts.

FieldType
paramsBuyParams

Required accounts: 14; extras go to remaining.

Fields of ProBuyInstructionAccounts, in account order:

#FieldType
0token_a_programPubkey
1token_b_programPubkey
2associated_token_programPubkey
3system_programPubkey
4liquidity_pool_statePubkey
5userPubkey
6token_a_mintPubkey
7token_b_mintPubkey
8user_token_a_vaultPubkey
9user_token_b_vaultPubkey
10token_a_vaultPubkey
11token_b_vaultPubkey
12protocol_configPubkey
13instruction_sysvar_account_infoPubkey
14…remainingVec<AccountMeta>

ProSell#

Discriminator 8c4f7a601689ee7c · data ProSell · accounts ProSellInstructionAccounts.

FieldType
paramsSellParams

Required accounts: 14; extras go to remaining.

Fields of ProSellInstructionAccounts, in account order:

#FieldType
0token_a_programPubkey
1token_b_programPubkey
2associated_token_programPubkey
3system_programPubkey
4liquidity_pool_statePubkey
5userPubkey
6token_a_mintPubkey
7token_b_mintPubkey
8user_token_a_vaultPubkey
9user_token_b_vaultPubkey
10token_a_vaultPubkey
11token_b_vaultPubkey
12protocol_configPubkey
13instruction_sysvar_account_infoPubkey
14…remainingVec<AccountMeta>

RemainingAccountsStub#

Discriminator 208f535e17223bef · data RemainingAccountsStub · accounts RemainingAccountsStubInstructionAccounts.

No data fields.

Required accounts: 113; extras go to remaining.

Fields of RemainingAccountsStubInstructionAccounts, in account order:

#FieldType
0protocol_lending_lookup_tablePubkey
1kamino_lending_user_metadataPubkey
2kamino_lending_referrer_user_metadataPubkey
3rentPubkey
4kamino_lending_programPubkey
5kamino_lending_obligationPubkey
6kamino_lending_main_marketPubkey
7kamino_reserve_msol_statePubkey
8kamino_reserve_sol_statePubkey
9kamino_scope_pricesPubkey
10marinade_liquid_staking_statePubkey
11msol_mintPubkey
12marinade_sol_leg_accountPubkey
13marinade_msol_leg_accountPubkey
14marinade_msol_leg_authorityPubkey
15marinade_reserve_sol_pdaPubkey
16transfer_fromPubkey
17mint_toPubkey
18marinade_msol_mint_authorityPubkey
19system_programPubkey
20token_programPubkey
21marinade_finance_programPubkey
22referral_statePubkey
23msol_token_partner_accountPubkey
24msol_staking_programPubkey
25deposit_accounts_ownerPubkey
26deposit_accounts_obligationPubkey
27deposit_accounts_lending_marketPubkey
28deposit_accounts_lending_market_authorityPubkey
29deposit_accounts_reservePubkey
30deposit_accounts_reserve_liquidity_mintPubkey
31deposit_accounts_reserve_liquidity_supplyPubkey
32deposit_accounts_reserve_collateral_mintPubkey
33deposit_accounts_reserve_destination_deposit_collateralPubkey
34deposit_accounts_user_source_liquidityPubkey
35deposit_accounts_placeholder_user_destination_collateralPubkey
36deposit_accounts_collateral_token_programPubkey
37deposit_accounts_liquidity_token_programPubkey
38deposit_accounts_instruction_sysvar_accountPubkey
39farms_accounts_obligation_farm_user_statePubkey
40farms_accounts_reserve_farm_statePubkey
41farms_programPubkey
42borrow_accounts_ownerPubkey
43borrow_accounts_obligationPubkey
44borrow_accounts_lending_marketPubkey
45borrow_accounts_lending_market_authorityPubkey
46borrow_accounts_borrow_reservePubkey
47borrow_accounts_borrow_reserve_liquidity_mintPubkey
48borrow_accounts_reserve_source_liquidityPubkey
49borrow_accounts_borrow_reserve_liquidity_fee_receiverPubkey
50borrow_accounts_user_destination_liquidityPubkey
51borrow_accounts_referrer_token_statePubkey
52borrow_accounts_token_programPubkey
53borrow_accounts_instruction_sysvar_accountPubkey
54repay_accounts_ownerPubkey
55repay_accounts_obligationPubkey
56repay_accounts_lending_marketPubkey
57repay_accounts_repay_reservePubkey
58repay_accounts_reserve_liquidity_mintPubkey
59repay_accounts_reserve_destination_liquidityPubkey
60repay_accounts_user_source_liquidityPubkey
61repay_accounts_token_programPubkey
62repay_accounts_instruction_sysvar_accountPubkey
63lending_market_authorityPubkey
64associated_token_programPubkey
65temp_sol_holderPubkey
66chainlink_programPubkey
67chainlink_sol_usd_price_feedPubkey
68clockPubkey
69withdraw_accounts_ownerPubkey
70withdraw_accounts_obligationPubkey
71withdraw_accounts_lending_marketPubkey
72withdraw_accounts_lending_market_authorityPubkey
73withdraw_accounts_withdraw_reservePubkey
74withdraw_accounts_reserve_liquidity_mintPubkey
75withdraw_accounts_reserve_source_collateralPubkey
76withdraw_accounts_reserve_collateral_mintPubkey
77withdraw_accounts_reserve_liquidity_supplyPubkey
78withdraw_accounts_user_destination_liquidityPubkey
79withdraw_accounts_placeholder_user_destination_collateralPubkey
80withdraw_accounts_collateral_token_programPubkey
81withdraw_accounts_liquidity_token_programPubkey
82withdraw_accounts_instruction_sysvar_accountPubkey
83temp_sol_holder_msol_vaultPubkey
84ownerPubkey
85fee_payerPubkey
86user_metadataPubkey
87referrer_user_metadataPubkey
88obligation_ownerPubkey
89obligationPubkey
90lending_marketPubkey
91seed1_accountPubkey
92seed2_accountPubkey
93owner_user_metadataPubkey
94reservePubkey
95pyth_oraclePubkey
96switchboard_price_oraclePubkey
97switchboard_twap_oraclePubkey
98scope_pricesPubkey
99oracle_pricesPubkey
100oracle_mappingsPubkey
101oracle_twapsPubkey
102instruction_sysvar_account_infoPubkey
103pythnet_custody_price_sol_accountPubkey
104marinade_liquid_staking_state2Pubkey
105pythnet_custody_price_sol_account2Pubkey
106burn_msol_fromPubkey
107burn_msol_authorityPubkey
108new_ticket_accountPubkey
109statePubkey
110reserve_pdaPubkey
111ticket_accountPubkey
112transfer_sol_toPubkey
113…remainingVec<AccountMeta>

RemoveLiquidityProPool#

Discriminator bf372a2ce262ac4f · data RemoveLiquidityProPool · accounts RemoveLiquidityProPoolInstructionAccounts.

FieldType
paramsRemoveLiquidityParams

Required accounts: 15; extras go to remaining.

Fields of RemoveLiquidityProPoolInstructionAccounts, in account order:

#FieldType
0token_a_programPubkey
1token_b_programPubkey
2associated_token_programPubkey
3system_programPubkey
4liquidity_pool_statePubkey
5userPubkey
6payerPubkey
7token_a_mintPubkey
8token_b_mintPubkey
9user_token_a_vaultPubkey
10user_token_b_vaultPubkey
11token_a_vaultPubkey
12token_b_vaultPubkey
13protocol_configPubkey
14user_lp_positionPubkey
15…remainingVec<AccountMeta>

Sell#

Discriminator 33e685a4017f83ad · data Sell · accounts SellInstructionAccounts.

FieldType
paramsSellParams

Required accounts: 14; extras go to remaining.

Fields of SellInstructionAccounts, in account order:

#FieldType
0token_a_programPubkey
1token_b_programPubkey
2associated_token_programPubkey
3system_programPubkey
4liquidity_pool_statePubkey
5userPubkey
6token_a_mintPubkey
7token_b_mintPubkey
8user_token_a_vaultPubkey
9user_token_b_vaultPubkey
10token_a_vaultPubkey
11token_b_vaultPubkey
12protocol_configPubkey
13instruction_sysvar_account_infoPubkey
14…remainingVec<AccountMeta>

SetProtocolSlotFees#

Discriminator b552130f7ecd98f2 · data SetProtocolSlotFees · accounts SetProtocolSlotFeesInstructionAccounts.

FieldType
versionu16
fee_typeFeeType
slot_feesSlotFeeBracketsParams

Required accounts: 3; extras go to remaining.

Fields of SetProtocolSlotFeesInstructionAccounts, in account order:

#FieldType
0ownerPubkey
1protocol_config_statePubkey
2protocol_owner_statePubkey
3…remainingVec<AccountMeta>

TransferLpTokens#

Discriminator ee790e52676d46b4 · data TransferLpTokens · accounts TransferLpTokensInstructionAccounts.

FieldType
amountu64

Required accounts: 7; extras go to remaining.

Fields of TransferLpTokensInstructionAccounts, in account order:

#FieldType
0system_programPubkey
1liquidity_pool_statePubkey
2senderPubkey
3payerPubkey
4receiverPubkey
5sender_lp_positionPubkey
6receiver_lp_positionPubkey
7…remainingVec<AccountMeta>

UpdateAllowCreatePool#

Discriminator dffce73e60dbf1d6 · data UpdateAllowCreatePool · accounts UpdateAllowCreatePoolInstructionAccounts.

FieldType
versionu16
allow_create_poolbool

Required accounts: 3; extras go to remaining.

Fields of UpdateAllowCreatePoolInstructionAccounts, in account order:

#FieldType
0adminPubkey
1protocol_config_statePubkey
2protocol_admin_statePubkey
3…remainingVec<AccountMeta>

UpdateCreatorTradingFeeReceiver#

Discriminator f6e5c84f1f157819 · data UpdateCreatorTradingFeeReceiver · accounts UpdateCreatorTradingFeeReceiverInstructionAccounts.

No data fields.

Required accounts: 15; extras go to remaining.

Fields of UpdateCreatorTradingFeeReceiverInstructionAccounts, in account order:

#FieldType
0token_a_programPubkey
1token_b_programPubkey
2associated_token_programPubkey
3system_programPubkey
4liquidity_pool_statePubkey
5userPubkey
6token_a_mintPubkey
7token_b_mintPubkey
8user_token_a_vaultPubkey
9user_token_b_vaultPubkey
10token_a_vaultPubkey
11token_b_vaultPubkey
12protocol_configPubkey
13instruction_sysvar_account_infoPubkey
14new_receiverPubkey
15…remainingVec<AccountMeta>

UpdateProCreatorTradingFeeReceiver#

Discriminator 9cf01bf32aa51f00 · data UpdateProCreatorTradingFeeReceiver · accounts UpdateProCreatorTradingFeeReceiverInstructionAccounts.

No data fields.

Required accounts: 15; extras go to remaining.

Fields of UpdateProCreatorTradingFeeReceiverInstructionAccounts, in account order:

#FieldType
0token_a_programPubkey
1token_b_programPubkey
2associated_token_programPubkey
3system_programPubkey
4liquidity_pool_statePubkey
5userPubkey
6token_a_mintPubkey
7token_b_mintPubkey
8user_token_a_vaultPubkey
9user_token_b_vaultPubkey
10token_a_vaultPubkey
11token_b_vaultPubkey
12protocol_configPubkey
13instruction_sysvar_account_infoPubkey
14new_receiverPubkey
15…remainingVec<AccountMeta>

UpdateProtocolConfig#

Discriminator c5617b36dda80b87 · data UpdateProtocolConfig · accounts UpdateProtocolConfigInstructionAccounts.

FieldType
versionu16
paramsProtocolConfigParams

Required accounts: 3; extras go to remaining.

Fields of UpdateProtocolConfigInstructionAccounts, in account order:

#FieldType
0ownerPubkey
1protocol_config_statePubkey
2protocol_owner_statePubkey
3…remainingVec<AccountMeta>

CpiEvent#

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

Discriminator e445a52e51cb9a1d · data CpiEvent · accounts CpiEventInstructionAccounts.

Required accounts: 2; extras go to remaining.

Fields of CpiEventInstructionAccounts, in account order:

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

Accounts#

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

LiquidityPoolState#

Discriminator be9edc820fa284fc · accounts::liquidity_pool_state::LiquidityPoolState.

FieldType
infoLiquidityPoolInfo
market_cap_based_feesLiquidityPoolMarketCapBasedFees
reserveLiquidityPoolReserve
lp_tokenLiquidityPoolLpTokenInfo
protocol_trading_feesu64
creator_trading_feesu64
creator_trading_fees_claimed_by_creatoru64
creator_trading_fees_claimed_by_othersu64
liquidity_provider_trading_feesu64
creator_trading_fee_protocol_feesu64
reflection_trading_feesu64
created_at_slotu64
trading_volume_usdf64
creator_trading_fee_trading_volume_thresholdf64
creator_trading_fee_trading_volume_threshold_reached_unix_timestampu64
token_a_vaultPubkey
token_b_vaultPubkey
protocol_configPubkey
keyPubkey
token_aLiquidityPoolTokenInfo
token_bLiquidityPoolTokenInfo
allowlistLiquidityPoolAllowlist
feature_flagsLiquidityPoolFeatureFlags
taxable_sideu8
taxable_side_typeu8
creator_trading_fee_distributionu8
creator_trading_fee_claim_statusu8
fee_configuration_modeu8
is_migratedu8
pad[u8; 13]
slot_offset_based_feesLiquidityPoolSlotOffsetBasedFees
creator_trading_fee_receiverPubkey

MsolTicketSolSpent#

Discriminator 42c43e867c95fa42 · accounts::msol_ticket_sol_spent::MsolTicketSolSpent.

FieldType
cost_basisu64
msol_unstakedu64

ProtocolAdminState#

Discriminator 187caee1e81e73c0 · accounts::protocol_admin_state::ProtocolAdminState.

FieldType
current_protocol_adminPubkey

ProtocolConfig#

Discriminator cf5bfa1c98b3d7d1 · accounts::protocol_config::ProtocolConfig.

FieldType
create_pool_feeu64
initial_token_b_amountf64
initial_token_a_amountu64
unstaked_wsol_reserveu64
total_sol_spentu64
total_msol_receivedu64
total_realized_profitu64
pool_countu64
max_supply_per_walletu64
creator_trading_fee_trading_volume_thresholdf64
market_cap_based_feesLiquidityPoolMarketCapBasedFees
buffer_bpsu16
auto_staking_threshold_bpsu16
versionu16
protocol_config_state_bumpu8
allow_create_poolu8
supported_pool_typeu8
default_leader_slot_windowu8
auto_staking_enabledu8
leader_slot_windowu8
sandwich_resistence_enabledu8
token_a_decimalsu8
migration_market_cap_thresholdu16
pad[u8; 8]
max_creator_trading_feeu32
slot_offset_based_feesLiquidityPoolSlotOffsetBasedFees

ProtocolOwnerState#

Discriminator d040d1cc71e21662 · accounts::protocol_owner_state::ProtocolOwnerState.

FieldType
current_protocol_ownerPubkey

UserLpPosition#

Discriminator 73cce5cc36b41dc3 · accounts::user_lp_position::UserLpPosition.

FieldType
poolPubkey
userPubkey
lp_token_balanceu64
reward_debtu64
pending_feesu64
bumpu8

Events#

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

CreateLiquidityPoolEvent#

Discriminator 74d8ef8dcfd3b27f · events::create_liquidity_pool_event::CreateLiquidityPoolEventEvent.

FieldType
liquidity_pool_idPubkey
userPubkey
base_token_input_transfer_fee_amountu64
quote_token_input_transfer_fee_amountu64
base_token_input_amountu64
quote_token_input_amountu64
lp_token_output_amountu64
locked_lpbool

CreateStandardLiquidityPoolEvent#

Discriminator bd3883904b3ff994 · events::create_standard_liquidity_pool_event::CreateStandardLiquidityPoolEventEvent.

FieldType
pool_idPubkey
payerPubkey
creatorPubkey
mintPubkey
config_versionu16
initial_token_reserveu64
initial_virtual_wsol_reserveu64

CreatingLiquidityPoolEvent#

Discriminator 348004a67ab054cf · events::creating_liquidity_pool_event::CreatingLiquidityPoolEventEvent.

FieldType
idPubkey
basePubkey
quotePubkey
base_amountu64
quote_amountu64

HighReflectionFeeEvent#

Discriminator c6d9e5cd5ed60eb1 · events::high_reflection_fee_event::HighReflectionFeeEventEvent.

FieldType
liquidity_pool_idPubkey
reflection_fee_amountu64
total_reflection_feesu64

MigrationEvent#

Discriminator ffca4c935be74916 · events::migration_event::MigrationEventEvent.

FieldType
market_capf64

TradeEvent#

Discriminator bddb7fd34ee661ee · events::trade_event::TradeEventEvent.

FieldType
base_reserveu64
quote_reserveu64
total_creator_trading_feesu64
total_fee_paidu64
price_sol_usdf64
base_inu64
base_outu64
quote_inu64
quote_outu64

UserDefinedEvent#

Discriminator 21156c14f1f4a783 · events::user_defined_event::UserDefinedEventEvent.

FieldType
liquidity_pool_idPubkey
instruction_nameString
base64_dataString

Types#

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

AddLiquidityParams#

Struct types::AddLiquidityParams.

FieldType
max_token_au64
max_token_bu64
min_lp_tokensu64

AdminUpdateLiquidityPoolState#

Enum types::AdminUpdateLiquidityPoolState.

VariantFields
CreatorTradingFeeClaimStatusCreatorTradingFeeClaimStatus
CreatorTradingFeeDistributionCreatorTradingFeeDistribution
CreatorTradingFeeReceiverPubkey
FeeConfigurationModeFeeConfigurationMode
SlotOffsetBasedFeesfee_type: FeeType, fees: SlotFeeBrackets
MarketCapBasedFeesfee_type: FeeType, fees: FeeBrackets
ToggleSwapPermissionbool
SetCreatorTradingFeeTradingVolumeThresholdf64

BuyParams#

Struct types::BuyParams.

FieldType
max_sol_spendu64
minimum_amount_outu64
encoded_user_defined_event_dataString

CreateLiquidityPoolEvent#

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

CreateProLiquidityPoolParams#

Struct types::CreateProLiquidityPoolParams.

FieldType
encoded_user_defined_event_dataString
initial_token_a_amountu64
initial_token_b_amountu64
creator_trading_feeFeeBracketsParams
reflection_trading_feeOption<FeeBracketsParams>
liquidity_provider_trading_feeOption<FeeBracketsParams>
creator_slot_trading_feeOption<SlotFeeBracketsParams>
enable_same_slot_tradingbool
enable_sandwich_resistant_modebool
enable_deposit_liquiditybool
enable_withdraw_liquiditybool
enable_swapbool
enable_update_creator_trading_feebool

CreateStandardLiquidityPoolEvent#

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

CreateStandardLiquidityPoolParams#

Struct types::CreateStandardLiquidityPoolParams.

FieldType
encoded_user_defined_event_dataString
initial_purchase_amountu64
max_sol_spendu64

CreatingLiquidityPoolEvent#

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

CreatorTradingFeeClaimStatus#

Enum types::CreatorTradingFeeClaimStatus.

Variant
Unclaimed
Submitted
Processed

CreatorTradingFeeDistribution#

Enum types::CreatorTradingFeeDistribution.

Variant
Community
Creator
Blocked
Shared

FeeBracket#

Struct types::FeeBracket.

FieldType
market_cap_upper_boundu64
buy_fee_bpsu32
sell_fee_bpsu32

FeeBrackets#

Struct types::FeeBrackets.

FieldType
brackets[FeeBracket; 4]
countu8
padding[u8; 7]

FeeBracketsParams#

Struct types::FeeBracketsParams.

FieldType
bracketsVec<FeeBracket>
countu8

FeeConfigurationMode#

Enum types::FeeConfigurationMode.

Variant
Global
Local

FeeType#

Enum types::FeeType.

Variant
ProtocolFee
LiquidityProviderFee
CreatorFee
CreatorFeeProtocolFee
ReflectionFee

HighReflectionFeeEvent#

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

LiquidityPoolAllowlist#

Struct types::LiquidityPoolAllowlist.

FieldType
swapu8
remove_liquidityu8
deposit_liquidityu8
same_slot_tradingu8
update_creator_trading_feeu8
padding1[u8; 2]

LiquidityPoolFeatureFlags#

Struct types::LiquidityPoolFeatureFlags.

FieldType
sandwich_resistant_modeu8
padding1[u8; 7]

LiquidityPoolInfo#

Struct types::LiquidityPoolInfo.

FieldType
creatorPubkey
update_authorityPubkey
open_atu64
created_atu64
protocol_config_versionu16
r_typeu8
pool_authority_bumpu8
temp_sol_holder_bumpu8
pad[u8; 3]

LiquidityPoolLpTokenInfo#

Struct types::LiquidityPoolLpTokenInfo.

FieldType
supplyLiquidityPoolLpTokenSupply
decimalsu8
pad[u8; 7]

LiquidityPoolLpTokenSupply#

Struct types::LiquidityPoolLpTokenSupply.

FieldType
initialu64
totalu64
unlockedu64
lockedu64
burntu64

LiquidityPoolMarketCapBasedFees#

Struct types::LiquidityPoolMarketCapBasedFees.

FieldType
protocol_trading_feeFeeBrackets
liquidity_provider_trading_feeFeeBrackets
creator_trading_feeFeeBrackets
creator_trading_fee_protocol_feeFeeBrackets
reflection_trading_feeFeeBrackets

LiquidityPoolReserve#

Struct types::LiquidityPoolReserve.

FieldType
token_au64
token_bu64
snapshot_slotu64
snapshot_au64
snapshot_bu64
accumulated_fee_per_lp_tokenu64
initial_au64
initial_bu64
leader_slot_windowu8
pad[u8; 7]

LiquidityPoolSlotOffsetBasedFees#

Struct types::LiquidityPoolSlotOffsetBasedFees.

FieldType
protocol_trading_feeSlotFeeBrackets
liquidity_provider_trading_feeSlotFeeBrackets
creator_trading_feeSlotFeeBrackets
creator_trading_fee_protocol_feeSlotFeeBrackets
reflection_trading_feeSlotFeeBrackets
pad[u8; 6]

LiquidityPoolTokenInfo#

Struct types::LiquidityPoolTokenInfo.

FieldType
mintPubkey
decimalsu8
ownerPubkey

LiquidityPoolType#

Enum types::LiquidityPoolType.

Variant
None
Pro
Standard

MigrationEvent#

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

ProtocolConfigParams#

Struct types::ProtocolConfigParams.

FieldType
create_pool_feeu64
allow_create_poolbool
supported_pool_typeLiquidityPoolType
market_cap_based_feesLiquidityPoolMarketCapBasedFees
initial_token_b_amountf64
initial_token_a_amountu64
default_leader_slot_windowu8
auto_staking_enabledbool
sandwich_resistence_enabledbool
buffer_bpsu16
auto_staking_threshold_bpsu16
token_a_decimalsu8
max_creator_trading_feeu32
max_supply_per_walletu64
creator_trading_fee_trading_volume_thresholdf64
migration_market_cap_thresholdu16

RemoveLiquidityParams#

Struct types::RemoveLiquidityParams.

FieldType
lp_tokens_to_burnu64
min_token_au64
min_token_bu64

SellParams#

Struct types::SellParams.

FieldType
amount_inu64
minimum_amount_outu64
encoded_user_defined_event_dataString

SlotFeeBracket#

Struct types::SlotFeeBracket.

FieldType
buy_fee_bpsu16
sell_fee_bpsu16
slot_offset_upperboundu16

SlotFeeBrackets#

Struct types::SlotFeeBrackets.

FieldType
brackets[SlotFeeBracket; 42]
max_slot_offsetu16
max_fee_bpsu16
countu8
enabledu8
padding[u8; 4]

SlotFeeBracketsParams#

Struct types::SlotFeeBracketsParams.

FieldType
bracketsVec<SlotFeeBracket>
max_slot_offsetu16
max_fee_bpsu16
countu8
enabledu8

TradeEvent#

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

UserDefinedEvent#

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

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

Your endpoints

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