refactor: overhaul event parser architecture for better performance

- Centralize event parsing logic and remove factory pattern
- Add high-performance clock module to reduce latency
- Consolidate protocol parsers with unified interface
- Introduce account pubkey caching and streamline traits
- Remove deprecated macro-based and multi-protocol implementations
This commit is contained in:
ysq
2025-09-14 01:13:11 +08:00
parent 9c311f63c1
commit a76563314f
34 changed files with 3374 additions and 3878 deletions
+4 -5
View File
@@ -1,17 +1,16 @@
pub mod common;
pub mod core;
pub mod factory;
pub mod protocols;
pub use core::traits::{EventParser, UnifiedEvent};
pub use factory::{EventParserFactory, Protocol};
pub use core::traits::UnifiedEvent;
pub use protocols::types::Protocol;
/// 宏:简化 downcast_ref 模式匹配
///
///
/// # 使用示例
/// ```
/// use sol_trade_sdk::event_parser::match_event;
///
///
/// match_event!(event, {
/// PumpSwapCreatePoolEvent => |typed_event| {
/// println!("CreatePool event: {:?}", typed_event);