mirror of
https://github.com/chainstacklabs/pumpfun-bonkfun-bot.git
synced 2026-07-27 15:27:44 +00:00
fix: comments, minor fixes
This commit is contained in:
@@ -8,7 +8,7 @@ rpc_endpoint: "${SOLANA_NODE_RPC_ENDPOINT}"
|
|||||||
wss_endpoint: "${SOLANA_NODE_WSS_ENDPOINT}"
|
wss_endpoint: "${SOLANA_NODE_WSS_ENDPOINT}"
|
||||||
private_key: "${SOLANA_PRIVATE_KEY}"
|
private_key: "${SOLANA_PRIVATE_KEY}"
|
||||||
|
|
||||||
enabled: true # You can turn off the bot w/o removing its config
|
enabled: false # You can turn off the bot w/o removing its config
|
||||||
separate_process: true
|
separate_process: true
|
||||||
|
|
||||||
# Geyser configuration (fastest method for getting updates)
|
# Geyser configuration (fastest method for getting updates)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ rpc_endpoint: "${SOLANA_NODE_RPC_ENDPOINT}"
|
|||||||
wss_endpoint: "${SOLANA_NODE_WSS_ENDPOINT}"
|
wss_endpoint: "${SOLANA_NODE_WSS_ENDPOINT}"
|
||||||
private_key: "${SOLANA_PRIVATE_KEY}"
|
private_key: "${SOLANA_PRIVATE_KEY}"
|
||||||
|
|
||||||
enabled: false # You can turn off the bot w/o removing its config
|
enabled: true # You can turn off the bot w/o removing its config
|
||||||
separate_process: true
|
separate_process: true
|
||||||
|
|
||||||
# Geyser configuration (fastest method for getting updates)
|
# Geyser configuration (fastest method for getting updates)
|
||||||
|
|||||||
@@ -50,10 +50,10 @@ def load_bot_config(path: str) -> dict:
|
|||||||
if env_file:
|
if env_file:
|
||||||
env_path = os.path.join(os.path.dirname(path), env_file)
|
env_path = os.path.join(os.path.dirname(path), env_file)
|
||||||
if os.path.exists(env_path):
|
if os.path.exists(env_path):
|
||||||
load_dotenv(env_path)
|
load_dotenv(env_path, override=True)
|
||||||
else:
|
else:
|
||||||
# If not found relative to config, try relative to current working directory
|
# If not found relative to config, try relative to current working directory
|
||||||
load_dotenv(env_file)
|
load_dotenv(env_file, override=True)
|
||||||
|
|
||||||
resolve_env_vars(config)
|
resolve_env_vars(config)
|
||||||
validate_config(config)
|
validate_config(config)
|
||||||
|
|||||||
+1
-1
@@ -163,7 +163,7 @@ class SolanaClient:
|
|||||||
# Add priority fee instructions if applicable
|
# Add priority fee instructions if applicable
|
||||||
if priority_fee is not None:
|
if priority_fee is not None:
|
||||||
fee_instructions = [
|
fee_instructions = [
|
||||||
set_compute_unit_limit(70_000), # Default compute unit limit
|
set_compute_unit_limit(72_000), # Default compute unit limit
|
||||||
set_compute_unit_price(priority_fee),
|
set_compute_unit_price(priority_fee),
|
||||||
]
|
]
|
||||||
instructions = fee_instructions + instructions
|
instructions = fee_instructions + instructions
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ class TokenBuyer(Trader):
|
|||||||
# Skip the wait and directly calculate the amount
|
# Skip the wait and directly calculate the amount
|
||||||
token_amount = self.extreme_fast_token_amount
|
token_amount = self.extreme_fast_token_amount
|
||||||
token_price_sol = self.amount / token_amount
|
token_price_sol = self.amount / token_amount
|
||||||
logger.info(f"EXTREME FAST Mode: Buying {token_amount} tokens.")
|
#logger.info(f"EXTREME FAST Mode: Buying {token_amount} tokens.")
|
||||||
else:
|
else:
|
||||||
# Regular behavior with RPC call
|
# Regular behavior with RPC call
|
||||||
curve_state = await self.curve_manager.get_curve_state(token_info.bonding_curve)
|
curve_state = await self.curve_manager.get_curve_state(token_info.bonding_curve)
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import os
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from time import monotonic
|
from time import monotonic
|
||||||
|
|
||||||
|
import uvloop
|
||||||
from solders.pubkey import Pubkey
|
from solders.pubkey import Pubkey
|
||||||
|
|
||||||
from cleanup.modes import (
|
from cleanup.modes import (
|
||||||
@@ -29,6 +30,8 @@ from trading.buyer import TokenBuyer
|
|||||||
from trading.seller import TokenSeller
|
from trading.seller import TokenSeller
|
||||||
from utils.logger import get_logger
|
from utils.logger import get_logger
|
||||||
|
|
||||||
|
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
|
||||||
|
|
||||||
logger = get_logger(__name__)
|
logger = get_logger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@@ -357,7 +360,6 @@ class PumpTrader:
|
|||||||
logger.info(
|
logger.info(
|
||||||
f"Skipping token {token_info.symbol} - too old ({token_age:.1f}s > {self.max_token_age}s)"
|
f"Skipping token {token_info.symbol} - too old ({token_age:.1f}s > {self.max_token_age}s)"
|
||||||
)
|
)
|
||||||
#self.token_queue.task_done()
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
self.processed_tokens.add(token_key)
|
self.processed_tokens.add(token_key)
|
||||||
|
|||||||
Reference in New Issue
Block a user