feat(examples): add nonce and token balance monitoring capabilities

- feat(examples): add nonce_listen_example for nonce account tracking
- feat(examples): add token_balance_listen_example for balance monitoring
- feat(parser): implement NonceAccountEvent with nonce state parsing
- feat(types): add AccountNonce event type to filtering system
- docs: update README with new monitoring examples
- chore: bump version to 0.4.2
This commit is contained in:
ysq
2025-09-09 21:24:21 +08:00
parent 2e8c0a1ee5
commit 528003a688
7 changed files with 230 additions and 5 deletions
@@ -141,6 +141,7 @@ pub enum EventType {
AccountRaydiumCpmmAmmConfig,
AccountRaydiumCpmmPoolState,
AccountNonce,
AccountCommon,
// Common events
@@ -163,6 +164,8 @@ pub const ACCOUNT_EVENT_TYPES: &[EventType] = &[
EventType::AccountRaydiumClmmTickArrayState,
EventType::AccountRaydiumCpmmAmmConfig,
EventType::AccountRaydiumCpmmPoolState,
EventType::AccountCommon,
EventType::AccountNonce,
];
pub const BLOCK_EVENT_TYPES: &[EventType] = &[EventType::BlockMeta];
@@ -228,6 +231,7 @@ 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::BlockMeta => write!(f, "BlockMeta"),
EventType::Unknown => write!(f, "Unknown"),
}