You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 93af7bf
Browse filesBrowse the repository at this point in the historyBrowse files
feat: buy, sell and info for Raydium LaunchLab coins
A mint with no pump.fun curve is looked up on LaunchLab, under any launchpad's
platform config and any quote asset, with Token-2022 transfer fees counted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
**Error handling:**`error()` raises `SystemExit` — code after it is unreachable. Core functions return `dict` with `"error"` key for expected failures (graduated tokens, not found, slippage exceeded, insufficient_balance). Catch `ValueError` for wrong wallet password in every command that decrypts. Buy/sell functions perform pre-trade balance validation — SOL for fees and rent, the quote asset for the spend, token balance for sells with specific amounts.
70
70
71
-
**Auto-routing:**When `buy_token` / `sell_token`returns `{"error": "graduated"}`, the command layer in `commands/trade.py` automatically retries via `buy_pumpswap` / `sell_pumpswap` (PumpSwap AMM). Never suppress or swallow the `"graduated"` error in core — the routing decision belongs in the command layer.
71
+
**Auto-routing:**`_route` in `commands/trade.py` picks the venue from the errors core returns:`{"error": "graduated"}` from `buy_token` / `sell_token`retries on PumpSwap, `{"error": "not_found"}` retries on LaunchLab (`buy_launchlab` / `sell_launchlab`). Never suppress or swallow those errors in core — the routing decision belongs in the command layer. `info` falls back to LaunchLab the same way in `core/info.py`.
0 commit comments