using .env
This commit is contained in:
parent
a7fdd033e9
commit
a0c9558e5d
4
crypto/sol/.env
Normal file
4
crypto/sol/.env
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
DEVELOPER_CHAT_ID="777826553"
|
||||||
|
FOLLOWED_WALLET="9U7D916zuQ8qcL9kQZqkcroWhHGho5vD8VNekvztrutN"
|
||||||
|
YOUR_WALLET="65nzyZXTLC81MthTo52a2gRJjqryTizWVqpK2fDKLye5"
|
||||||
|
TELEGRAM_BOT_TOKEN="6805059978:AAHNJKuOeazMSJHc3-BXRCsFfEVyFHeFnjw"
|
@ -1,9 +1,11 @@
|
|||||||
|
import asyncio
|
||||||
|
import websockets
|
||||||
|
import json
|
||||||
from flask import Flask, render_template, request, jsonify
|
from flask import Flask, render_template, request, jsonify
|
||||||
from solana.rpc.async_api import AsyncClient
|
from solana.rpc.async_api import AsyncClient
|
||||||
from solana.rpc.commitment import Confirmed
|
from solana.rpc.commitment import Confirmed
|
||||||
from solders.pubkey import Pubkey
|
from solders.pubkey import Pubkey
|
||||||
from dexscreener import DexscreenerClient
|
from dexscreener import DexscreenerClient
|
||||||
import asyncio
|
|
||||||
from telegram import Bot
|
from telegram import Bot
|
||||||
from telegram.constants import ParseMode
|
from telegram.constants import ParseMode
|
||||||
import datetime
|
import datetime
|
||||||
@ -11,10 +13,10 @@ import logging
|
|||||||
from solana.rpc.websocket_api import connect
|
from solana.rpc.websocket_api import connect
|
||||||
from solana.rpc.async_api import AsyncClient
|
from solana.rpc.async_api import AsyncClient
|
||||||
from solana.rpc.commitment import Confirmed
|
from solana.rpc.commitment import Confirmed
|
||||||
|
import os
|
||||||
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
import websockets
|
load_dotenv()
|
||||||
import json
|
|
||||||
|
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
@ -23,10 +25,10 @@ solana_client = AsyncClient("https://api.mainnet-beta.solana.com")
|
|||||||
dexscreener_client = DexscreenerClient()
|
dexscreener_client = DexscreenerClient()
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
DEVELOPER_CHAT_ID = "777826553"
|
DEVELOPER_CHAT_ID = os.getenv("DEVELOPER_CHAT_ID")
|
||||||
FOLLOWED_WALLET = "9U7D916zuQ8qcL9kQZqkcroWhHGho5vD8VNekvztrutN" # traderrobot
|
FOLLOWED_WALLET = os.getenv("FOLLOWED_WALLET")
|
||||||
YOUR_WALLET = "65nzyZXTLC81MthTo52a2gRJjqryTizWVqpK2fDKLye5"
|
YOUR_WALLET = os.getenv("YOUR_WALLET")
|
||||||
TELEGRAM_BOT_TOKEN = "6805059978:AAHNJKuOeazMSJHc3-BXRCsFfEVyFHeFnjw"
|
TELEGRAM_BOT_TOKEN = os.getenv("TELEGRAM_BOT_TOKEN")
|
||||||
|
|
||||||
# Initialize Telegram Bot
|
# Initialize Telegram Bot
|
||||||
bot = Bot(token=TELEGRAM_BOT_TOKEN)
|
bot = Bot(token=TELEGRAM_BOT_TOKEN)
|
||||||
@ -184,7 +186,7 @@ async def subscribe_to_wallet():
|
|||||||
"id": 1,
|
"id": 1,
|
||||||
"method": "logsSubscribe",
|
"method": "logsSubscribe",
|
||||||
"params": [
|
"params": [
|
||||||
{"mentions": ["YOUR_WALLET_ADDRESS"], "commitment": "confirmed"}
|
{"mentions": [YOUR_WALLET], "commitment": "confirmed"}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user