Skip to content

Instantly share code, notes, and snippets.

@shosti
Created January 24, 2022 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shosti/a7edbfe73d448b90fa03427dde3213a3 to your computer and use it in GitHub Desktop.
Save shosti/a7edbfe73d448b90fa03427dde3213a3 to your computer and use it in GitHub Desktop.
let (_client, rx) = PubsubClient::logs_subscribe(
"ws://127.0.0.1:8900",
RpcTransactionLogsFilter::Mentions(vec![self.program.id().to_string()]),
RpcTransactionLogsConfig { commitment: None },
)?;
std::thread::spawn(move || loop {
let ev = rx.recv().unwrap();
println!("EV: {:#?}", ev);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment