mirror of
https://github.com/0xfnzero/solana-streamer.git
synced 2026-08-17 19:08:05 +00:00
add bot trade event
This commit is contained in:
@@ -8,15 +8,18 @@ use crate::instruction::{
|
||||
logs_filters::LogFilter
|
||||
};
|
||||
|
||||
use anchor_client::solana_sdk::pubkey::Pubkey;
|
||||
|
||||
pub async fn process_logs<F>(
|
||||
signature: &str,
|
||||
logs: Vec<String>,
|
||||
callback: F,
|
||||
payer: Option<Pubkey>,
|
||||
) -> ClientResult<()>
|
||||
where
|
||||
F: Fn(&str, DexInstruction) + Send + Sync,
|
||||
{
|
||||
let instructions = LogFilter::parse_instruction(&logs)?;
|
||||
let instructions = LogFilter::parse_instruction(&logs, payer)?;
|
||||
for instruction in instructions {
|
||||
callback(signature, instruction);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user