feat: support Pump.fun V2 (Mayhem Mode) and update protocol structures for Nov 11 breaking changes

This commit is contained in:
ysq
2025-11-09 23:30:48 +08:00
parent 3a9fed4a9c
commit 9e4f71dbb2
10 changed files with 154 additions and 16 deletions
@@ -20,9 +20,12 @@ pub struct GlobalConfig {
pub protocol_fee_recipients: [Pubkey; 8],
pub coin_creator_fee_basis_points: u64,
pub admin_set_coin_creator_authority: Pubkey,
pub whitelist_pda: Pubkey,
pub reserved_fee_recipient: Pubkey,
pub mayhem_mode_enabled: bool,
}
pub const GLOBAL_CONFIG_SIZE: usize = 32 + 8 + 8 + 1 + 32 * 8 + 8 + 32;
pub const GLOBAL_CONFIG_SIZE: usize = 32 + 8 + 8 + 1 + 32 * 8 + 8 + 32 + 32 + 32 + 1;
pub fn global_config_decode(data: &[u8]) -> Option<GlobalConfig> {
if data.len() < GLOBAL_CONFIG_SIZE {
@@ -67,9 +70,10 @@ pub struct Pool {
pub pool_quote_token_account: Pubkey,
pub lp_supply: u64,
pub coin_creator: Pubkey,
pub is_mayhem_mode: bool,
}
pub const POOL_SIZE: usize = 1 + 2 + 32 * 6 + 8 + 32;
pub const POOL_SIZE: usize = 1 + 2 + 32 * 6 + 8 + 32 + 1;
pub fn pool_decode(data: &[u8]) -> Option<Pool> {
if data.len() < POOL_SIZE {