|
@@ -100,7 +100,7 @@ export class Bot {
|
|
|
}
|
|
|
|
|
|
public async buy(accountId: PublicKey, poolState: LiquidityStateV4) {
|
|
|
- logger.trace({ mint: poolState.baseMint }, `Processing buy...`);
|
|
|
+ logger.trace({ mint: poolState.baseMint }, `Processing new pool...`);
|
|
|
|
|
|
if (this.config.useSnipeList && !this.snipeListCache?.isInList(poolState.baseMint.toString())) {
|
|
|
logger.debug({ mint: poolState.baseMint.toString() }, `Skipping buy because token is not in a snipe list`);
|
|
@@ -131,11 +131,13 @@ export class Bot {
|
|
|
]);
|
|
|
const poolKeys: LiquidityPoolKeysV4 = createPoolKeys(accountId, poolState, market);
|
|
|
|
|
|
- const match = await this.filterMatch(poolKeys);
|
|
|
+ if (!this.config.useSnipeList) {
|
|
|
+ const match = await this.filterMatch(poolKeys);
|
|
|
|
|
|
- if (!match) {
|
|
|
- logger.trace({ mint: poolKeys.baseMint.toString() }, `Skipping buy because pool doesn't match filters`);
|
|
|
- return;
|
|
|
+ if (!match) {
|
|
|
+ logger.trace({ mint: poolKeys.baseMint.toString() }, `Skipping buy because pool doesn't match filters`);
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
for (let i = 0; i < this.config.maxBuyRetries; i++) {
|
|
@@ -170,7 +172,7 @@ export class Bot {
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
- logger.debug(
|
|
|
+ logger.info(
|
|
|
{
|
|
|
mint: poolState.baseMint.toString(),
|
|
|
signature: result.signature,
|
|
@@ -197,7 +199,7 @@ export class Bot {
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
- logger.trace({ mint: rawAccount.mint }, `Processing sell...`);
|
|
|
+ logger.trace({ mint: rawAccount.mint }, `Processing new token...`);
|
|
|
|
|
|
const poolData = await this.poolStorage.get(rawAccount.mint.toString());
|
|
|
|
|
@@ -269,7 +271,7 @@ export class Bot {
|
|
|
}
|
|
|
}
|
|
|
} catch (error) {
|
|
|
- logger.debug({ mint: rawAccount.mint.toString(), error }, `Failed to sell token`);
|
|
|
+ logger.error({ mint: rawAccount.mint.toString(), error }, `Failed to sell token`);
|
|
|
} finally {
|
|
|
if (this.config.oneTokenAtATime) {
|
|
|
this.sellExecutionCount--;
|
|
@@ -351,7 +353,7 @@ export class Bot {
|
|
|
|
|
|
private async filterMatch(poolKeys: LiquidityPoolKeysV4) {
|
|
|
if (this.config.filterCheckInterval === 0 || this.config.filterCheckDuration === 0) {
|
|
|
- return;
|
|
|
+ return true;
|
|
|
}
|
|
|
|
|
|
const timesToCheck = this.config.filterCheckDuration / this.config.filterCheckInterval;
|