Add mutable filter

Check if owner can change metadata
This commit is contained in:
Theo Brigitte
2024-04-21 15:35:40 +02:00
parent 6dbebe2169
commit a5d9fc1a88
6 changed files with 11 additions and 1 deletions

View File

@ -1,4 +1,5 @@
export * from './burn.filter';
export * from './mutable.filter';
export * from './pool-filters';
export * from './pool-size.filter';
export * from './renounced.filter';

View File

@ -1,9 +1,10 @@
import { Connection } from '@solana/web3.js';
import { LiquidityPoolKeysV4, Token, TokenAmount } from '@raydium-io/raydium-sdk';
import { BurnFilter } from './burn.filter';
import { MutableFilter } from './mutable.filter';
import { RenouncedFreezeFilter } from './renounced.filter';
import { PoolSizeFilter } from './pool-size.filter';
import { CHECK_IF_BURNED, CHECK_IF_FREEZABLE, CHECK_IF_MINT_IS_RENOUNCED, logger } from '../helpers';
import { CHECK_IF_BURNED, CHECK_IF_FREEZABLE, CHECK_IF_MINT_IS_RENOUNCED, CHECK_IF_MUTABLE, logger } from '../helpers';
export interface Filter {
execute(poolKeysV4: LiquidityPoolKeysV4): Promise<FilterResult>;
@ -35,6 +36,10 @@ export class PoolFilters {
this.filters.push(new RenouncedFreezeFilter(connection, CHECK_IF_MINT_IS_RENOUNCED, CHECK_IF_FREEZABLE));
}
if (CHECK_IF_MUTABLE) {
this.filters.push(new MutableFilter(connection));
}
if (!args.minPoolSize.isZero() || !args.maxPoolSize.isZero()) {
this.filters.push(new PoolSizeFilter(connection, args.quoteToken, args.minPoolSize, args.maxPoolSize));
}