PumpSwap decoder
Decode PumpSwap instructions, accounts and events in Rust with carbon-pump-swap-decoder 2.0.0. Program ID pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA.
On this page
carbon-pump-swap-decoder decodes the instructions, accounts and events of the PumpSwap program (pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA): 25 instructions, 7 account types, 22 events. It is generated with Codama from the program's IDL; see decoders for how decoders plug into a pipeline.
| Crate | carbon-pump-swap-decoder 2.0.0 |
| Install | cargo add carbon-pump-swap-decoder@2. |
| Program ID | pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA (carbon_) |
| Category | DEX & AMM |
| Decoder | carbon_ |
| Instruction enum | instructions:: |
| Account enum | accounts:: |
| Event enum | instructions:: |
| Features | serde, postgres, graphql (none enabled by default) |
| API docs | docs.rs/carbon-pump-swap-decoder/2.0.0 |
| Source | decoders/pump-swap-decoder |
Other DEX and AMM decoders: BonkSwap, FluxBeam, Gavel, Heaven, 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, 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.
Guide: Index swaps across DEXs.
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 PumpSwap transactions from the public RPC and prints every decoded Buy instruction. Add the dependencies:
cargo add carbon-core@2.0.0 carbon-pump-swap-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_pump_swap_decoder::{instructions::PumpSwapInstruction, PumpSwapDecoder, 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(PumpSwapDecoder, InstructionLogger)
.build()?
.run()
.await
}
struct InstructionLogger;
impl Processor<InstructionProcessorInputType<'_, PumpSwapInstruction>> for InstructionLogger {
async fn process(
&mut self,
input: &InstructionProcessorInputType<'_, PumpSwapInstruction>,
) -> CarbonResult<()> {
let signature = input.metadata.transaction_metadata.signature;
if let PumpSwapInstruction::Buy { data, accounts, .. } = input.decoded_instruction {
println!("buy {signature}: {data:?} pool={}", accounts.pool);
}
Ok(())
}
}RUST_LOG=info cargo runEach 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 PumpSwapInstruction:: (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 Pool 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_pump_swap_decoder::{accounts::PumpSwapAccount, PumpSwapDecoder, 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(PumpSwapDecoder, AccountLogger)
.build()?
.run()
.await
}
struct AccountLogger;
impl Processor<AccountProcessorInputType<'_, PumpSwapAccount>> for AccountLogger {
async fn process(
&mut self,
input: &AccountProcessorInputType<'_, PumpSwapAccount>,
) -> CarbonResult<()> {
if let PumpSwapAccount::Pool(pool) = &input.decoded_account.data {
println!("pool {}: {pool:?}", input.metadata.pubkey);
}
Ok(())
}
}RUST_LOG=info cargo runEach update to a Pool 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 PumpSwapInstruction. Each is PumpSwapInstruction::, 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
pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA. - 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.
AdminSetCoinCreator#
From the program's IDL:
Overrides the coin creator for a canonical pump pool
Discriminator f228759149606968 · data AdminSetCoinCreator · accounts AdminSetCoinCreatorInstructionAccounts.
| Field | Type |
|---|---|
coin_ | Pubkey |
Required accounts: 5; extras go to remaining.
Fields of AdminSetCoinCreatorInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin_ | Pubkey |
| 1 | global_ | Pubkey |
| 2 | pool | Pubkey |
| 3 | event_ | Pubkey |
| 4 | program | Pubkey |
| 5… | remaining | Vec< |
AdminUpdateTokenIncentives#
Discriminator d10b7357d5177ccc · data AdminUpdateTokenIncentives · accounts AdminUpdateTokenIncentivesInstructionAccounts.
| Field | Type |
|---|---|
start_time | i64 |
end_time | i64 |
seconds_ | i64 |
day_number | u64 |
token_ | u64 |
Required accounts: 10; extras go to remaining.
Fields of AdminUpdateTokenIncentivesInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | global_ | Pubkey |
| 2 | global_ | Pubkey |
| 3 | mint | Pubkey |
| 4 | global_ | Pubkey |
| 5 | associated_ | Pubkey |
| 6 | system_ | Pubkey |
| 7 | token_ | Pubkey |
| 8 | event_ | Pubkey |
| 9 | program | Pubkey |
| 10… | remaining | Vec< |
Buy#
From the program's IDL:
For cashback coins, optionally pass user_volume_accumulator_wsol_ata as remaining_accounts[0]. If provided and valid, the ATA will be initialized if needed.
Discriminator 66063d1201daebea · data Buy · accounts BuyInstructionAccounts.
| Field | Type |
|---|---|
base_ | u64 |
max_ | u64 |
track_ | OptionBool |
Required accounts: 23; extras go to remaining.
Fields of BuyInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | pool | Pubkey |
| 1 | user | Pubkey |
| 2 | global_ | Pubkey |
| 3 | base_mint | Pubkey |
| 4 | quote_mint | Pubkey |
| 5 | user_ | Pubkey |
| 6 | user_ | Pubkey |
| 7 | pool_ | Pubkey |
| 8 | pool_ | Pubkey |
| 9 | protocol_ | Pubkey |
| 10 | protocol_ | Pubkey |
| 11 | base_ | Pubkey |
| 12 | quote_ | Pubkey |
| 13 | system_ | Pubkey |
| 14 | associated_ | Pubkey |
| 15 | event_ | Pubkey |
| 16 | program | Pubkey |
| 17 | coin_ | Pubkey |
| 18 | coin_ | Pubkey |
| 19 | global_ | Pubkey |
| 20 | user_ | Pubkey |
| 21 | fee_config | Pubkey |
| 22 | fee_program | Pubkey |
| 23… | remaining | Vec< |
BuyExactQuoteIn#
From the program's IDL:
Given a budget of spendable_quote_in, buy at least min_base_amount_out
Fees will be deducted from spendable_quote_in f(quote) = tokens, where tokens >= min_base_amount_out
Make sure the payer has enough SOL to cover creation of the following accounts (unless already created):
- protocol_fee_recipient_token_account:
rent.minimum_balance(TokenAccount::LEN)- coin_creator_vault_ata: rent.minimum_balance(TokenAccount::LEN)
- user_volume_accumulator: rent.minimum_balance(UserVolumeAccumulator::LEN)
For cashback coins, optionally pass user_volume_accumulator_wsol_ata as remaining_accounts[0]. If provided and valid, the ATA will be initialized if needed.
Discriminator c62e1552b4d9e870 · data BuyExactQuoteIn · accounts BuyExactQuoteInInstructionAccounts.
| Field | Type |
|---|---|
spendable_ | u64 |
min_ | u64 |
track_ | OptionBool |
Required accounts: 23; extras go to remaining.
Fields of BuyExactQuoteInInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | pool | Pubkey |
| 1 | user | Pubkey |
| 2 | global_ | Pubkey |
| 3 | base_mint | Pubkey |
| 4 | quote_mint | Pubkey |
| 5 | user_ | Pubkey |
| 6 | user_ | Pubkey |
| 7 | pool_ | Pubkey |
| 8 | pool_ | Pubkey |
| 9 | protocol_ | Pubkey |
| 10 | protocol_ | Pubkey |
| 11 | base_ | Pubkey |
| 12 | quote_ | Pubkey |
| 13 | system_ | Pubkey |
| 14 | associated_ | Pubkey |
| 15 | event_ | Pubkey |
| 16 | program | Pubkey |
| 17 | coin_ | Pubkey |
| 18 | coin_ | Pubkey |
| 19 | global_ | Pubkey |
| 20 | user_ | Pubkey |
| 21 | fee_config | Pubkey |
| 22 | fee_program | Pubkey |
| 23… | remaining | Vec< |
ClaimCashback#
Discriminator 253a237ebe35e4c5 · data ClaimCashback · accounts ClaimCashbackInstructionAccounts.
No data fields.
Required accounts: 9; extras go to remaining.
Fields of ClaimCashbackInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | user | Pubkey |
| 1 | user_ | Pubkey |
| 2 | quote_mint | Pubkey |
| 3 | quote_ | Pubkey |
| 4 | user_ | Pubkey |
| 5 | user_ | Pubkey |
| 6 | system_ | Pubkey |
| 7 | event_ | Pubkey |
| 8 | program | Pubkey |
| 9… | remaining | Vec< |
ClaimTokenIncentives#
Discriminator 1004471ccc01281b · data ClaimTokenIncentives · accounts ClaimTokenIncentivesInstructionAccounts.
No data fields.
Required accounts: 12; extras go to remaining.
Fields of ClaimTokenIncentivesInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | user | Pubkey |
| 1 | user_ata | Pubkey |
| 2 | global_ | Pubkey |
| 3 | global_ | Pubkey |
| 4 | user_ | Pubkey |
| 5 | mint | Pubkey |
| 6 | token_ | Pubkey |
| 7 | system_ | Pubkey |
| 8 | associated_ | Pubkey |
| 9 | event_ | Pubkey |
| 10 | program | Pubkey |
| 11 | payer | Pubkey |
| 12… | remaining | Vec< |
CloseUserVolumeAccumulator#
Discriminator f945a4da9667548a · data CloseUserVolumeAccumulator · accounts CloseUserVolumeAccumulatorInstructionAccounts.
No data fields.
Required accounts: 4; extras go to remaining.
Fields of CloseUserVolumeAccumulatorInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | user | Pubkey |
| 1 | user_ | Pubkey |
| 2 | event_ | Pubkey |
| 3 | program | Pubkey |
| 4… | remaining | Vec< |
CollectCoinCreatorFee#
Discriminator a039592ab58b2b42 · data CollectCoinCreatorFee · accounts CollectCoinCreatorFeeInstructionAccounts.
No data fields.
Required accounts: 8; extras go to remaining.
Fields of CollectCoinCreatorFeeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | quote_mint | Pubkey |
| 1 | quote_ | Pubkey |
| 2 | coin_ | Pubkey |
| 3 | coin_ | Pubkey |
| 4 | coin_ | Pubkey |
| 5 | coin_ | Pubkey |
| 6 | event_ | Pubkey |
| 7 | program | Pubkey |
| 8… | remaining | Vec< |
CreateConfig#
Discriminator c9cff3724b6f2fbd · data CreateConfig · accounts CreateConfigInstructionAccounts.
| Field | Type |
|---|---|
lp_ | u64 |
protocol_ | u64 |
protocol_ | [Pubkey; 8] |
coin_ | u64 |
admin_ | Pubkey |
Required accounts: 5; extras go to remaining.
Fields of CreateConfigInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | global_ | Pubkey |
| 2 | system_ | Pubkey |
| 3 | event_ | Pubkey |
| 4 | program | Pubkey |
| 5… | remaining | Vec< |
CreatePool#
Discriminator e992d18ecf6840bc · data CreatePool · accounts CreatePoolInstructionAccounts.
| Field | Type |
|---|---|
index | u16 |
base_ | u64 |
quote_ | u64 |
coin_ | Pubkey |
is_ | bool |
is_ | OptionBool |
Required accounts: 18; extras go to remaining.
Fields of CreatePoolInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | pool | Pubkey |
| 1 | global_ | Pubkey |
| 2 | creator | Pubkey |
| 3 | base_mint | Pubkey |
| 4 | quote_mint | Pubkey |
| 5 | lp_mint | Pubkey |
| 6 | user_ | Pubkey |
| 7 | user_ | Pubkey |
| 8 | user_ | Pubkey |
| 9 | pool_ | Pubkey |
| 10 | pool_ | Pubkey |
| 11 | system_ | Pubkey |
| 12 | token2022_ | Pubkey |
| 13 | base_ | Pubkey |
| 14 | quote_ | Pubkey |
| 15 | associated_ | Pubkey |
| 16 | event_ | Pubkey |
| 17 | program | Pubkey |
| 18… | remaining | Vec< |
Deposit#
Discriminator f223c68952e1f2b6 · data Deposit · accounts DepositInstructionAccounts.
| Field | Type |
|---|---|
lp_ | u64 |
max_ | u64 |
max_ | u64 |
Required accounts: 15; extras go to remaining.
Fields of DepositInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | pool | Pubkey |
| 1 | global_ | Pubkey |
| 2 | user | Pubkey |
| 3 | base_mint | Pubkey |
| 4 | quote_mint | Pubkey |
| 5 | lp_mint | Pubkey |
| 6 | user_ | Pubkey |
| 7 | user_ | Pubkey |
| 8 | user_ | Pubkey |
| 9 | pool_ | Pubkey |
| 10 | pool_ | Pubkey |
| 11 | token_ | Pubkey |
| 12 | token2022_ | Pubkey |
| 13 | event_ | Pubkey |
| 14 | program | Pubkey |
| 15… | remaining | Vec< |
Disable#
Discriminator b9adbb5ad80feee9 · data Disable · accounts DisableInstructionAccounts.
| Field | Type |
|---|---|
disable_ | bool |
disable_ | bool |
disable_ | bool |
disable_buy | bool |
disable_ | bool |
Required accounts: 4; extras go to remaining.
Fields of DisableInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | global_ | Pubkey |
| 2 | event_ | Pubkey |
| 3 | program | Pubkey |
| 4… | remaining | Vec< |
ExtendAccount#
Discriminator ea66c2cb96483ee5 · data ExtendAccount · accounts ExtendAccountInstructionAccounts.
No data fields.
Required accounts: 5; extras go to remaining.
Fields of ExtendAccountInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | account | Pubkey |
| 1 | user | Pubkey |
| 2 | system_ | Pubkey |
| 3 | event_ | Pubkey |
| 4 | program | Pubkey |
| 5… | remaining | Vec< |
InitUserVolumeAccumulator#
Discriminator 5e06ca73ff60e8b7 · data InitUserVolumeAccumulator · accounts InitUserVolumeAccumulatorInstructionAccounts.
No data fields.
Required accounts: 6; extras go to remaining.
Fields of InitUserVolumeAccumulatorInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | payer | Pubkey |
| 1 | user | Pubkey |
| 2 | user_ | Pubkey |
| 3 | system_ | Pubkey |
| 4 | event_ | Pubkey |
| 5 | program | Pubkey |
| 6… | remaining | Vec< |
MigratePoolCoinCreator#
From the program's IDL:
Migrate Pool Coin Creator to Sharing Config
Discriminator d0089f044aaf103a · data MigratePoolCoinCreator · accounts MigratePoolCoinCreatorInstructionAccounts.
No data fields.
Required accounts: 4; extras go to remaining.
Fields of MigratePoolCoinCreatorInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | pool | Pubkey |
| 1 | sharing_ | Pubkey |
| 2 | event_ | Pubkey |
| 3 | program | Pubkey |
| 4… | remaining | Vec< |
Sell#
Discriminator 33e685a4017f83ad · data Sell · accounts SellInstructionAccounts.
| Field | Type |
|---|---|
base_ | u64 |
min_ | u64 |
Required accounts: 21; extras go to remaining.
Fields of SellInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | pool | Pubkey |
| 1 | user | Pubkey |
| 2 | global_ | Pubkey |
| 3 | base_mint | Pubkey |
| 4 | quote_mint | Pubkey |
| 5 | user_ | Pubkey |
| 6 | user_ | Pubkey |
| 7 | pool_ | Pubkey |
| 8 | pool_ | Pubkey |
| 9 | protocol_ | Pubkey |
| 10 | protocol_ | Pubkey |
| 11 | base_ | Pubkey |
| 12 | quote_ | Pubkey |
| 13 | system_ | Pubkey |
| 14 | associated_ | Pubkey |
| 15 | event_ | Pubkey |
| 16 | program | Pubkey |
| 17 | coin_ | Pubkey |
| 18 | coin_ | Pubkey |
| 19 | fee_config | Pubkey |
| 20 | fee_program | Pubkey |
| 21… | remaining | Vec< |
SetCoinCreator#
From the program's IDL:
Sets Pool::coin_creator from Metaplex metadata creator or
BondingCurve::creator
Discriminator d295802dbc3a4eaf · data SetCoinCreator · accounts SetCoinCreatorInstructionAccounts.
No data fields.
Required accounts: 5; extras go to remaining.
Fields of SetCoinCreatorInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | pool | Pubkey |
| 1 | metadata | Pubkey |
| 2 | bonding_ | Pubkey |
| 3 | event_ | Pubkey |
| 4 | program | Pubkey |
| 5… | remaining | Vec< |
SetReservedFeeRecipients#
Discriminator 6faca2e87259d58e · data SetReservedFeeRecipients · accounts SetReservedFeeRecipientsInstructionAccounts.
| Field | Type |
|---|---|
whitelist_ | Pubkey |
Required accounts: 4; extras go to remaining.
Fields of SetReservedFeeRecipientsInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | global_ | Pubkey |
| 1 | admin | Pubkey |
| 2 | event_ | Pubkey |
| 3 | program | Pubkey |
| 4… | remaining | Vec< |
SyncUserVolumeAccumulator#
Discriminator 561fc057a3574fee · data SyncUserVolumeAccumulator · accounts SyncUserVolumeAccumulatorInstructionAccounts.
No data fields.
Required accounts: 5; extras go to remaining.
Fields of SyncUserVolumeAccumulatorInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | user | Pubkey |
| 1 | global_ | Pubkey |
| 2 | user_ | Pubkey |
| 3 | event_ | Pubkey |
| 4 | program | Pubkey |
| 5… | remaining | Vec< |
ToggleCashbackEnabled#
Discriminator 7367e0ffbd5956c3 · data ToggleCashbackEnabled · accounts ToggleCashbackEnabledInstructionAccounts.
| Field | Type |
|---|---|
enabled | bool |
Required accounts: 4; extras go to remaining.
Fields of ToggleCashbackEnabledInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | global_ | Pubkey |
| 2 | event_ | Pubkey |
| 3 | program | Pubkey |
| 4… | remaining | Vec< |
ToggleMayhemMode#
Discriminator 01096fd0641fffa3 · data ToggleMayhemMode · accounts ToggleMayhemModeInstructionAccounts.
| Field | Type |
|---|---|
enabled | bool |
Required accounts: 4; extras go to remaining.
Fields of ToggleMayhemModeInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | global_ | Pubkey |
| 2 | event_ | Pubkey |
| 3 | program | Pubkey |
| 4… | remaining | Vec< |
TransferCreatorFeesToPump#
From the program's IDL:
Transfer creator fees to pump creator vault
If coin creator fees are currently below rent.minimum_balance(TokenAccount::LEN) The transfer will be skipped
Discriminator 8b348655e4e56cf1 · data TransferCreatorFeesToPump · accounts TransferCreatorFeesToPumpInstructionAccounts.
No data fields.
Required accounts: 10; extras go to remaining.
Fields of TransferCreatorFeesToPumpInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | wsol_mint | Pubkey |
| 1 | token_ | Pubkey |
| 2 | system_ | Pubkey |
| 3 | associated_ | Pubkey |
| 4 | coin_ | Pubkey |
| 5 | coin_ | Pubkey |
| 6 | coin_ | Pubkey |
| 7 | pump_ | Pubkey |
| 8 | event_ | Pubkey |
| 9 | program | Pubkey |
| 10… | remaining | Vec< |
UpdateAdmin#
Discriminator a1b028d53cb8b3e4 · data UpdateAdmin · accounts UpdateAdminInstructionAccounts.
No data fields.
Required accounts: 5; extras go to remaining.
Fields of UpdateAdminInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | global_ | Pubkey |
| 2 | new_admin | Pubkey |
| 3 | event_ | Pubkey |
| 4 | program | Pubkey |
| 5… | remaining | Vec< |
UpdateFeeConfig#
Discriminator 68b867f258976b14 · data UpdateFeeConfig · accounts UpdateFeeConfigInstructionAccounts.
| Field | Type |
|---|---|
lp_ | u64 |
protocol_ | u64 |
protocol_ | [Pubkey; 8] |
coin_ | u64 |
admin_ | Pubkey |
Required accounts: 4; extras go to remaining.
Fields of UpdateFeeConfigInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | admin | Pubkey |
| 1 | global_ | Pubkey |
| 2 | event_ | Pubkey |
| 3 | program | Pubkey |
| 4… | remaining | Vec< |
Withdraw#
Discriminator b712469c946da122 · data Withdraw · accounts WithdrawInstructionAccounts.
| Field | Type |
|---|---|
lp_ | u64 |
min_ | u64 |
min_ | u64 |
Required accounts: 15; extras go to remaining.
Fields of WithdrawInstructionAccounts, in account order:
| # | Field | Type |
|---|---|---|
| 0 | pool | Pubkey |
| 1 | global_ | Pubkey |
| 2 | user | Pubkey |
| 3 | base_mint | Pubkey |
| 4 | quote_mint | Pubkey |
| 5 | lp_mint | Pubkey |
| 6 | user_ | Pubkey |
| 7 | user_ | Pubkey |
| 8 | user_ | Pubkey |
| 9 | pool_ | Pubkey |
| 10 | pool_ | Pubkey |
| 11 | token_ | Pubkey |
| 12 | token2022_ | Pubkey |
| 13 | event_ | Pubkey |
| 14 | program | Pubkey |
| 15… | 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 PumpSwapAccount. Each wraps a boxed struct from carbon_. decode_ only considers accounts owned by PROGRAM_ID and returns the first variant that matches.
BondingCurve#
Discriminator 17b7f83760d8ac60 · accounts::.
| Field | Type |
|---|---|
virtual_ | u64 |
virtual_ | u64 |
real_ | u64 |
real_ | u64 |
token_ | u64 |
complete | bool |
creator | Pubkey |
is_ | bool |
is_ | bool |
FeeConfig#
Discriminator 8f3492bbdb7b4c9b · accounts::.
| Field | Type |
|---|---|
bump | u8 |
admin | Pubkey |
flat_fees | Fees |
fee_tiers | Vec< |
GlobalConfig#
Discriminator 95089ccaa0fcb0d9 · accounts::.
| Field | Type | Description |
|---|---|---|
admin | Pubkey | The admin pubkey |
lp_ | u64 | |
protocol_ | u64 | |
disable_ | u8 | Flags to disable certain functionality bit 0 - Disable create pool bit 1 - Disable deposit bit 2 - Disable withdraw bit 3 - Disable buy bit 4 - Disable sell |
protocol_ | [Pubkey; 8] | Addresses of the protocol fee recipients |
coin_ | u64 | |
admin_ | Pubkey | The admin authority for setting coin creators |
whitelist_ | Pubkey | |
reserved_ | Pubkey | |
mayhem_ | bool | |
reserved_ | [Pubkey; 7] | |
is_ | bool |
GlobalVolumeAccumulator#
Discriminator ca2af62b8ebe1eff · accounts::.
| Field | Type |
|---|---|
start_time | i64 |
end_time | i64 |
seconds_ | i64 |
mint | Pubkey |
total_ | [u64; 30] |
sol_volumes | [u64; 30] |
Pool#
Discriminator f19a6d0411b16dbc · accounts::.
| Field | Type | Description |
|---|---|---|
pool_bump | u8 | |
index | u16 | |
creator | Pubkey | |
base_mint | Pubkey | |
quote_mint | Pubkey | |
lp_mint | Pubkey | |
pool_ | Pubkey | |
pool_ | Pubkey | |
lp_supply | u64 | True circulating supply without burns and lock-ups |
coin_ | Pubkey | |
is_ | bool | |
is_ | bool |
SharingConfig#
Discriminator d84a0900388c5d4b · accounts::.
| Field | Type |
|---|---|
bump | u8 |
version | u8 |
status | ConfigStatus |
mint | Pubkey |
admin | Pubkey |
admin_ | bool |
shareholders | Vec< |
UserVolumeAccumulator#
Discriminator 56ff700e66359afa · accounts::.
| Field | Type |
|---|---|
user | Pubkey |
needs_claim | bool |
total_ | u64 |
total_ | u64 |
current_ | u64 |
last_ | i64 |
has_ | bool |
cashback_ | u64 |
total_ | u64 |
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.
AdminSetCoinCreatorEvent#
Discriminator 2ddc5d181961ac68 · events::.
| Field | Type |
|---|---|
timestamp | i64 |
admin_ | Pubkey |
base_mint | Pubkey |
pool | Pubkey |
old_ | Pubkey |
new_ | Pubkey |
AdminUpdateTokenIncentivesEvent#
Discriminator 93fa6c78f71d43de · events::.
| Field | Type |
|---|---|
start_time | i64 |
end_time | i64 |
day_number | u64 |
token_ | u64 |
mint | Pubkey |
seconds_ | i64 |
timestamp | i64 |
BuyEvent#
Discriminator 67f4521f2cf57777 · events::.
| Field | Type |
|---|---|
timestamp | i64 |
base_ | u64 |
max_ | u64 |
user_ | u64 |
user_ | u64 |
pool_ | u64 |
pool_ | u64 |
quote_ | u64 |
lp_ | u64 |
lp_fee | u64 |
protocol_ | u64 |
protocol_ | u64 |
quote_ | u64 |
user_ | u64 |
pool | Pubkey |
user | Pubkey |
user_ | Pubkey |
user_ | Pubkey |
protocol_ | Pubkey |
protocol_ | Pubkey |
coin_ | Pubkey |
coin_ | u64 |
coin_ | u64 |
track_ | bool |
total_ | u64 |
total_ | u64 |
current_ | u64 |
last_ | i64 |
min_ | u64 |
ix_name | String |
cashback_ | u64 |
cashback | u64 |
ClaimCashbackEvent#
Discriminator e2d6f62107f293e5 · events::.
| Field | Type |
|---|---|
user | Pubkey |
amount | u64 |
timestamp | i64 |
total_ | u64 |
total_ | u64 |
ClaimTokenIncentivesEvent#
Discriminator 4facf631cd5bcee8 · events::.
| Field | Type |
|---|---|
user | Pubkey |
mint | Pubkey |
amount | u64 |
timestamp | i64 |
total_ | u64 |
current_ | u64 |
CloseUserVolumeAccumulatorEvent#
Discriminator 929fbdac925838f4 · events::.
| Field | Type |
|---|---|
user | Pubkey |
timestamp | i64 |
total_ | u64 |
total_ | u64 |
current_ | u64 |
last_ | i64 |
CollectCoinCreatorFeeEvent#
Discriminator e8f5c2eeeada3a59 · events::.
| Field | Type |
|---|---|
timestamp | i64 |
coin_ | Pubkey |
coin_ | u64 |
coin_ | Pubkey |
coin_ | Pubkey |
CreateConfigEvent#
Discriminator 6b34598137e25116 · events::.
| Field | Type |
|---|---|
timestamp | i64 |
admin | Pubkey |
lp_ | u64 |
protocol_ | u64 |
protocol_ | [Pubkey; 8] |
coin_ | u64 |
admin_ | Pubkey |
CreatePoolEvent#
Discriminator b1310cd2a076a774 · events::.
| Field | Type |
|---|---|
timestamp | i64 |
index | u16 |
creator | Pubkey |
base_mint | Pubkey |
quote_mint | Pubkey |
base_ | u8 |
quote_ | u8 |
base_ | u64 |
quote_ | u64 |
pool_ | u64 |
pool_ | u64 |
minimum_ | u64 |
initial_ | u64 |
lp_ | u64 |
pool_bump | u8 |
pool | Pubkey |
lp_mint | Pubkey |
user_ | Pubkey |
user_ | Pubkey |
coin_ | Pubkey |
is_ | bool |
DepositEvent#
Discriminator 78f83d531f8e6b90 · events::.
| Field | Type |
|---|---|
timestamp | i64 |
lp_ | u64 |
max_ | u64 |
max_ | u64 |
user_ | u64 |
user_ | u64 |
pool_ | u64 |
pool_ | u64 |
base_ | u64 |
quote_ | u64 |
lp_ | u64 |
pool | Pubkey |
user | Pubkey |
user_ | Pubkey |
user_ | Pubkey |
user_ | Pubkey |
DisableEvent#
Discriminator 6bfdc14ce4ca1b68 · events::.
| Field | Type |
|---|---|
timestamp | i64 |
admin | Pubkey |
disable_ | bool |
disable_ | bool |
disable_ | bool |
disable_buy | bool |
disable_ | bool |
ExtendAccountEvent#
Discriminator 6161d7905d92167c · events::.
| Field | Type |
|---|---|
timestamp | i64 |
account | Pubkey |
user | Pubkey |
current_ | u64 |
new_size | u64 |
InitUserVolumeAccumulatorEvent#
Discriminator 86240d48e86582d8 · events::.
| Field | Type |
|---|---|
payer | Pubkey |
user | Pubkey |
timestamp | i64 |
MigratePoolCoinCreatorEvent#
Discriminator aadd52c793a5f72e · events::.
| Field | Type |
|---|---|
timestamp | i64 |
base_mint | Pubkey |
pool | Pubkey |
sharing_ | Pubkey |
old_ | Pubkey |
new_ | Pubkey |
ReservedFeeRecipientsEvent#
Discriminator 2bbcfa12dd4bbb5f · events::.
| Field | Type |
|---|---|
timestamp | i64 |
reserved_ | Pubkey |
reserved_ | [Pubkey; 7] |
SellEvent#
Discriminator 3e2f370aa503dc2a · events::.
| Field | Type |
|---|---|
timestamp | i64 |
base_ | u64 |
min_ | u64 |
user_ | u64 |
user_ | u64 |
pool_ | u64 |
pool_ | u64 |
quote_ | u64 |
lp_ | u64 |
lp_fee | u64 |
protocol_ | u64 |
protocol_ | u64 |
quote_ | u64 |
user_ | u64 |
pool | Pubkey |
user | Pubkey |
user_ | Pubkey |
user_ | Pubkey |
protocol_ | Pubkey |
protocol_ | Pubkey |
coin_ | Pubkey |
coin_ | u64 |
coin_ | u64 |
cashback_ | u64 |
cashback | u64 |
SetBondingCurveCoinCreatorEvent#
Discriminator f2e7eb664163bdd3 · events::.
| Field | Type |
|---|---|
timestamp | i64 |
base_mint | Pubkey |
pool | Pubkey |
bonding_ | Pubkey |
coin_ | Pubkey |
SetMetaplexCoinCreatorEvent#
Discriminator 966bc77b7ccf66e4 · events::.
| Field | Type |
|---|---|
timestamp | i64 |
base_mint | Pubkey |
pool | Pubkey |
metadata | Pubkey |
coin_ | Pubkey |
SyncUserVolumeAccumulatorEvent#
Discriminator c57aa77c74515bff · events::.
| Field | Type |
|---|---|
user | Pubkey |
total_ | u64 |
total_ | u64 |
timestamp | i64 |
UpdateAdminEvent#
Discriminator e198ab57f63f42ea · events::.
| Field | Type |
|---|---|
timestamp | i64 |
admin | Pubkey |
new_admin | Pubkey |
UpdateFeeConfigEvent#
Discriminator 5a1741233ef4bcd0 · events::.
| Field | Type |
|---|---|
timestamp | i64 |
admin | Pubkey |
lp_ | u64 |
protocol_ | u64 |
protocol_ | [Pubkey; 8] |
coin_ | u64 |
admin_ | Pubkey |
WithdrawEvent#
Discriminator 1609851aa02c47c0 · events::.
| Field | Type |
|---|---|
timestamp | i64 |
lp_ | u64 |
min_ | u64 |
min_ | u64 |
user_ | u64 |
user_ | u64 |
pool_ | u64 |
pool_ | u64 |
base_ | u64 |
quote_ | u64 |
lp_ | u64 |
pool | Pubkey |
user | Pubkey |
user_ | Pubkey |
user_ | Pubkey |
user_ | Pubkey |
Types#
Types used by the instructions, accounts and events above, exported from carbon_.
AdminSetCoinCreatorEvent#
Struct types::. Same fields as the AdminSetCoinCreatorEvent event.
AdminUpdateTokenIncentivesEvent#
Struct types::. Same fields as the AdminUpdateTokenIncentivesEvent event.
BuyEvent#
From the program's IDL:
ix_name: "buy" | "buy_exact_quote_in"
Struct types::. Same fields as the BuyEvent event.
ClaimCashbackEvent#
Struct types::. Same fields as the ClaimCashbackEvent event.
ClaimTokenIncentivesEvent#
Struct types::. Same fields as the ClaimTokenIncentivesEvent event.
CloseUserVolumeAccumulatorEvent#
Struct types::. Same fields as the CloseUserVolumeAccumulatorEvent event.
CollectCoinCreatorFeeEvent#
Struct types::. Same fields as the CollectCoinCreatorFeeEvent event.
ConfigStatus#
Enum types::.
| Variant |
|---|
Paused |
Active |
CreateConfigEvent#
Struct types::. Same fields as the CreateConfigEvent event.
CreatePoolEvent#
Struct types::. Same fields as the CreatePoolEvent event.
DepositEvent#
Struct types::. Same fields as the DepositEvent event.
DisableEvent#
Struct types::. Same fields as the DisableEvent event.
ExtendAccountEvent#
Struct types::. Same fields as the ExtendAccountEvent event.
Fees#
Struct types::Fees.
| Field | Type |
|---|---|
lp_fee_bps | u64 |
protocol_ | u64 |
creator_ | u64 |
FeeTier#
Struct types::.
| Field | Type |
|---|---|
market_ | u128 |
fees | Fees |
InitUserVolumeAccumulatorEvent#
Struct types::. Same fields as the InitUserVolumeAccumulatorEvent event.
MigratePoolCoinCreatorEvent#
Struct types::. Same fields as the MigratePoolCoinCreatorEvent event.
OptionBool#
Tuple struct types:: (bool).
ReservedFeeRecipientsEvent#
Struct types::. Same fields as the ReservedFeeRecipientsEvent event.
SellEvent#
Struct types::. Same fields as the SellEvent event.
SetBondingCurveCoinCreatorEvent#
Struct types::. Same fields as the SetBondingCurveCoinCreatorEvent event.
SetMetaplexCoinCreatorEvent#
Struct types::. Same fields as the SetMetaplexCoinCreatorEvent event.
Shareholder#
Struct types::.
| Field | Type |
|---|---|
address | Pubkey |
share_bps | u16 |
SyncUserVolumeAccumulatorEvent#
Struct types::. Same fields as the SyncUserVolumeAccumulatorEvent event.
UpdateAdminEvent#
Struct types::. Same fields as the UpdateAdminEvent event.
UpdateFeeConfigEvent#
Struct types::. Same fields as the UpdateFeeConfigEvent event.
WithdrawEvent#
Struct types::. Same fields as the WithdrawEvent event.