mirror of
https://github.com/fdundjer/solana-sniper-bot.git
synced 2025-11-09 20:12:06 +10:00
17
index.ts
17
index.ts
@ -41,13 +41,14 @@ import {
|
||||
PRICE_CHECK_INTERVAL,
|
||||
SNIPE_LIST_REFRESH_INTERVAL,
|
||||
TRANSACTION_EXECUTOR,
|
||||
WARP_FEE,
|
||||
CUSTOM_FEE,
|
||||
FILTER_CHECK_INTERVAL,
|
||||
FILTER_CHECK_DURATION,
|
||||
CONSECUTIVE_FILTER_MATCHES,
|
||||
} from './helpers';
|
||||
import { version } from './package.json';
|
||||
import { WarpTransactionExecutor } from './transactions/warp-transaction-executor';
|
||||
import { JitoTransactionExecutor } from './transactions/jito-rpc-transaction-executor';
|
||||
|
||||
const connection = new Connection(RPC_ENDPOINT, {
|
||||
wsEndpoint: RPC_WEBSOCKET_ENDPOINT,
|
||||
@ -80,9 +81,11 @@ function printDetails(wallet: Keypair, quoteToken: Token, bot: Bot) {
|
||||
|
||||
logger.info('- Bot -');
|
||||
|
||||
logger.info(`Using warp: ${bot.isWarp}`);
|
||||
if (bot.isWarp) {
|
||||
logger.info(`Warp fee: ${WARP_FEE}`);
|
||||
logger.info(
|
||||
`Using ${TRANSACTION_EXECUTOR} executer: ${bot.isWarp || bot.isJito || (TRANSACTION_EXECUTOR === 'default' ? true : false)}`,
|
||||
);
|
||||
if (bot.isWarp || bot.isJito) {
|
||||
logger.info(`${TRANSACTION_EXECUTOR} fee: ${CUSTOM_FEE}`);
|
||||
} else {
|
||||
logger.info(`Compute Unit limit: ${botConfig.unitLimit}`);
|
||||
logger.info(`Compute Unit price (micro lamports): ${botConfig.unitPrice}`);
|
||||
@ -144,7 +147,11 @@ const runListener = async () => {
|
||||
|
||||
switch (TRANSACTION_EXECUTOR) {
|
||||
case 'warp': {
|
||||
txExecutor = new WarpTransactionExecutor(WARP_FEE);
|
||||
txExecutor = new WarpTransactionExecutor(CUSTOM_FEE);
|
||||
break;
|
||||
}
|
||||
case 'jito': {
|
||||
txExecutor = new JitoTransactionExecutor(CUSTOM_FEE, connection);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
|
||||
Reference in New Issue
Block a user