feat: non-EVM (Solana/Bitcoin) read-only support + Jupiter quotes (v1.1.0-rc.1)#7
Open
junjieit wants to merge 13 commits into
Open
feat: non-EVM (Solana/Bitcoin) read-only support + Jupiter quotes (v1.1.0-rc.1)#7junjieit wants to merge 13 commits into
junjieit wants to merge 13 commits into
Conversation
- chain/protocol analytics accept svm/bvm/solana/bitcoin aliases via DefiLlama - wallet balance/overview/pnl/history/labels/defi now branch on AddressRef: SVM via Debank/Zerion, BVM via new mempool.space client + CoinGecko BTC price - commands with no data source on Bitcoin surface a clear "not supported" error instead of falling through to EVM-only paths
- token info/price/liquidity accept SPL mints (base58) via AddressRef shape
detection; Jupiter supplies identity, CoinGecko coins/solana/contract
supplies price/market cap, DexScreener supplies pool data and liquidity
- BVM addresses surface a clear "not supported" error
- new src/api/jupiter.rs client for /tokens/v1/token/{mint}
- token_metadata gains enrich_svm / fetch_price_svm / fetch_liquidity_svm
- token contract/risk/create/mint/fee remain EVM-only by design
- token risk on SPL mints uses GoPlus Solana token_security; risk level derives from authority signals (mintable / freezable / closable), transfer fee, transfer hook, and non_transferable - risk token routes SPL mints through the same GoPlus Solana path and surfaces authority-based signals as RiskSignal entries - risk wallet on Solana returns a metadata-only report (no behavioral signals indexed by public providers); on Bitcoin returns not supported - risk approval rejects any SVM/BVM owner or spender with a message naming which side triggered the rejection (ERC-20 approval is EVM-only)
- token contract / token add now reject SVM / BVM addresses with command- specific messages instead of bubbling "Token not found" / "Invalid address" from the EVM resolver - SKILL.md gains a top-level support matrix covering every command's behaviour on EVM, SVM, and BVM so consumers can see at a glance which read paths are wired and which remain EVM-only by design
- swap quote rejects --from / --to shaped as SPL mints or BTC addresses with a routing-specific message, instead of bubbling the resolver's "Token not found" - swap status disambiguates EVM and Bitcoin hashes by the 0x prefix: a bare 64-char hex is treated as a BTC txid (not tracked by DODO swap history) and base58 strings ≥32 chars as Solana signatures - swap simulate inherits the same protection via the saved quote (a SVM/ BVM input cannot reach simulate without first passing quote)
Wire GoPlus's chain-agnostic malicious-address library into `risk wallet`. SVM goes from a metadata-only placeholder to a real reputation lookup; EVM augments the native-balance heuristic, taking the more severe of balance and reputation as the overall level so a funded-but-flagged wallet isn't LOW. - token_metadata: add AddressSecurity + fetch_address_security (flat result schema, "1"/"0" flags; None chain_id for non-EVM / Solana). - risk: address_reputation_signals (chain-neutral, pure, unit-tested); sanctions/stealing/honeypot=Critical, financial-crime=High, soft=Medium. - verified live against GoPlus on EVM (chain_id=1) and Solana. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Replace absolute "no data source" wording with accurate scoping: - risk wallet: now GoPlus address reputation on EVM+SVM; note GoPlus coverage is best-effort (clean = "not flagged", not "proven safe"). - wallet labels (BVM): mark "not integrated" with a footnote — Breadcrumbs/ MetaSleuth/Arkham cover BTC labels but need a new paid/keyed client, and BTC isn't a DODO trading target, so it's deferred not impossible. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Follow-up hardening for the GoPlus address-reputation risk wallet path: - token_metadata: extract pure parse_address_security() and guard against schema drift — a keyed map or renamed result no longer reads as a false "clean"; it returns None (no record). Add 4 unit tests (flat, all-zero, code!=1, keyed-map). - risk (EVM): emit the native-balance heuristic as an explicit low_native_balance signal instead of folding it opaquely into overall; overall is now uniformly the most-severe signal. - surface reputation coverage as best-effort in metadata (EVM + SVM) so a LOW result reads as "not flagged", not "proven safe". Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
`swap quote` now routes SPL-mint pairs to the Jupiter aggregator instead of
rejecting them; DODO stays EVM-only. Read-only pricing only — no DODO
liquidity, no signing, and the quote is NOT persisted, so simulate/execute/
status remain EVM-only. Bitcoin and mixed EVM/SVM pairs are rejected.
- jupiter: add quote() + pure parse_quote() (typed route/impact/amounts).
- jupiter: migrate token() from the retired /tokens/v1/token/{mint} route
to Token API v2 /tokens/v2/search — this also fixes SVM token info/price/
risk, which had silently regressed to 404 ("Route not found").
- swap: classify_quote_route() picks EVM vs Jupiter vs reject by address
shape; build_svm_quote() maps Jupiter output into the shared Quote model
(chain_id=0 sentinel, empty EVM-only fields).
- verified live against Jupiter lite-api (quote + v2 token) and reject paths.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Split the swap coverage matrix into quote vs execution rows, note that `swap quote` works on SVM via Jupiter (read-only, SPL mints, quote-only / not persisted), and update the swap quote section with the SVM routing and rejection rules. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Router, native Value, Est. Gas, and Gas Limit are EVM settlement concepts. For a non-EVM quote (chain_id == 0 sentinel, e.g. a read-only Solana quote via Jupiter) they were always empty/zero and the Value row rendered with a wrong-chain "ETH (wei)" label. Skip those four rows when chain_id == 0; EVM quotes are unchanged. Verified: SVM quote omits them, EVM quote still shows them. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Bring README.md and README_CN.md in line with the branch's Solana/Bitcoin work: add a non-EVM support matrix, note Jupiter-backed Solana swap quotes, and mention the GoPlus address-reputation signal in wallet risk. Execution, approvals, and token create/mint stay EVM-only. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
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.
Summary
Adds read-only support for non-EVM chains — Solana (SVM) and Bitcoin mainnet (BVM) — across the
chain,protocol,token,wallet, andriskcommand trees, plus Solana swap quotes via the Jupiter aggregator. Swap execution, ERC-20 approvals, and token create/mint/renounce stay EVM-only by design.Also cuts a release candidate:
1.0.0→1.1.0-rc.1.What's included
solana/svmandbitcoin/bvmchain aliases;--chain-iddoes not apply to these lookups.chain/protocolanalytics via DefiLlamawallet balance/overview/history(Debank → Zerion for SVM; mempool.space for BVM),pnl/defion SVMtoken info/price/liquidityon SVM (Jupiter + CoinGecko + DexScreener)token risk/risk tokenon SVM (GoPlus Solana, authority-based signals)--fromand--toare SPL mints; the returned quote cannot be simulated or executed.risk walletcombines a native-balance heuristic with GoPlus malicious-address reputation (sanctions, phishing, drainer, mixer, …) on both EVM and SVM.1.1.0-rc.1.Notes
🤖 Generated with Claude Code