mirror of
https://github.com/0xfnzero/solana-streamer.git
synced 2026-08-20 04:18:06 +00:00
refactor: restructure event handling from trait objects to enum pattern
- Convert UnifiedEvent from trait object (Box<dyn UnifiedEvent>) to concrete enum type - Remove match_event! macro in favor of native match expressions - Simplify event metadata access: event.event_type() -> event.metadata().event_type - Unify event callback signatures: Fn(Box<dyn UnifiedEvent>) -> Fn(UnifiedEvent) - Update all example code to use the new enum-based event system - Optimize type system to reduce runtime overhead and improve type safety Affected scope: - Core event parser and processor - All protocol event definitions (PumpFun, PumpSwap, Bonk, Raydium series, etc.) - gRPC and Shred streaming modules - All example code
This commit is contained in:
@@ -101,7 +101,7 @@ async fn get_single_transaction_details(signature_str: &str) -> Result<()> {
|
||||
.parse_encoded_confirmed_transaction_with_status_meta(
|
||||
signature,
|
||||
transaction,
|
||||
Arc::new(move |event: &Box<dyn UnifiedEvent>| {
|
||||
Arc::new(move |event: &UnifiedEvent| {
|
||||
println!("{:?}\n", event);
|
||||
}),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user