Release solana-streamer-sdk v1.5.4

This commit is contained in:
0xfnzero
2026-05-28 04:58:18 +08:00
parent 4cb22592e8
commit 5a282bd84d
8 changed files with 92 additions and 29 deletions
+7 -3
View File
@@ -187,7 +187,10 @@ fn push_streamer_event_sdk_grpc_types(
out.push(Sdk::PumpFunCreate);
out.push(Sdk::PumpFunCreateV2);
}
St::PumpFunCreateV2Token => out.push(Sdk::PumpFunCreateV2),
St::PumpFunCreateV2Token => {
out.push(Sdk::PumpFunCreate);
out.push(Sdk::PumpFunCreateV2);
}
St::PumpFunBuy => {
if matches!(mode, FilterMapMode::Include) {
out.push(Sdk::PumpFunTrade);
@@ -423,6 +426,7 @@ fn event_type_matches(filter_type: &EventType, event_type: &EventType) -> bool {
|| matches!(
(filter_type, event_type),
(EventType::PumpFunCreateToken, EventType::PumpFunCreateV2Token)
| (EventType::PumpFunCreateV2Token, EventType::PumpFunCreateToken)
| (EventType::PumpFunBuy, EventType::PumpFunBuyExactSolIn)
| (EventType::PumpFunBuyExactSolIn, EventType::PumpFunBuy)
| (EventType::TokenAccount, EventType::TokenInfo)
@@ -578,11 +582,11 @@ mod tests {
include: vec![EventType::PumpFunCreateV2Token],
..Default::default()
};
assert!(!f.passes_event_type(&EventType::PumpFunCreateToken));
assert!(f.passes_event_type(&EventType::PumpFunCreateToken));
assert!(f.passes_event_type(&EventType::PumpFunCreateV2Token));
let sdk_f = build_sdk_parse_event_filter(Some(&f)).expect("mapped");
assert!(!sdk_f.should_include(SdkGrpcEventType::PumpFunCreate));
assert!(sdk_f.should_include(SdkGrpcEventType::PumpFunCreate));
assert!(sdk_f.should_include(SdkGrpcEventType::PumpFunCreateV2));
}
@@ -52,6 +52,18 @@ pub struct PumpFunCreateTokenEvent {
pub event_authority: Pubkey,
#[borsh(skip)]
pub program: Pubkey,
#[borsh(skip)]
pub mayhem_program_id: Pubkey,
#[borsh(skip)]
pub global_params: Pubkey,
#[borsh(skip)]
pub sol_vault: Pubkey,
#[borsh(skip)]
pub mayhem_state: Pubkey,
#[borsh(skip)]
pub mayhem_token_vault: Pubkey,
#[borsh(skip)]
pub observed_fee_recipient: Pubkey,
}
/// CreateV2 事件:与 create_v2 指令 16 个账户一致(见 parser 注释)。