Using the solana websocket url I'm listening to the solana blockchain logs and then filter those logs based on a certain criteria.

async function main(connection, programAddress) {
  console.log("Monitoring logs for program:", programAddress.toString());
    ({ logs, err, signature }) => {
      if (err) return;

      if (logs && logs.some((log) => log.includes("BurnChecked"))) {
        console.log("Signature for 'Burn':", signature);
        // fetchRaydiumAccounts(signature, connection);

In the code snippet above, I'm logging out only transactions whose logs includes the word "BurnChecked". While this works, it's not stream lined to lp burns it's generic, I've also tried finding logs that includes "Burn" but's thats even more generic and logs every burn transaction. How can I filter for just lp burns.

  • Does raydium log anything before the burn? It might be as easy as checking to see if the logs contain "Burn" and also "LP Burn" or whatever the Raydium logs output
    – Jon C
    Commented Feb 6 at 18:11
  • Tried that, but it just logs out every single burn. Need only lp burn transactions.
    – ccurves
    Commented Feb 20 at 7:35
  • Did you ever find a solution?? Commented Feb 26 at 13:39


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.