From b4ae02c95692eb13b4ba7192806f5896adf469e6 Mon Sep 17 00:00:00 2001 From: Estereg Date: Fri, 20 Feb 2026 19:38:54 +0000 Subject: [PATCH 1/4] build(deps): upgrade dependencies to latest compatible versions --- Cargo.toml | 66 +++++++++++++++++++++++++++--------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4565360..be3aed4 100755 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,64 +14,64 @@ crate-type = ["cdylib", "rlib"] [dependencies] solana-sdk = "3.0.0" -solana-client = "3.1.4" +solana-client = "3.1.9" solana-program = "3.0.0" -solana-rpc-client = "3.1.4" -solana-rpc-client-api = "3.1.4" -solana-transaction-status = "3.1.4" -solana-account-decoder = "3.1.4" -solana-hash = "4.0.1" -solana-entry = { version = "3.1.4", features = ["agave-unstable-api"] } -solana-rpc-client-nonce-utils = "3.1.4" -solana-perf = "3.1.4" -solana-metrics = "3.1.4" +solana-rpc-client = "3.1.9" +solana-rpc-client-api = "3.1.9" +solana-transaction-status = "3.1.9" +solana-account-decoder = "3.1.9" +solana-hash = "4.2.0" +solana-entry = { version = "3.1.9", features = ["agave-unstable-api"] } +solana-rpc-client-nonce-utils = "3.1.9" +solana-perf = "3.1.9" +solana-metrics = "3.1.9" spl-associated-token-account = "8.0.0" borsh = { version = "1.6.0", features = ["derive"] } serde = { version = "1.0.228", features = ["derive"] } -serde_json = "1.0.134" +serde_json = "1.0.149" serde-big-array = "0.5.1" -futures = "0.3.31" -futures-util = "0.3.31" +futures = "0.3.32" +futures-util = "0.3.32" base64 = "0.22.1" rand = "0.9.2" bincode = "1.3" -anyhow = "1.0.90" +anyhow = "1.0.102" yellowstone-grpc-client = { version = "10.2.0" } yellowstone-grpc-proto = { version = "10.1.1" } -tokio = { version = "1.42.0", features = ["full", "rt-multi-thread"]} -tonic = { version = "0.14.2", features = ["transport"] } -rustls = { version = "0.23.35", features = ["ring"], default-features = false } -rustls-native-certs = "0.8.2" +tokio = { version = "1.49.0", features = ["full", "rt-multi-thread"]} +tonic = { version = "0.14.5", features = ["transport"] } +rustls = { version = "0.23.36", features = ["ring"], default-features = false } +rustls-native-certs = "0.8.3" tokio-rustls = "0.26.4" log = "0.4.29" -chrono = "0.4.42" +chrono = "0.4.43" regex = "1" -tracing = "0.1.43" -thiserror = "2.0.17" -async-trait = "0.1.86" +tracing = "0.1.44" +thiserror = "2.0.18" +async-trait = "0.1.89" lazy_static = "1.5.0" -once_cell = "1.20.3" +once_cell = "1.21.3" dashmap = "6.1.0" -prost = "0.14.1" -prost-types = "0.14.1" +prost = "0.14.3" +prost-types = "0.14.3" num_enum = "0.7.5" num-derive = "0.4.2" num-traits = "0.2.19" hex = "0.4.3" -bytemuck = { version = "1.24.0" } -arrayref = "0.3.6" +bytemuck = { version = "1.25.0" } +arrayref = "0.3.9" borsh-derive = "1.6.0" -indicatif = "0.18.3" +indicatif = "0.18.4" maplit = "1.0.2" -env_logger = "0.11.8" +env_logger = "0.11.9" crossbeam = "0.8.4" crossbeam-queue = "0.3.12" parking_lot = "0.12.5" -wide = "1.1.0" +wide = "1.1.1" spl-token = { version = "9.0.0", default-features = false, features = ["no-entrypoint"] } spl-token-2022 = { version = "10.0.0", default-features = false, features = ["no-entrypoint"] } -solana-commitment-config = { version = "3.1.0", features = ["serde"] } -tonic-prost = "0.14.2" +solana-commitment-config = { version = "3.1.1", features = ["serde"] } +tonic-prost = "0.14.5" [dev-dependencies] -criterion = { version = "0.8.1", features = ["html_reports"] } +criterion = { version = "0.8.2", features = ["html_reports"] } From 8e99720ce3da628a40a89895734d4d470f718c7d Mon Sep 17 00:00:00 2001 From: Estereg Date: Sat, 21 Feb 2026 08:57:31 +0000 Subject: [PATCH 2/4] fix(pumpfun): fix trade event log size mapping Adjusted PUMPFUN_TRADE_EVENT_LOG_SIZE from 274 to 250 bytes in the PumpFun event parser to match the actual IDL structure. This resolves an issue where inner instruction events were not parsed correctly, causing trade fields (amounts, reserves, fees) to appear as zeros. --- src/streaming/event_parser/protocols/pumpfun/events.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/streaming/event_parser/protocols/pumpfun/events.rs b/src/streaming/event_parser/protocols/pumpfun/events.rs index 1c34613..678232c 100755 --- a/src/streaming/event_parser/protocols/pumpfun/events.rs +++ b/src/streaming/event_parser/protocols/pumpfun/events.rs @@ -275,10 +275,10 @@ pub struct PumpFunTradeEvent { } /// Borsh byte length of TradeEvent fixed fields (IDL order; excludes ix_name and following variable part). -/// Layout: mint(32)+sol_amount(8)+token_amount(8)+is_buy(1)+user(32)+timestamp(8)+virtual_sol(8)+virtual_token(8)+real_sol(8)+real_token(8)+fee_recipient(32)+fee_basis_points(8)+fee(8)+creator(32)+creator_fee_bps(8)+creator_fee(8)+track_volume(1)+total_unclaimed(8)+total_claimed(8)+current_sol_volume(8)+last_update_timestamp(8) = 274 -pub const PUMPFUN_TRADE_EVENT_LOG_SIZE: usize = 274; +/// Layout: mint(32)+sol_amount(8)+token_amount(8)+is_buy(1)+user(32)+timestamp(8)+virtual_sol(8)+virtual_token(8)+real_sol(8)+real_token(8)+fee_recipient(32)+fee_basis_points(8)+fee(8)+creator(32)+creator_fee_bps(8)+creator_fee(8)+track_volume(1)+total_unclaimed(8)+total_claimed(8)+current_sol_volume(8)+last_update_timestamp(8) = 250 +pub const PUMPFUN_TRADE_EVENT_LOG_SIZE: usize = 250; -/// Decode TradeEvent log; if data.len() > 274 then parse ix_name, mayhem_mode, cashback (IDL-aligned). +/// Decode TradeEvent log; if data.len() > 250 then parse ix_name, mayhem_mode, cashback (IDL-aligned). pub fn pumpfun_trade_event_log_decode(data: &[u8]) -> Option { if data.len() < PUMPFUN_TRADE_EVENT_LOG_SIZE { return None; From c2f2113211b322b602185a7e2efdb335a8343c2e Mon Sep 17 00:00:00 2001 From: Estereg Date: Sat, 21 Feb 2026 09:51:02 +0000 Subject: [PATCH 3/4] feat(pumpfun): align IDL for V2, Mayhem & Cashback Update BondingCurve & Global structs, fix account mappings (Create/Buy/Sell), improve trade event merging, add missing fields to create events, and fix create_v2 user mapping. --- Cargo.toml | 26 -------------- .../event_parser/core/merger_event.rs | 5 +++ .../event_parser/protocols/pumpfun/events.rs | 36 +++++++++++++++++++ .../event_parser/protocols/pumpfun/parser.rs | 22 +++++++++++- .../event_parser/protocols/pumpfun/types.rs | 6 ++-- 5 files changed, 66 insertions(+), 29 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index be3aed4..51fea51 100755 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,24 +16,13 @@ crate-type = ["cdylib", "rlib"] solana-sdk = "3.0.0" solana-client = "3.1.9" solana-program = "3.0.0" -solana-rpc-client = "3.1.9" -solana-rpc-client-api = "3.1.9" solana-transaction-status = "3.1.9" solana-account-decoder = "3.1.9" -solana-hash = "4.2.0" solana-entry = { version = "3.1.9", features = ["agave-unstable-api"] } -solana-rpc-client-nonce-utils = "3.1.9" -solana-perf = "3.1.9" -solana-metrics = "3.1.9" -spl-associated-token-account = "8.0.0" borsh = { version = "1.6.0", features = ["derive"] } serde = { version = "1.0.228", features = ["derive"] } -serde_json = "1.0.149" serde-big-array = "0.5.1" futures = "0.3.32" -futures-util = "0.3.32" -base64 = "0.22.1" -rand = "0.9.2" bincode = "1.3" anyhow = "1.0.102" yellowstone-grpc-client = { version = "10.2.0" } @@ -41,30 +30,15 @@ yellowstone-grpc-proto = { version = "10.1.1" } tokio = { version = "1.49.0", features = ["full", "rt-multi-thread"]} tonic = { version = "0.14.5", features = ["transport"] } rustls = { version = "0.23.36", features = ["ring"], default-features = false } -rustls-native-certs = "0.8.3" -tokio-rustls = "0.26.4" log = "0.4.29" chrono = "0.4.43" -regex = "1" -tracing = "0.1.44" -thiserror = "2.0.18" -async-trait = "0.1.89" lazy_static = "1.5.0" once_cell = "1.21.3" dashmap = "6.1.0" prost = "0.14.3" prost-types = "0.14.3" -num_enum = "0.7.5" -num-derive = "0.4.2" -num-traits = "0.2.19" -hex = "0.4.3" -bytemuck = { version = "1.25.0" } -arrayref = "0.3.9" -borsh-derive = "1.6.0" -indicatif = "0.18.4" maplit = "1.0.2" env_logger = "0.11.9" -crossbeam = "0.8.4" crossbeam-queue = "0.3.12" parking_lot = "0.12.5" wide = "1.1.1" diff --git a/src/streaming/event_parser/core/merger_event.rs b/src/streaming/event_parser/core/merger_event.rs index 3dd6371..b406fe3 100644 --- a/src/streaming/event_parser/core/merger_event.rs +++ b/src/streaming/event_parser/core/merger_event.rs @@ -21,6 +21,11 @@ pub fn merge(instruction_event: &mut DexEvent, cpi_log_event: DexEvent) { e.creator = cpie.creator; e.creator_fee_basis_points = cpie.creator_fee_basis_points; e.creator_fee = cpie.creator_fee; + e.track_volume = cpie.track_volume; + e.total_unclaimed_tokens = cpie.total_unclaimed_tokens; + e.total_claimed_tokens = cpie.total_claimed_tokens; + e.current_sol_volume = cpie.current_sol_volume; + e.last_update_timestamp = cpie.last_update_timestamp; e.ix_name = cpie.ix_name.clone(); e.mayhem_mode = cpie.mayhem_mode; e.cashback_fee_basis_points = cpie.cashback_fee_basis_points; diff --git a/src/streaming/event_parser/protocols/pumpfun/events.rs b/src/streaming/event_parser/protocols/pumpfun/events.rs index 678232c..f09838d 100755 --- a/src/streaming/event_parser/protocols/pumpfun/events.rs +++ b/src/streaming/event_parser/protocols/pumpfun/events.rs @@ -32,6 +32,22 @@ pub struct PumpFunCreateTokenEvent { pub mint_authority: Pubkey, #[borsh(skip)] pub associated_bonding_curve: Pubkey, + #[borsh(skip)] + pub global: Pubkey, + #[borsh(skip)] + pub mpl_token_metadata: Pubkey, + #[borsh(skip)] + pub metadata_account: Pubkey, + #[borsh(skip)] + pub system_program: Pubkey, + #[borsh(skip)] + pub associated_token_program: Pubkey, + #[borsh(skip)] + pub rent: Pubkey, + #[borsh(skip)] + pub event_authority: Pubkey, + #[borsh(skip)] + pub program: Pubkey, } #[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize, BorshDeserialize)] @@ -58,6 +74,26 @@ pub struct PumpFunCreateV2TokenEvent { pub mint_authority: Pubkey, #[borsh(skip)] pub associated_bonding_curve: Pubkey, + #[borsh(skip)] + pub global: Pubkey, + #[borsh(skip)] + pub system_program: Pubkey, + #[borsh(skip)] + pub associated_token_program: Pubkey, + #[borsh(skip)] + pub mayhem_program_id: Pubkey, + #[borsh(skip)] + pub global_params: Pubkey, + #[borsh(skip)] + pub sol_vault: Pubkey, + #[borsh(skip)] + pub mayhem_state: Pubkey, + #[borsh(skip)] + pub mayhem_token_vault: Pubkey, + #[borsh(skip)] + pub event_authority: Pubkey, + #[borsh(skip)] + pub program: Pubkey, } pub fn pumpfun_create_v2_token_event_log_decode(data: &[u8]) -> Option { diff --git a/src/streaming/event_parser/protocols/pumpfun/parser.rs b/src/streaming/event_parser/protocols/pumpfun/parser.rs index 2e0447f..78058bb 100755 --- a/src/streaming/event_parser/protocols/pumpfun/parser.rs +++ b/src/streaming/event_parser/protocols/pumpfun/parser.rs @@ -168,7 +168,16 @@ fn parse_create_token_instruction( mint_authority: accounts[1], bonding_curve: accounts[2], associated_bonding_curve: accounts[3], + global: accounts[4], + mpl_token_metadata: accounts[5], + metadata_account: accounts[6], user: accounts[7], + system_program: accounts[8], + token_program: accounts[9], + associated_token_program: accounts[10], + rent: accounts[11], + event_authority: accounts[12], + program: accounts[13], ..Default::default() })) } @@ -231,7 +240,18 @@ fn parse_create_v2_token_instruction( mint_authority: accounts[1], bonding_curve: accounts[2], associated_bonding_curve: accounts[3], - user: accounts[7], + global: accounts[4], + user: accounts[5], + system_program: accounts[6], + token_program: accounts[7], + associated_token_program: accounts[8], + mayhem_program_id: accounts[9], + global_params: accounts[10], + sol_vault: accounts[11], + mayhem_state: accounts[12], + mayhem_token_vault: accounts[13], + event_authority: accounts[14], + program: accounts[15], ..Default::default() })) } diff --git a/src/streaming/event_parser/protocols/pumpfun/types.rs b/src/streaming/event_parser/protocols/pumpfun/types.rs index 376f2b7..5118866 100644 --- a/src/streaming/event_parser/protocols/pumpfun/types.rs +++ b/src/streaming/event_parser/protocols/pumpfun/types.rs @@ -21,9 +21,10 @@ pub struct BondingCurve { pub complete: bool, pub creator: Pubkey, pub is_mayhem_mode: bool, + pub is_cashback_coin: bool, } -pub const BONDING_CURVE_SIZE: usize = 8 * 5 + 1 + 32 + 1; +pub const BONDING_CURVE_SIZE: usize = 8 * 5 + 1 + 32 + 1 + 1; pub fn bonding_curve_decode(data: &[u8]) -> Option { if data.len() < BONDING_CURVE_SIZE { @@ -78,9 +79,10 @@ pub struct Global { pub reserved_fee_recipient: Pubkey, pub mayhem_mode_enabled: bool, pub reserved_fee_recipients: [Pubkey; 7], + pub is_cashback_enabled: bool, } -pub const GLOBAL_SIZE: usize = 1 + 32 * 2 + 8 * 5 + 32 + 1 + 8 * 2 + 32 * 7 + 32 * 2 + 1 + 32 * 2 + 1 + 32 * 7; +pub const GLOBAL_SIZE: usize = 1 + 32 * 2 + 8 * 5 + 32 + 1 + 8 * 2 + 32 * 7 + 32 * 2 + 1 + 32 * 2 + 1 + 32 * 7 + 1; pub fn global_decode(data: &[u8]) -> Option { if data.len() < GLOBAL_SIZE { From 82239bd2a7e46787d156f4d37c0652c7ef057300 Mon Sep 17 00:00:00 2001 From: Estereg Date: Sat, 21 Feb 2026 10:24:07 +0000 Subject: [PATCH 4/4] fix(pumpswap): merge missing V2 volume fields in Buy event Added track_volume, unclaimed/claimed tokens, current_sol_volume, and timestamp to the merger logic to match new IDL. --- src/streaming/event_parser/core/merger_event.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/streaming/event_parser/core/merger_event.rs b/src/streaming/event_parser/core/merger_event.rs index b406fe3..8d7d588 100644 --- a/src/streaming/event_parser/core/merger_event.rs +++ b/src/streaming/event_parser/core/merger_event.rs @@ -152,6 +152,11 @@ pub fn merge(instruction_event: &mut DexEvent, cpi_log_event: DexEvent) { e.coin_creator = cpie.coin_creator; e.coin_creator_fee_basis_points = cpie.coin_creator_fee_basis_points; e.coin_creator_fee = cpie.coin_creator_fee; + e.track_volume = cpie.track_volume; + e.total_unclaimed_tokens = cpie.total_unclaimed_tokens; + e.total_claimed_tokens = cpie.total_claimed_tokens; + e.current_sol_volume = cpie.current_sol_volume; + e.last_update_timestamp = cpie.last_update_timestamp; } _ => {} },