-
Notifications
You must be signed in to change notification settings - Fork 14
/
fssb_run.ts
597 lines (529 loc) · 21.3 KB
/
fssb_run.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
import {
BigNumberish,
Liquidity,
LIQUIDITY_STATE_LAYOUT_V4,
LiquidityPoolKeys,
LiquidityStateV4,
MARKET_STATE_LAYOUT_V3,
MarketStateV3,
Token,
TokenAmount,
} from '@raydium-io/raydium-sdk';
import {
AccountLayout,
createAssociatedTokenAccountIdempotentInstruction,
createCloseAccountInstruction,
getAssociatedTokenAddressSync,
TOKEN_PROGRAM_ID,
} from '@solana/spl-token';
import {
Keypair,
Connection,
PublicKey,
ComputeBudgetProgram,
KeyedAccountInfo,
TransactionMessage,
VersionedTransaction,
Commitment,
} from '@solana/web3.js';
import { retry, getTokenAccounts, RAYDIUM_LIQUIDITY_PROGRAM_ID_V4, OPENBOOK_PROGRAM_ID, createPoolKeys, retrieveEnvVariable, retrieveTokenValueByAddress } from './src/blockchain';
import { getMinimalMarketV3, MinimalMarketLayoutV3, getRugCheck } from './src/blockchain';
import { MintLayout } from './src/mint';
import bs58 from 'bs58';
import * as fs from 'fs';
import * as path from 'path';
import { logger } from './src/log';
const network = 'mainnet-beta';
const RPC_ENDPOINT = retrieveEnvVariable('RPC_ENDPOINT', logger);
const RPC_WEBSOCKET = retrieveEnvVariable('RPC_WEBSOCKET', logger);
const solanaConnection = new Connection(RPC_ENDPOINT, {
wsEndpoint: RPC_WEBSOCKET,
});
export type MinimalTokenAccountData = {
mint: PublicKey;
address: PublicKey;
buyValue?: number;
poolKeys?: LiquidityPoolKeys;
market?: MinimalMarketLayoutV3;
};
let existingLiquidityPools: Set<string> = new Set<string>();
let existingOpenBookMarkets: Set<string> = new Set<string>();
let existingTokenAccounts: Map<string, MinimalTokenAccountData> = new Map<string, MinimalTokenAccountData>();
let wallet: Keypair;
let quoteToken: Token;
let quoteTokenAssociatedAddress: PublicKey;
let quoteAmount: TokenAmount;
let quoteMinPoolSizeAmount: TokenAmount;
let quoteMaxPoolSizeAmount: TokenAmount;
let commitment: Commitment = retrieveEnvVariable('COMMITMENT_LEVEL', logger) as Commitment;
const ENABLE_BUY = retrieveEnvVariable('ENABLE_BUY', logger) === 'true';
const TAKE_PROFIT = Number(retrieveEnvVariable('TAKE_PROFIT', logger));
const STOP_LOSS = Number(retrieveEnvVariable('STOP_LOSS', logger));
const MINT_IS_RENOUNCED = retrieveEnvVariable('MINT_IS_RENOUNCED', logger) === 'true';
const USE_SNIPEDLIST = retrieveEnvVariable('USE_SNIPEDLIST', logger) === 'true';
const SNIPE_LIST_REFRESH_INTERVAL = Number(retrieveEnvVariable('SNIPE_LIST_REFRESH_INTERVAL', logger));
const AUTO_SELL = retrieveEnvVariable('AUTO_SELL', logger) === 'true';
const MAX_SELL_RETRIES = Number(retrieveEnvVariable('MAX_SELL_RETRIES', logger));
const MIN_POOL_SIZE = retrieveEnvVariable('MIN_POOL_SIZE', logger);
const MAX_POOL_SIZE = retrieveEnvVariable('MAX_POOL_SIZE', logger);
let snipeList: string[] = [];
async function init(): Promise<void> {
logger.info(`
FSSB TEST VERSION - USE AT YOUR OWN RISK
███████╗███╗ ██╗██╗██████╗ ███████╗██████╗ ██████╗ ██████╗ ████████╗
██╔════╝████╗ ██║██║██╔══██╗██╔════╝██╔══██╗ ██╔══██╗██╔═══██╗╚══██╔══╝
███████╗██╔██╗ ██║██║██████╔╝█████╗ ██████╔╝ ██████╔╝██║ ██║ ██║
╚════██║██║╚██╗██║██║██╔═══╝ ██╔══╝ ██╔══██╗ ██╔══██╗██║ ██║ ██║
███████║██║ ╚████║██║██║ ███████╗██║ ██║ ██████╔╝╚██████╔╝ ██║
╚══════╝╚═╝ ╚═══╝╚═╝╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝
v.a.1.0.3
erikerik116
-------- RUNNING | CTRL+C TO STOP IT --------
`);
const MY_PRIVATE_KEY = retrieveEnvVariable('MY_PRIVATE_KEY', logger);
wallet = Keypair.fromSecretKey(bs58.decode(MY_PRIVATE_KEY));
logger.info(`CONNECTED @ ${RPC_ENDPOINT}`);
logger.info('----------------------------------------------------------');
logger.info(`Wallet Address: ${wallet.publicKey}`);
const TOKEN_SYMB = retrieveEnvVariable('TOKEN_SYMB', logger);
const BUY_AMOUNT = retrieveEnvVariable('BUY_AMOUNT', logger);
switch (TOKEN_SYMB) {
case 'WSOL': {
quoteToken = Token.WSOL;
quoteAmount = new TokenAmount(Token.WSOL, BUY_AMOUNT, false);
quoteMinPoolSizeAmount = new TokenAmount(quoteToken, MIN_POOL_SIZE, false);
quoteMaxPoolSizeAmount = new TokenAmount(quoteToken, MAX_POOL_SIZE, false);
break;
}
case 'USDC': {
quoteToken = new Token(
TOKEN_PROGRAM_ID,
new PublicKey('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'),
6,
'USDC',
'USDC',
);
quoteAmount = new TokenAmount(quoteToken, BUY_AMOUNT, false);
break;
}
default: {
throw new Error(`Unsupported "${TOKEN_SYMB}"! ONLY USDC or WSOL`);
}
}
logger.info(`Snipelist: ${USE_SNIPEDLIST}`);
logger.info(`Mint renounced: ${MINT_IS_RENOUNCED}`);
logger.info(`Auto sell: ${AUTO_SELL}`);
logger.info(`T/P: ${TAKE_PROFIT}%`);
logger.info(`S/L: ${STOP_LOSS}%`);
logger.info(
`Pool size min >: ${quoteMinPoolSizeAmount.isZero() ? 'false' : quoteMinPoolSizeAmount.toFixed()} ${quoteToken.symbol}`,
);
logger.info(
`Pool size max <: ${quoteMaxPoolSizeAmount.isZero() ? 'false' : quoteMaxPoolSizeAmount.toFixed()} ${quoteToken.symbol}`,
);
logger.info(`Buy amount: ${quoteAmount.toFixed()} ${quoteToken.symbol}`);
const tokenAccounts = await getTokenAccounts(solanaConnection, wallet.publicKey, commitment);
for (const ta of tokenAccounts) {
existingTokenAccounts.set(ta.accountInfo.mint.toString(), <MinimalTokenAccountData>{
mint: ta.accountInfo.mint,
address: ta.pubkey,
});
}
const tokenAccount = tokenAccounts.find((acc) => acc.accountInfo.mint.toString() === quoteToken.mint.toString())!;
if (!tokenAccount) {
logger.error(`---> Put SOL in your wallet and swap SOL to WSOL at https://jup.ag/ <---`);
throw new Error(`No ${quoteToken.symbol} token account found in wallet: ${wallet.publicKey}`);
}
quoteTokenAssociatedAddress = tokenAccount.pubkey;
loadSnipedList();
}
function saveTokenAccount(mint: PublicKey, accountData: MinimalMarketLayoutV3) {
const ata = getAssociatedTokenAddressSync(mint, wallet.publicKey);
const tokenAccount = <MinimalTokenAccountData>{
address: ata,
mint: mint,
market: <MinimalMarketLayoutV3>{
bids: accountData.bids,
asks: accountData.asks,
eventQueue: accountData.eventQueue,
},
};
existingTokenAccounts.set(mint.toString(), tokenAccount);
return tokenAccount;
}
export async function processRaydiumPool(id: PublicKey, poolState: LiquidityStateV4) {
let rugRiskDanger = false;
let rugRisk = 'Unknown';
if (!shouldBuy(poolState.baseMint.toString())) {
return;
}
if (!quoteMinPoolSizeAmount.isZero()) {
const poolSize = new TokenAmount(quoteToken, poolState.swapQuoteInAmount, true);
const poolTokenAddress = poolState.baseMint.toString();
// rug check
// await getRugCheck(poolState.baseMint.toString()).then((risk) => {
// if (risk === 'Danger') {
// rugRiskDanger = true;
// }
// rugRisk = risk;
// } );
if (poolSize.lt(quoteMinPoolSizeAmount) || rugRiskDanger) {
logger.warn(`------------------- POOL SKIPPED | (${poolSize.toFixed()} ${quoteToken.symbol}) ------------------- `);
} else {
logger.info(`--------------!!!!! POOL SNIPED | (${poolSize.toFixed()} ${quoteToken.symbol}) !!!!!-------------- `);
}
// logger.info(`TOKEN rugcheck.xyz: ${rugRisk}`);
logger.info(`Pool link: https://dexscreener.com/solana/${id.toString()}`);
logger.info(`Pool Open Time: ${new Date(parseInt(poolState.poolOpenTime.toString()) * 1000).toLocaleString()}`);
logger.info(`--------------------- `);
if (poolSize.lt(quoteMinPoolSizeAmount) || rugRiskDanger) {
return;
}
logger.info(`Pool ID: ${id.toString()}`);
logger.info(`Pool link: https://dexscreener.com/solana/${id.toString()}`);
logger.info(`Pool SOL size: ${poolSize.toFixed()} ${quoteToken.symbol}`);
logger.info(`Base Mint: ${poolState.baseMint}`);
logger.info(`Pool Status: ${poolState.status}`);
// logger.info(`Pool Swap Quote In Amount: ${poolState.swapQuoteInAmount}`);
// logger.info(`Pool Swap Quote Out Amount: ${poolState.swapQuoteOutAmount}`);
// logger.info(`Pool Swap Base In Amount: ${poolState.swapBaseInAmount}`);
// logger.info(`Pool Swap Base Out Amount: ${poolState.swapBaseOutAmount}`);
}
if (!quoteMaxPoolSizeAmount.isZero()) {
const poolSize = new TokenAmount(quoteToken, poolState.swapQuoteInAmount, true);
if (poolSize.gt(quoteMaxPoolSizeAmount)) {
logger.warn(
{
mint: poolState.baseMint,
pooled: `${poolSize.toFixed()} ${quoteToken.symbol}`,
},
`Skipping pool, > ${quoteMaxPoolSizeAmount.toFixed()} ${quoteToken.symbol}`,
`Swap amount: ${poolSize.toFixed()}`,
);
logger.info(`---------------------------------------- \n`);
return;
}
}
if (MINT_IS_RENOUNCED) {
const mintOption = await checkMintable(poolState.baseMint);
if (mintOption !== true) {
logger.warn('Skipping, owner can mint tokens!');
return;
}
}
if (ENABLE_BUY) {
await buy(id, poolState);
} else {
logger.info(`--------------- TOKEN BUY ---------------- \n`);
}
}
export async function checkMintable(vault: PublicKey): Promise<boolean | undefined> {
try {
let { data } = (await solanaConnection.getAccountInfo(vault)) || {};
if (!data) {
return;
}
const deserialize = MintLayout.decode(data);
return deserialize.mintAuthorityOption === 0;
} catch (e) {
logger.debug(e);
logger.error({ mint: vault }, `Failed to check renounced mint`);
}
}
export async function processOpenBookMarket(updatedAccountInfo: KeyedAccountInfo) {
let accountData: MarketStateV3 | undefined;
try {
accountData = MARKET_STATE_LAYOUT_V3.decode(updatedAccountInfo.accountInfo.data);
if (existingTokenAccounts.has(accountData.baseMint.toString())) {
return;
}
saveTokenAccount(accountData.baseMint, accountData);
} catch (e) {
logger.debug(e);
logger.error({ mint: accountData?.baseMint }, `Market process failed`);
}
}
async function buy(accountId: PublicKey, accountData: LiquidityStateV4): Promise<void> {
try {
let tokenAccount = existingTokenAccounts.get(accountData.baseMint.toString());
if (!tokenAccount) {
const market = await getMinimalMarketV3(solanaConnection, accountData.marketId, commitment);
tokenAccount = saveTokenAccount(accountData.baseMint, market);
}
tokenAccount.poolKeys = createPoolKeys(accountId, accountData, tokenAccount.market!);
const { innerTransaction } = Liquidity.makeSwapFixedInInstruction(
{
poolKeys: tokenAccount.poolKeys,
userKeys: {
tokenAccountIn: quoteTokenAssociatedAddress,
tokenAccountOut: tokenAccount.address,
owner: wallet.publicKey,
},
amountIn: quoteAmount.raw,
minAmountOut: 0,
},
tokenAccount.poolKeys.version,
);
const latestBlockhash = await solanaConnection.getLatestBlockhash({
commitment: commitment,
});
const messageV0 = new TransactionMessage({
payerKey: wallet.publicKey,
recentBlockhash: latestBlockhash.blockhash,
instructions: [
ComputeBudgetProgram.setComputeUnitPrice({ microLamports: 421197 }),
ComputeBudgetProgram.setComputeUnitLimit({ units: 101337 }),
createAssociatedTokenAccountIdempotentInstruction(
wallet.publicKey,
tokenAccount.address,
wallet.publicKey,
accountData.baseMint,
),
...innerTransaction.instructions,
],
}).compileToV0Message();
const transaction = new VersionedTransaction(messageV0);
transaction.sign([wallet, ...innerTransaction.signers]);
const rawTransaction = transaction.serialize();
const signature = await retry(
() =>
solanaConnection.sendRawTransaction(rawTransaction, {
skipPreflight: true,
}),
{ retryIntervalMs: 10, retries: 50 },
);
logger.info({ mint: accountData.baseMint, signature }, `Sent buy tx`);
const confirmation = await solanaConnection.confirmTransaction(
{
signature,
lastValidBlockHeight: latestBlockhash.lastValidBlockHeight,
blockhash: latestBlockhash.blockhash,
},
commitment,
);
const basePromise = solanaConnection.getTokenAccountBalance(accountData.baseVault, commitment);
const quotePromise = solanaConnection.getTokenAccountBalance(accountData.quoteVault, commitment);
await Promise.all([basePromise, quotePromise]);
const baseValue = await basePromise;
const quoteValue = await quotePromise;
if (baseValue?.value?.uiAmount && quoteValue?.value?.uiAmount)
tokenAccount.buyValue = quoteValue?.value?.uiAmount / baseValue?.value?.uiAmount;
if (!confirmation.value.err) {
logger.info(
{
signature,
url: `https://solscan.io/tx/${signature}?cluster=${network}`,
dex: `https://dexscreener.com/solana/${accountData.baseMint}?maker=${wallet.publicKey}`,
},
`Confirmed buy tx... @: ${tokenAccount.buyValue} SOL`,
);
} else {
logger.debug(confirmation.value.err);
logger.info({ mint: accountData.baseMint, signature }, `Error confirming buy tx`);
}
} catch (e) {
logger.debug(e);
logger.error({ mint: accountData.baseMint }, `Failed to buy token`);
}
}
async function sell(accountId: PublicKey, mint: PublicKey, amount: BigNumberish, value: number): Promise<boolean> {
let retries = 0;
do {
try {
const tokenAccount = existingTokenAccounts.get(mint.toString());
if (!tokenAccount) {
return true;
}
if (!tokenAccount.poolKeys) {
logger.warn({ mint }, 'No pool keys found');
continue;
}
if (amount === 0) {
logger.info(
{
mint: tokenAccount.mint,
},
`Empty balance, can't sell`,
);
return true;
}
if (tokenAccount.buyValue === undefined) return true;
const netChange = (value - tokenAccount.buyValue) / tokenAccount.buyValue;
if (netChange > STOP_LOSS && netChange < TAKE_PROFIT) return false;
const { innerTransaction } = Liquidity.makeSwapFixedInInstruction(
{
poolKeys: tokenAccount.poolKeys!,
userKeys: {
tokenAccountOut: quoteTokenAssociatedAddress,
tokenAccountIn: tokenAccount.address,
owner: wallet.publicKey,
},
amountIn: amount,
minAmountOut: 0,
},
tokenAccount.poolKeys!.version,
);
const latestBlockhash = await solanaConnection.getLatestBlockhash({
commitment: commitment,
});
const messageV0 = new TransactionMessage({
payerKey: wallet.publicKey,
recentBlockhash: latestBlockhash.blockhash,
instructions: [
ComputeBudgetProgram.setComputeUnitPrice({ microLamports: 400000 }),
ComputeBudgetProgram.setComputeUnitLimit({ units: 200000 }),
...innerTransaction.instructions,
createCloseAccountInstruction(tokenAccount.address, wallet.publicKey, wallet.publicKey),
],
}).compileToV0Message();
const transaction = new VersionedTransaction(messageV0);
transaction.sign([wallet, ...innerTransaction.signers]);
const signature = await solanaConnection.sendRawTransaction(transaction.serialize(), {
preflightCommitment: commitment,
});
logger.info({ mint, signature }, `Sent SELL TX...`);
const confirmation = await solanaConnection.confirmTransaction(
{
signature,
lastValidBlockHeight: latestBlockhash.lastValidBlockHeight,
blockhash: latestBlockhash.blockhash,
},
commitment,
);
if (confirmation.value.err) {
logger.debug(confirmation.value.err);
logger.info({ mint, signature }, `Error confirming sell tx`);
continue;
}
logger.info(
{
mint,
signature,
url: `https://solscan.io/tx/${signature}?cluster=${network}`,
dex: `https://dexscreener.com/solana/${mint}?maker=${wallet.publicKey}`,
},
`Confirmed sell tx... Sold at: ${value}\tNet Profit: ${netChange * 100}%`,
);
return true;
} catch (e: any) {
retries++;
logger.debug(e);
logger.error({ mint }, `Failed to sell token, retry: ${retries}/${MAX_SELL_RETRIES}`);
}
} while (retries < MAX_SELL_RETRIES);
return true;
}
function loadSnipedList() {
if (!USE_SNIPEDLIST) {
return;
}
const count = snipeList.length;
const data = fs.readFileSync(path.join(__dirname, 'snipedlist.txt'), 'utf-8');
snipeList = data
.split('\n')
.map((a) => a.trim())
.filter((a) => a);
if (snipeList.length != count) {
logger.info(`Loaded snipe list: ${snipeList.length}`);
}
}
function shouldBuy(key: string): boolean {
return USE_SNIPEDLIST ? snipeList.includes(key) : true;
}
const runListener = async () => {
await init();
const runTimestamp = Math.floor(new Date().getTime() / 1000);
const raydiumSubscriptionId = solanaConnection.onProgramAccountChange(
RAYDIUM_LIQUIDITY_PROGRAM_ID_V4,
async (updatedAccountInfo) => {
const key = updatedAccountInfo.accountId.toString();
const poolState = LIQUIDITY_STATE_LAYOUT_V4.decode(updatedAccountInfo.accountInfo.data);
const poolOpenTime = parseInt(poolState.poolOpenTime.toString());
const existing = existingLiquidityPools.has(key);
if (poolOpenTime > runTimestamp && !existing) {
existingLiquidityPools.add(key);
const _ = processRaydiumPool(updatedAccountInfo.accountId, poolState);
}
},
commitment,
[
{ dataSize: LIQUIDITY_STATE_LAYOUT_V4.span },
{
memcmp: {
offset: LIQUIDITY_STATE_LAYOUT_V4.offsetOf('quoteMint'),
bytes: quoteToken.mint.toBase58(),
},
},
{
memcmp: {
offset: LIQUIDITY_STATE_LAYOUT_V4.offsetOf('marketProgramId'),
bytes: OPENBOOK_PROGRAM_ID.toBase58(),
},
},
{
memcmp: {
offset: LIQUIDITY_STATE_LAYOUT_V4.offsetOf('status'),
bytes: bs58.encode([6, 0, 0, 0, 0, 0, 0, 0]),
},
},
],
);
const openBookSubscriptionId = solanaConnection.onProgramAccountChange(
OPENBOOK_PROGRAM_ID,
async (updatedAccountInfo) => {
const key = updatedAccountInfo.accountId.toString();
const existing = existingOpenBookMarkets.has(key);
if (!existing) {
existingOpenBookMarkets.add(key);
const _ = processOpenBookMarket(updatedAccountInfo);
}
},
commitment,
[
{ dataSize: MARKET_STATE_LAYOUT_V3.span },
{
memcmp: {
offset: MARKET_STATE_LAYOUT_V3.offsetOf('quoteMint'),
bytes: quoteToken.mint.toBase58(),
},
},
],
);
if (AUTO_SELL) {
const walletSubscriptionId = solanaConnection.onProgramAccountChange(
TOKEN_PROGRAM_ID,
async (updatedAccountInfo) => {
const accountData = AccountLayout.decode(updatedAccountInfo.accountInfo!.data);
if (updatedAccountInfo.accountId.equals(quoteTokenAssociatedAddress)) {
return;
}
let completed = false;
while (!completed) {
setTimeout(() => {}, 1000);
const currValue = await retrieveTokenValueByAddress(accountData.mint.toBase58());
if (currValue) {
logger.info(accountData.mint, `Current Price: ${currValue} SOL`);
completed = await sell(updatedAccountInfo.accountId, accountData.mint, accountData.amount, currValue);
}
}
},
commitment,
[
{
dataSize: 165,
},
{
memcmp: {
offset: 32,
bytes: wallet.publicKey.toBase58(),
},
},
],
);
}
logger.info('-------------------- SEARCH NEW POOLS --------------------');
if (USE_SNIPEDLIST) {
setInterval(loadSnipedList, SNIPE_LIST_REFRESH_INTERVAL);
}
};
runListener();