mirror of
https://github.com/fdundjer/solana-sniper-bot.git
synced 2025-11-13 08:12:38 +10:00
fix: take only open markets when building cache
This commit is contained in:
@ -13,6 +13,7 @@ import {
|
||||
} from '@raydium-io/raydium-sdk';
|
||||
import { TOKEN_PROGRAM_ID } from '@solana/spl-token';
|
||||
import { MinimalMarketLayoutV3 } from '../market';
|
||||
import bs58 from 'bs58';
|
||||
|
||||
export const RAYDIUM_LIQUIDITY_PROGRAM_ID_V4 = MAINNET_PROGRAM_ID.AmmV4;
|
||||
export const OPENBOOK_PROGRAM_ID = MAINNET_PROGRAM_ID.OPENBOOK_MARKET;
|
||||
@ -54,6 +55,12 @@ export async function getAllAccountsV4(
|
||||
bytes: OPENBOOK_PROGRAM_ID.toBase58(),
|
||||
},
|
||||
},
|
||||
{
|
||||
memcmp: {
|
||||
offset: LIQUIDITY_STATE_LAYOUT_V4.offsetOf('status'),
|
||||
bytes: bs58.encode([6, 0, 0, 0, 0, 0, 0, 0]),
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user