| |
| """ |
| CryptoRugMunch Bot β Configuration |
| =================================== |
| Tiers, channels, API endpoints, DEX ref links, and constants. |
| """ |
|
|
| import os |
|
|
| |
| |
| |
| BOT_TOKEN = os.getenv("RUGMUNCH_BOT_TOKEN", "") |
| OWNER_IDS = {int(x.strip()) for x in os.getenv("TELEGRAM_ALLOWED_USERS", "7075336557").split(",") if x.strip()} |
| BOT_USERNAME = "RugMunchBot" |
|
|
| |
| |
| |
| WEBSITE_URL = "https://rugmunch.io" |
| WEB_APP_URL = f"{WEBSITE_URL}/scanner" |
| TWITTER_URL = "https://x.com/RugMunch" |
| TELEGRAM_CHANNEL = "https://t.me/RugMunchAlerts" |
| TELEGRAM_GROUP = "https://t.me/RugMunchChat" |
| SUPPORT_EMAIL = "biz@rugmunch.io" |
| ENTERPRISE_CONTACT = "biz@rugmunch.io" |
|
|
| SOCIAL_LINKS = { |
| "website": {"emoji": "π", "name": "RugMunch.io", "url": WEBSITE_URL}, |
| "twitter": {"emoji": "π", "name": "Twitter/X", "url": TWITTER_URL}, |
| "channel": {"emoji": "π’", "name": "Alerts Channel", "url": TELEGRAM_CHANNEL}, |
| "group": {"emoji": "π¬", "name": "Community Chat", "url": TELEGRAM_GROUP}, |
| } |
|
|
| |
| BOT_DESCRIPTION = ( |
| "π‘οΈ RugMunch Intelligence β The Bloomberg Terminal of Shitcoins\n\n" |
| "Scan any token across 77+ chains for honeypots, rug pulls, bundles, " |
| "fake volume, and dev wallet history. AI-powered risk scoring with " |
| "real-time alerts.\n\n" |
| "π Multi-chain token scanning\n" |
| "π Wallet forensics & smart money tracking\n" |
| "π Technical analysis & trending tokens\n" |
| "π¨ Real-time scam detection & alerts\n" |
| "π Free crypto scam education\n\n" |
| "π rugmunch.io" |
| ) |
| BOT_SHORT_DESCRIPTION = "π‘οΈ Crypto scam detection & token intelligence across 77+ chains. Free tier available." |
|
|
| |
| |
| |
| BACKEND_URL = os.getenv("RMI_BACKEND_URL", "http://localhost:8000") |
| DATABUS_URL = f"{BACKEND_URL}/api/v1/databus" |
| RAG_URL = f"{BACKEND_URL}/api/v1/rag" |
|
|
| |
| DEXSCREENER = "https://api.dexscreener.com/latest/dex" |
| COINGECKO = "https://api.coingecko.com/api/v3" |
| DEFILLAMA = "https://api.llama.fi" |
| GOPLUS = "https://api.gopluslabs.com/api/v1" |
| HONEYPOT = "https://api.honeypot.is/v2" |
| BUBBLE_MAPS = "https://api.bubblemaps.io" |
| DEXTOOLS = "https://public-api.dextools.io/trial/v2" |
|
|
| |
| |
| |
| |
| |
| TIERS = { |
| "free": { |
| "name": "Free", |
| "emoji": "π", |
| "scans_per_week": 25, |
| "ai_msgs_per_week": 15, |
| "price_monthly": 0, |
| "features": [ |
| "25 scans/week", |
| "15 AI questions/week", |
| "Basic risk score", |
| "Contract safety check", |
| "Liquidity overview", |
| "Top 10 holders", |
| "Community access", |
| ], |
| }, |
| "scout": { |
| "name": "Scout", |
| "emoji": "π", |
| "scans_per_week": 150, |
| "ai_msgs_per_week": 75, |
| "price_monthly": 29.99, |
| "price_stars": 1500, |
| "features": [ |
| "150 scans/week", |
| "75 AI questions/week", |
| "Advanced risk scoring", |
| "Bundle detection", |
| "Fake volume detection", |
| "Dev wallet finder", |
| "Holder trend analysis", |
| "Smart money alerts", |
| "Watchlist (10 tokens)", |
| "Export reports", |
| ], |
| }, |
| "hunter": { |
| "name": "Hunter", |
| "emoji": "π―", |
| "scans_per_week": 400, |
| "ai_msgs_per_week": 250, |
| "price_monthly": 49.99, |
| "price_stars": 2500, |
| "features": [ |
| "400 scans/week", |
| "250 AI questions/week", |
| "Everything in Scout, plus:", |
| "Full wallet forensics", |
| "First buyer analysis", |
| "Exchange flow tracking", |
| "Fresh wallet detection", |
| "Shill detection", |
| "Social sentiment scan", |
| "Watchlist (50 tokens)", |
| "Real-time alerts", |
| "TA chart generation", |
| ], |
| }, |
| "pro": { |
| "name": "Pro", |
| "emoji": "π", |
| "scans_per_week": 1000, |
| "ai_msgs_per_week": 500, |
| "price_monthly": 99.99, |
| "price_stars": 5000, |
| "features": [ |
| "1,000 scans/week", |
| "500 AI questions/week", |
| "Everything in Hunter, plus:", |
| "Smart money watch (live)", |
| "Cross-chain tracking", |
| "Custom alert rules", |
| "API access", |
| "Priority support", |
| "Early feature access", |
| "Unlimited watchlists", |
| "Multi-wallet tracking", |
| "White-label reports", |
| ], |
| }, |
| } |
|
|
| |
| |
| |
| |
| USER_REF_LINKS = { |
| |
| |
| |
| |
| |
| |
| |
| |
| } |
|
|
| |
| |
| |
| |
| |
| TOP_UP_PACKS = { |
| "scans_10": { |
| "name": "10 Extra Scans", |
| "emoji": "π¬", |
| "type": "scans", |
| "amount": 10, |
| "stars": 75, |
| }, |
| "scans_50": { |
| "name": "50 Extra Scans", |
| "emoji": "π¬", |
| "type": "scans", |
| "amount": 50, |
| "stars": 300, |
| }, |
| "scans_100": { |
| "name": "100 Extra Scans", |
| "emoji": "π¬", |
| "type": "scans", |
| "amount": 100, |
| "stars": 500, |
| }, |
| "ai_10": { |
| "name": "10 Extra AI Messages", |
| "emoji": "π€", |
| "type": "ai_msgs", |
| "amount": 10, |
| "stars": 100, |
| }, |
| "ai_50": { |
| "name": "50 Extra AI Messages", |
| "emoji": "π€", |
| "type": "ai_msgs", |
| "amount": 50, |
| "stars": 400, |
| }, |
| "ai_100": { |
| "name": "100 Extra AI Messages", |
| "emoji": "π€", |
| "type": "ai_msgs", |
| "amount": 100, |
| "stars": 700, |
| }, |
| } |
|
|
| |
| |
| |
| SCAN_PACKS = { |
| "deep_scan": { |
| "name": "π¬ Deep Token Scan", |
| "description": "Complete forensic analysis of ONE token", |
| "includes": [ |
| "Price history", |
| "Holder bubble map", |
| "Wallet clusters", |
| "Scam indicators", |
| "AI prediction", |
| "Dev history", |
| ], |
| "stars": 250, |
| }, |
| "wallet_forensic": { |
| "name": "π΅οΈ Wallet Forensic Report", |
| "description": "Full wallet investigation β P&L, connections, history", |
| "includes": [ |
| "Transaction history", |
| "Counterparty analysis", |
| "P&L breakdown", |
| "Bundle links", |
| "Scam DB check", |
| ], |
| "stars": 400, |
| }, |
| "bundle_investigation": { |
| "name": "πΈοΈ Bundle Investigation", |
| "description": "Full cluster analysis β find every connected wallet", |
| "includes": [ |
| "Funding source map", |
| "Timing correlation", |
| "Wash trade detection", |
| "Holder overlap", |
| "Exit strategy clues", |
| ], |
| "stars": 500, |
| }, |
| } |
|
|
| |
| |
| |
| |
| |
| DEX_REF_LINKS = { |
| "jupiter": { |
| "name": "Jupiter", |
| "emoji": "πͺ", |
| "url": "https://jup.ag/swap/SOL-{token}?ref=rugmunch", |
| "chains": ["solana"], |
| "description": "Best Solana DEX aggregator", |
| }, |
| "photon": { |
| "name": "Photon", |
| "emoji": "β‘", |
| "url": "https://photon-sol.tinyastro.io/en/lp/{token}?handle=rugmunch", |
| "chains": ["solana", "ethereum", "base"], |
| "description": "Fast Solana trading terminal", |
| }, |
| "bullx": { |
| "name": "BullX", |
| "emoji": "π", |
| "url": "https://neo.bullx.io/terminal?chain={chain}&address={token}&ref=rugmunch", |
| "chains": ["solana", "ethereum", "base", "bsc", "arbitrum"], |
| "description": "Multi-chain trading bot", |
| }, |
| "gmgn": { |
| "name": "GMGN.ai", |
| "emoji": "π", |
| "url": "https://gmgn.ai/sol/token/{token}?ref=rugmunch", |
| "chains": ["solana", "ethereum", "base"], |
| "description": "Smart money tracking + trading", |
| }, |
| "birdeye": { |
| "name": "Birdeye", |
| "emoji": "π¦
", |
| "url": "https://birdeye.so/token/{token}?ref=rugmunch", |
| "chains": ["solana", "ethereum", "base", "bsc", "arbitrum"], |
| "description": "Token analytics & charts", |
| }, |
| "oneinch": { |
| "name": "1inch", |
| "emoji": "π¦", |
| "url": "https://app.1inch.io/#/{chain_id}/simple/swap/ETH/{token}?ref=rugmunch", |
| "chains": ["ethereum", "base", "arbitrum", "bsc", "polygon", "avalanche"], |
| "description": "Best EVM DEX aggregator", |
| }, |
| "pancakeswap": { |
| "name": "PancakeSwap", |
| "emoji": "π₯", |
| "url": "https://pancakeswap.finance/swap?inputCurrency=BNB&outputCurrency={token}&ref=rugmunch", |
| "chains": ["bsc", "ethereum", "arbitrum", "base"], |
| "description": "BSC's #1 DEX", |
| }, |
| } |
|
|
| |
| CHAIN_IDS = { |
| "ethereum": 1, |
| "bsc": 56, |
| "polygon": 137, |
| "arbitrum": 42161, |
| "avalanche": 43114, |
| "optimism": 10, |
| "base": 8453, |
| "fantom": 250, |
| } |
|
|
| |
| |
| |
| CHANNELS = { |
| "main": "-1002056885429", |
| "news": "-1003982391578", |
| "alerts": "-1003818352164", |
| "alpha": "-1003762675055", |
| "scans": "-1003937506770", |
| } |
|
|
| |
| |
| |
| RISK_COLORS = { |
| "critical": "π΄", |
| "high": "π ", |
| "medium": "π‘", |
| "low": "π’", |
| "safe": "β
", |
| "unknown": "βͺ", |
| } |
|
|
|
|
| def risk_bar(score: float, length: int = 10) -> str: |
| """Generate a visual risk bar (0-100 scale).""" |
| filled = int((score / 100) * length) |
| if score >= 80: |
| return "π΄" * filled + "β¬" * (length - filled) + f" {score}% DANGER" |
| elif score >= 60: |
| return "π " * filled + "β¬" * (length - filled) + f" {score}% RISKY" |
| elif score >= 40: |
| return "π‘" * filled + "β¬" * (length - filled) + f" {score}% CAUTION" |
| elif score >= 20: |
| return "π’" * filled + "β¬" * (length - filled) + f" {score}% LOW" |
| else: |
| return "β
" * filled + "β¬" * (length - filled) + f" {score}% SAFE" |
|
|
|
|
| def threat_indicator(label: str, found: bool) -> str: |
| return f"{'π΄' if found else 'β
'} {label}" |
|
|
|
|
| |
| |
| |
| def fmt_number(n) -> str: |
| """Format large numbers: 1.2M, 450K, etc.""" |
| if n is None: |
| return "N/A" |
| try: |
| n = float(n) |
| except (ValueError, TypeError): |
| return str(n) |
| if n >= 1e9: |
| return f"${n / 1e9:.2f}B" |
| elif n >= 1e6: |
| return f"${n / 1e6:.2f}M" |
| elif n >= 1e3: |
| return f"${n / 1e3:.1f}K" |
| elif n >= 1: |
| return f"${n:.4f}" |
| elif n >= 0.01: |
| return f"${n:.6f}" |
| else: |
| return f"${n:.10f}" |
|
|
|
|
| def fmt_pct(n) -> str: |
| if n is None: |
| return "N/A" |
| try: |
| return f"{float(n):.2f}%" |
| except (ValueError, TypeError): |
| return str(n) |
|
|
|
|
| def fmt_chain(chain: str) -> str: |
| """Return chain emoji + name.""" |
| emojis = { |
| "solana": "β", |
| "ethereum": "β ", |
| "bsc": "πΆ", |
| "polygon": "π£", |
| "arbitrum": "π΅", |
| "optimism": "π΄", |
| "base": "π·", |
| "avalanche": "πΊ", |
| "fantom": "π»", |
| "tron": "π»", |
| "bitcoin": "βΏ", |
| } |
| return f"{emojis.get(chain.lower(), 'βοΈ')} {chain.capitalize()}" |
|
|
|
|
| |
| |
| |
| SCAM_SCHOOL_TOPICS = { |
| "honeypot": { |
| "title": "π― Honeypot Tokens", |
| "content": "A honeypot lets you buy but prevents you from selling. The contract has hidden code that only allows whitelisted addresses to sell.\n\nπ *How to spot:*\nβ’ Can buy but can't sell\nβ’ Only 1-2 sellers ever\nβ’ Contract has sell restrictions\nβ’ Honeypot.is flags it\n\nπ‘οΈ *Protection:* Always test with a small amount first, and use /scan before buying.", |
| }, |
| "rugpull": { |
| "title": "π Rug Pulls", |
| "content": "Developers drain all liquidity from a token, making it worthless. Can happen via:\n\nβ’ Removing LP tokens\nβ’ Minting infinite tokens\nβ’ Hidden sell functions\nβ’ Blacklisting buyers\n\nπ *How to spot:*\nβ’ Unlocked liquidity\nβ’ Unrenounced contract\nβ’ Dev holds >20% supply\nβ’ New wallet, no history\n\nπ‘οΈ *Protection:* Check /scan for LP lock status and dev wallet analysis.", |
| }, |
| "bundling": { |
| "title": "π¦ Bundle Scams", |
| "content": "Devs use multiple wallets to create fake organic activity. They buy from 10-50 wallets funded from the same source.\n\nπ *How to spot:*\nβ’ Multiple wallets funded from same CEX/bridge\nβ’ Identical buy amounts\nβ’ Same-timestamp transactions\nβ’ Wallets only hold this one token\n\nπ‘οΈ *Protection:* Use /scan bundle detection to trace funding sources.", |
| }, |
| "wash_trading": { |
| "title": "π Wash Trading", |
| "content": "Artificially inflating volume by buying and selling between own wallets.\n\nπ *How to spot:*\nβ’ High volume, low unique traders\nβ’ Same wallets trading back and forth\nβ’ Round number trade amounts\nβ’ Volume doesn't match market cap\n\nπ‘οΈ *Protection:* /scan checks volume authenticity.", |
| }, |
| "fresh_wallets": { |
| "title": "π Fresh Wallet Red Flags", |
| "content": "When most holders are brand new wallets (created <7 days ago), it often means the dev created fake holders.\n\nπ *How to spot:*\nβ’ >50% wallets <7 days old\nβ’ Wallets only hold 1 token\nβ’ No transaction history before buying\nβ’ Similar naming patterns\n\nπ‘οΈ *Protection:* /scan shows wallet age distribution.", |
| }, |
| "exchange_flow": { |
| "title": "π¦ Exchange Flow Analysis", |
| "content": "Tracking when large holders move tokens to exchanges signals potential dumps.\n\nπ *How to spot:*\nβ’ Top holders sending to CEX wallets\nβ’ Increasing exchange deposits\nβ’ Unusual transfer patterns\nβ’ Pre-scheduled dumps\n\nπ‘οΈ *Protection:* Hunter+ tiers get real-time exchange flow alerts.", |
| }, |
| } |
|
|