mirror of
https://github.com/0xfnzero/solana-streamer.git
synced 2026-08-17 19:08:05 +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:
@@ -141,8 +141,8 @@ pub enum EventType {
|
||||
AccountRaydiumCpmmAmmConfig,
|
||||
AccountRaydiumCpmmPoolState,
|
||||
|
||||
AccountNonce,
|
||||
AccountCommon,
|
||||
NonceAccount,
|
||||
TokenAccount,
|
||||
|
||||
// Common events
|
||||
BlockMeta,
|
||||
@@ -164,8 +164,8 @@ pub const ACCOUNT_EVENT_TYPES: &[EventType] = &[
|
||||
EventType::AccountRaydiumClmmTickArrayState,
|
||||
EventType::AccountRaydiumCpmmAmmConfig,
|
||||
EventType::AccountRaydiumCpmmPoolState,
|
||||
EventType::AccountCommon,
|
||||
EventType::AccountNonce,
|
||||
EventType::TokenAccount,
|
||||
EventType::NonceAccount,
|
||||
];
|
||||
pub const BLOCK_EVENT_TYPES: &[EventType] = &[EventType::BlockMeta];
|
||||
|
||||
@@ -230,8 +230,8 @@ impl fmt::Display for EventType {
|
||||
}
|
||||
EventType::AccountRaydiumCpmmAmmConfig => write!(f, "AccountRaydiumCpmmAmmConfig"),
|
||||
EventType::AccountRaydiumCpmmPoolState => write!(f, "AccountRaydiumCpmmPoolState"),
|
||||
EventType::AccountCommon => write!(f, "AccountCommon"),
|
||||
EventType::AccountNonce => write!(f, "AccountNonce"),
|
||||
EventType::TokenAccount => write!(f, "TokenAccount"),
|
||||
EventType::NonceAccount => write!(f, "NonceAccount"),
|
||||
EventType::BlockMeta => write!(f, "BlockMeta"),
|
||||
EventType::Unknown => write!(f, "Unknown"),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user