mirror of
https://github.com/0xfnzero/solana-streamer.git
synced 2026-08-15 18:08:05 +00:00
feat: refactor subscription API with multi-filter support
- Support multiple transaction/account filters as vectors - Add Token2022 extended state parsing - Add pumpswap pool monitoring example - Enhance AccountFilter with memcmp filters BREAKING CHANGE: API signature changes for subscription methods
This commit is contained in:
@@ -3,7 +3,7 @@ use solana_streamer_sdk::{
|
||||
streaming::{
|
||||
event_parser::{
|
||||
common::EventType,
|
||||
core::account_event_parser::{TokenInfoEvent, NonceAccountEvent, TokenAccountEvent},
|
||||
core::account_event_parser::{NonceAccountEvent, TokenAccountEvent, TokenInfoEvent},
|
||||
protocols::{
|
||||
bonk::{
|
||||
parser::BONK_PROGRAM_ID, BonkGlobalConfigAccountEvent, BonkMigrateToAmmEvent,
|
||||
@@ -105,7 +105,7 @@ async fn test_grpc() -> Result<(), Box<dyn std::error::Error>> {
|
||||
};
|
||||
|
||||
// Listen to account data belonging to owner programs -> account event monitoring
|
||||
let account_filter = AccountFilter { account: vec![], owner: account_include.clone() };
|
||||
let account_filter = AccountFilter { account: vec![], owner: account_include.clone(), filters: vec![] };
|
||||
|
||||
// Event filtering
|
||||
// No event filtering, includes all events
|
||||
@@ -121,8 +121,8 @@ async fn test_grpc() -> Result<(), Box<dyn std::error::Error>> {
|
||||
grpc.subscribe_events_immediate(
|
||||
protocols,
|
||||
None,
|
||||
transaction_filter,
|
||||
account_filter,
|
||||
vec![transaction_filter],
|
||||
vec![account_filter],
|
||||
event_type_filter,
|
||||
None,
|
||||
callback,
|
||||
|
||||
Reference in New Issue
Block a user