Skip to main content

pump_rust_client/
constants.rs

1//! Program IDs and seed constants for the `pump` and `pump_amm` programs.
2//!
3//! Standard SPL / Metaplex / wSOL pubkeys are re-bound from the upstream
4//! crates via `anchor_spl` so we never duplicate the byte literals. The
5//! pump-specific values that no upstream crate exports (the `pump_fees` and
6//! `mayhem` program IDs, the reward-token mint, the lookup tables, and the
7//! seed strings) are sourced directly from the IDLs in `idls/pump.json` and
8//! `idls/pump_amm.json`.
9
10use solana_program::{pubkey, pubkey::Pubkey};
11
12pub const SPL_TOKEN_PROGRAM_ID: Pubkey = anchor_spl::token::ID;
13pub const SPL_TOKEN_2022_PROGRAM_ID: Pubkey = anchor_spl::token_2022::ID;
14pub const SPL_ATA_PROGRAM_ID: Pubkey = anchor_spl::associated_token::ID;
15pub const MPL_TOKEN_METADATA_PROGRAM_ID: Pubkey = anchor_spl::metadata::ID;
16/// Wrapped-SOL mint, used as the default quote mint.
17pub const NATIVE_MINT: Pubkey = anchor_spl::token::spl_token::native_mint::ID;
18/// Pump's reward-token mint.
19pub const PUMP_TOKEN_MINT: Pubkey = pubkey!("pumpCmXqMfrsAkQ5r49WcJnRayYRqmXz6ae8H7H9Dfn");
20
21pub const FEE_PROGRAM_ID: Pubkey = pubkey!("pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ");
22pub const MAYHEM_PROGRAM_ID: Pubkey = pubkey!("MAyhSmzXzV1pTf7LsNkrNwkWKTo4ougAJ1PPg47MD4e");
23
24/// Address lookup table for pump trades.
25pub const MAINNET_ALT: Pubkey = pubkey!("Hyif6eWb8x88RVrvjPfabsgRYnwkVnyByEXTVTXbUcyP");
26pub const DEVNET_ALT: Pubkey = pubkey!("7Je3GuLHSXZT6oC96EuAKTH8LsMhvC32z72cqVxUnvR7");
27
28pub mod pump {
29    use super::*;
30
31    pub const PROGRAM_ID: Pubkey = crate::pump::ID;
32
33    pub const GLOBAL_SEED: &[u8] = b"global";
34    pub const BONDING_CURVE_SEED: &[u8] = b"bonding-curve";
35    pub const BONDING_CURVE_V2_SEED: &[u8] = b"bonding-curve-v2";
36    pub const CREATOR_VAULT_SEED: &[u8] = b"creator-vault";
37    pub const EVENT_AUTHORITY_SEED: &[u8] = b"__event_authority";
38    pub const MINT_AUTHORITY_SEED: &[u8] = b"mint-authority";
39    pub const POOL_AUTHORITY_SEED: &[u8] = b"pool-authority";
40    pub const GLOBAL_VOLUME_ACCUMULATOR_SEED: &[u8] = b"global_volume_accumulator";
41    pub const USER_VOLUME_ACCUMULATOR_SEED: &[u8] = b"user_volume_accumulator";
42    pub const METADATA_SEED: &[u8] = b"metadata";
43    pub const FEE_CONFIG_SEED: &[u8] = b"fee_config";
44    pub const SHARING_CONFIG_SEED: &[u8] = b"sharing-config";
45    pub const FEE_CONFIG_PROGRAM_SEED_KEY: Pubkey = PROGRAM_ID;
46}
47
48pub mod pump_amm {
49    use super::*;
50
51    pub const PROGRAM_ID: Pubkey = crate::pump_amm::ID;
52
53    pub const GLOBAL_CONFIG_SEED: &[u8] = b"global_config";
54    pub const POOL_SEED: &[u8] = b"pool";
55    pub const POOL_LP_MINT_SEED: &[u8] = b"pool_lp_mint";
56    // Underscore variant — distinct from the hyphen variant in the bonding-curve program.
57    pub const CREATOR_VAULT_SEED: &[u8] = b"creator_vault";
58    pub const EVENT_AUTHORITY_SEED: &[u8] = b"__event_authority";
59    pub const GLOBAL_VOLUME_ACCUMULATOR_SEED: &[u8] = b"global_volume_accumulator";
60    pub const USER_VOLUME_ACCUMULATOR_SEED: &[u8] = b"user_volume_accumulator";
61    pub const POOL_V2_SEED: &[u8] = b"pool-v2";
62    pub const FEE_CONFIG_SEED: &[u8] = b"fee_config";
63    pub const FEE_CONFIG_PROGRAM_SEED_KEY: Pubkey = PROGRAM_ID;
64}
65
66pub mod pump_agent_payments {
67    use super::*;
68
69    pub const PROGRAM_ID: Pubkey = crate::pump_agent_payments::ID;
70
71    pub const GLOBAL_CONFIG_SEED: &[u8] = b"global-config";
72    pub const TOKEN_AGENT_PAYMENTS_SEED: &[u8] = b"token-agent-payments";
73    pub const EVENT_AUTHORITY_SEED: &[u8] = b"__event_authority";
74}