From 58e4926cd819df8d45231657040cbf697cfb77f6 Mon Sep 17 00:00:00 2001 From: Estereg Date: Wed, 17 Dec 2025 20:45:57 -0300 Subject: [PATCH] fix(pumpswap): Align GlobalConfig and Pool structures with IDL - Remove non-existent fields from GlobalConfig: whitelist_pda, reserved_fee_recipient, mayhem_mode_enabled - Remove non-existent field from Pool: is_mayhem_mode - Adjust calculated sizes: GlobalConfig (345 bytes) and Pool (235 bytes) These fields belong to PumpFun, not PumpSwap, and were causing deserialization errors. --- src/streaming/event_parser/protocols/pumpswap/types.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/streaming/event_parser/protocols/pumpswap/types.rs b/src/streaming/event_parser/protocols/pumpswap/types.rs index d50aa43..afa99bc 100644 --- a/src/streaming/event_parser/protocols/pumpswap/types.rs +++ b/src/streaming/event_parser/protocols/pumpswap/types.rs @@ -20,12 +20,9 @@ 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 + 32 + 32 + 1; +pub const GLOBAL_CONFIG_SIZE: usize = 32 + 8 + 8 + 1 + 32 * 8 + 8 + 32; pub fn global_config_decode(data: &[u8]) -> Option { if data.len() < GLOBAL_CONFIG_SIZE { @@ -70,10 +67,9 @@ 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 + 1; +pub const POOL_SIZE: usize = 1 + 2 + 32 * 6 + 8 + 32; pub fn pool_decode(data: &[u8]) -> Option { if data.len() < POOL_SIZE {