refactoring - wip - broken
This commit is contained in:
parent
1ad6cf379a
commit
f633df6f63
@ -42,6 +42,12 @@ import random
|
|||||||
import time
|
import time
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
|
|
||||||
|
|
||||||
|
from modules.SolanaAPI import SolanaAPI
|
||||||
|
from modules.webui import init_app
|
||||||
|
from modules.storage import init_db, store_transaction
|
||||||
|
from modules.utils import telegram_utils
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
# config = load_config()
|
# config = load_config()
|
||||||
@ -192,8 +198,6 @@ solana_client = AsyncClient(SOLANA_HTTP_URL)
|
|||||||
dexscreener_client = DexscreenerClient()
|
dexscreener_client = DexscreenerClient()
|
||||||
|
|
||||||
|
|
||||||
# Initialize Telegram Bot
|
|
||||||
bot = Bot(token=TELEGRAM_BOT_TOKEN)
|
|
||||||
|
|
||||||
# Token addresses (initialize with some known tokens)
|
# Token addresses (initialize with some known tokens)
|
||||||
TOKEN_ADDRESSES = {
|
TOKEN_ADDRESSES = {
|
||||||
@ -1057,11 +1061,12 @@ async def check_PK():
|
|||||||
|
|
||||||
# Convert Flask app to ASGI
|
# Convert Flask app to ASGI
|
||||||
asgi_app = WsgiToAsgi(app)
|
asgi_app = WsgiToAsgi(app)
|
||||||
|
solanaAPI = SolanaAPI()
|
||||||
|
|
||||||
async def main():
|
async def main():
|
||||||
global solanaAPI, bot, PROCESSING_LOG
|
global solanaAPI, bot, PROCESSING_LOG
|
||||||
|
|
||||||
|
telegram_utils.initialize()
|
||||||
await telegram_utils.send_telegram_message("Solana Agent Started. Connecting to mainnet...")
|
await telegram_utils.send_telegram_message("Solana Agent Started. Connecting to mainnet...")
|
||||||
await check_PK()
|
await check_PK()
|
||||||
# new: restart wallet_watch_loop every hour
|
# new: restart wallet_watch_loop every hour
|
||||||
|
Loading…
x
Reference in New Issue
Block a user