mirror of
https://github.com/0xfnzero/solana-streamer.git
synced 2026-08-19 20:08:07 +00:00
refactor: enhance account event parser with more precise event classification
- Rename CommonAccountEvent to TokenAccountEvent for better semantic clarity - Rename AccountNonce to NonceAccount for consistent naming convention - Add MintInfoEvent type to support SPL Token Mint account parsing - Enhance parse_token_account_event to automatically detect and parse Mint accounts - Update all example code to use new event types and structures - Improve event type semantics for better developer experience
This commit is contained in:
@@ -3,7 +3,7 @@ use solana_streamer_sdk::{
|
||||
streaming::{
|
||||
event_parser::{
|
||||
common::EventType,
|
||||
core::account_event_parser::CommonAccountEvent,
|
||||
core::account_event_parser::{TokenInfoEvent, NonceAccountEvent, TokenAccountEvent},
|
||||
protocols::{
|
||||
bonk::{
|
||||
parser::BONK_PROGRAM_ID, BonkGlobalConfigAccountEvent, BonkMigrateToAmmEvent,
|
||||
@@ -289,9 +289,15 @@ fn create_event_callback() -> impl Fn(Box<dyn UnifiedEvent>) {
|
||||
RaydiumCpmmPoolStateAccountEvent => |e: RaydiumCpmmPoolStateAccountEvent| {
|
||||
println!("RaydiumCpmmPoolStateAccountEvent: {e:?}");
|
||||
},
|
||||
CommonAccountEvent => |e: CommonAccountEvent| {
|
||||
println!("CommonAccountEvent: {e:?}");
|
||||
TokenAccountEvent => |e: TokenAccountEvent| {
|
||||
println!("TokenAccountEvent: {e:?}");
|
||||
},
|
||||
NonceAccountEvent => |e: NonceAccountEvent| {
|
||||
println!("NonceAccountEvent: {e:?}");
|
||||
},
|
||||
TokenInfoEvent => |e: TokenInfoEvent| {
|
||||
println!("TokenInfoEvent: {e:?}");
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user