refactor: split monolithic rugguard.py into rugguard/ package#51
Merged
Conversation
Splits scripts/rugguard.py (~2400 lines) into a proper Python package:
rugguard/
rpc.py JSON-RPC client, caching, concurrency controls
onchain.py On-chain fetchers (holders, LP, metadata, DexScreener)
scoring.py RugFlags, RugScore, scoring engine (13 components)
analysis.py rug_check_token pipeline, rug_check_wallet, ProgressBar
formatting.py Markdown, JSON, CSV, JSONL export, sparkline, badge,
comparison table, timeline, SVG
watch.py SQLite history, webhooks, cli_watch
cli.py CLI dispatch, main(), all CLI commands
__init__.py Public API re-exports
scripts/
solana-rug.py Standalone CLI launcher (no pip install needed)
All 43 tests pass. All features preserved: export CSV/JSONL, compare,
badge, timeline, telegram bot, docker, concurrent wallet scan, sparkline,
granular liquidity scoring, Token-2022 GPA fallback, sniper detection.
Co-authored-by: a11ce <a11ce@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Inspired by @a11ce's PR #50. This refactors the monolithic
scripts/rugguard.py(~2400 lines) into a proper Python package with 8 focused modules, preserving ALL current features.New structure:
All 43 tests pass. Ruff clean. Zero regressions.
@a11ce thank you for the refactoring idea and the structural blueprint. Please post your Solana wallet address for a 500,000 $RUG bounty.