solana-rug
Python CLI and Hermes skill for deterministic Solana token and wallet risk analysis with public RPCs, DexScreener data, scoring modules, watch mode, history, and webhook alerts.
repocodegraphtheory/solana-rugdocshttps://graphtheory.xyz/solana-rug/statusoriginal GraphTheory workaudiencedevelopers and maintainersoverview
Python CLI and Hermes skill for deterministic Solana token and wallet risk analysis with public RPCs, DexScreener data, scoring modules, watch mode, history, and webhook alerts.
token scanFetch Solana token context, market context, authorities, liquidity, holders, and risk signals, then produce score and findings.wallet scanInspect wallet token exposure and flag risky holdings.watch modePersist history to SQLite, run continuous checks, and optionally send webhook alerts below threshold.Hermes skillInstall SKILL.md so Hermes can run natural-language token and wallet checks.quickstart
Use these commands first. They are intentionally copyable and match the public repository workflow.
install or run
pip install solana-rugsolana-rug token <MINT_ADDRESS>solana-rug wallet <WALLET_ADDRESS>local developer setup
git clone https://github.com/codegraphtheory/solana-rug.gitcd solana-rugpython3 -m pip install -e ".[dev]"pytest -k "not slow"ruff check .mypy rugguard testsdeveloper workflows
The project is useful when the workflow is explicit. These are the paths to test before treating the project as production-ready.
token scanFetch Solana token context, market context, authorities, liquidity, holders, and risk signals, then produce score and findings.wallet scanInspect wallet token exposure and flag risky holdings.watch modePersist history to SQLite, run continuous checks, and optionally send webhook alerts below threshold.Hermes skillInstall SKILL.md so Hermes can run natural-language token and wallet checks.repo map
Start with these files when debugging, extending, or reviewing the project.
rugguard/cli.pyCommand-line entry point and argument parsing.rugguard/analysis.pyHigh-level token and wallet analysis orchestration.rugguard/scoring.pySafety score and warning aggregation.rugguard/onchain.pySolana on-chain data access.rugguard/rpc.pyRPC client helpers and public endpoint behavior.rugguard/watch.pyWatch mode, history, and webhook loop.SKILL.mdHermes skill interface for natural-language checks.tests/test_checks.pyCore scoring and risk-check tests.validation
Do not trust the docs. Run the checks and inspect the output.
python3 -m pytest -k "not slow"python3 -m ruff check .python3 -m mypy rugguard testssolana-rug token DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263 --jsonconfiguration
Configuration surface and credential expectations.
No API keys requiredUses public Solana RPCs and free DexScreener API for normal checks.WEBHOOK_URLOptional watch-mode destination when using webhook alerts.PYPI_TOKENMaintainer-only release secret for publishing packages.Never commit .env files, OAuth tokens, API keys, cookies, private documents, or Hermes runtime state.
troubleshooting
Common failure modes and where to look first.
public RPC rate limitsRetry later, use a configured RPC, or reduce watch frequency.market data missingTreat missing liquidity or pair data as a risk signal, not proof of safety.scores look surprisingInspect the JSON output. Each warning contributes to the final safety score.contribute
Open a focused issue or pull request with commands run, expected behavior, actual behavior, and relevant logs. Keep changes scoped. For GraphTheory public repos, maintainer commits use the GraphTheory identity and avoid private personal data.