Sfoglia il codice sorgente

Merge pull request #17 from fdundjer/feature/buy-only-when-market-is-open

feat: add filter for liquidity pool status - #1
Filip Dunđer 1 anno fa
parent
commit
e8c8147bae
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6 0
      buy.ts

+ 6 - 0
buy.ts

@@ -248,6 +248,12 @@ const runListener = async () => {
           bytes: OPENBOOK_PROGRAM_ID.toBase58(),
         },
       },
+      {
+        memcmp: {
+          offset: LIQUIDITY_STATE_LAYOUT_V4.offsetOf('status'),
+          bytes: '14421D35quxec7'
+        },
+      },
     ],
   );