diff --git a/filters/burn.filter.ts b/filters/burn.filter.ts index 226699f5..b116419a 100644 --- a/filters/burn.filter.ts +++ b/filters/burn.filter.ts @@ -12,11 +12,7 @@ export class BurnFilter implements Filter { const burned = amount.value.uiAmount === 0; return { ok: burned, message: burned ? undefined : "Burned -> Creator didn't burn LP" }; } catch (e: any) { - if (e.code == -32602) { - return { ok: true }; - } - - logger.error({ mint: poolKeys.baseMint }, `Failed to check if LP is burned`); + logger.error({ mint: poolKeys.baseMint, error: e }, `Burned -> Failed to check if LP is burned`); } return { ok: false, message: 'Failed to check if LP is burned' }; diff --git a/filters/renounced.filter.ts b/filters/renounced.filter.ts index 18940949..7c810d96 100644 --- a/filters/renounced.filter.ts +++ b/filters/renounced.filter.ts @@ -1,6 +1,6 @@ import { Filter, FilterResult } from './pool-filters'; import { MintLayout } from '@solana/spl-token'; -import { Connection } from '@solana/web3.js'; +import { Connection, PublicKey } from '@solana/web3.js'; import { LiquidityPoolKeysV4 } from '@raydium-io/raydium-sdk'; import { logger } from '../helpers'; @@ -29,16 +29,16 @@ export class RenouncedFreezeFilter implements Filter { } const deserialize = MintLayout.decode(accountInfo.data); - const renounced = !this.checkRenounced || deserialize.mintAuthorityOption === 0; - const freezable = !this.checkFreezable || deserialize.freezeAuthorityOption !== 0; - const ok = renounced && !freezable; + const renouncedOK = !this.checkRenounced || (deserialize.mintAuthorityOption === 0); + const freezeOK = !this.checkFreezable || (deserialize.freezeAuthorityOption === 0 && (deserialize.freezeAuthority === null || deserialize.freezeAuthority.equals(PublicKey.default))); + const ok = renouncedOK && freezeOK; const message: string[] = []; - if (!renounced) { + if (!renouncedOK) { message.push('mint'); } - if (freezable) { + if (!freezeOK) { message.push('freeze'); }