feat: upgrade to Solana 2.3.x and fix event parsing

- Bump version to 0.1.11
- Upgrade Solana deps to 2.3.x, yellowstone-grpc to 8.0.0
- Fix inner instruction indexing and timestamp handling
- Improve PumpFun/PumpSwap parser program ID support
This commit is contained in:
ysq
2025-08-05 18:23:01 +08:00
parent f700481f1f
commit 87465cbfdb
7 changed files with 35 additions and 29 deletions
+2 -2
View File
@@ -358,7 +358,7 @@ pub trait EventParser: Send + Sync {
slot,
block_time,
program_received_time_ms,
format!("{index}"),
format!("{}.{}", inner_instruction.index, index),
)
.await
{
@@ -367,7 +367,7 @@ pub trait EventParser: Send + Sync {
let transfer_datas =
parse_transfer_datas_from_next_instructions(
&inner_instruction,
-1_i8,
index as i8,
&accounts,
event.event_type(),
);
@@ -159,7 +159,7 @@ impl PumpFunEventParser {
accounts: &[Pubkey],
metadata: EventMetadata,
) -> Option<Box<dyn UnifiedEvent>> {
if data.len() < 16 || accounts.len() < 11 {
if data.len() < 16 || accounts.len() < 13 {
return None;
}
let amount = u64::from_le_bytes(data[0..8].try_into().unwrap());
@@ -273,6 +273,6 @@ impl EventParser for PumpFunEventParser {
}
fn supported_program_ids(&self) -> Vec<Pubkey> {
vec![PUMPFUN_PROGRAM_ID]
self.inner.supported_program_ids()
}
}
@@ -419,6 +419,6 @@ impl EventParser for PumpSwapEventParser {
}
fn supported_program_ids(&self) -> Vec<Pubkey> {
vec![PUMPSWAP_PROGRAM_ID]
self.inner.supported_program_ids()
}
}
+9 -3
View File
@@ -3,7 +3,7 @@ use std::{collections::HashMap, fmt, time::Duration};
use chrono::Local;
use futures::{channel::mpsc, sink::Sink, SinkExt, Stream, StreamExt};
use log::{error, info};
use prost_types::Timestamp;
use yellowstone_grpc_proto::prost_types::Timestamp;
use rustls::crypto::{ring::default_provider, CryptoProvider};
use solana_sdk::{pubkey::Pubkey, signature::Signature};
use solana_transaction_status::{EncodedTransactionWithStatusMeta, UiTransactionEncoding};
@@ -1035,7 +1035,10 @@ impl YellowstoneGrpc {
tx_clone,
&signature_clone,
Some(slot),
transaction_pretty.block_time,
transaction_pretty.block_time.map(|ts| prost_types::Timestamp {
seconds: ts.seconds,
nanos: ts.nanos,
}),
program_received_time_ms,
bot_wallet_clone,
)
@@ -1111,7 +1114,10 @@ impl YellowstoneGrpc {
tx_clone,
&signature_clone,
Some(slot),
transaction_pretty.block_time,
transaction_pretty.block_time.map(|ts| prost_types::Timestamp {
seconds: ts.seconds,
nanos: ts.nanos,
}),
program_received_time_ms,
bot_wallet_clone,
)