feat: token-risk-check plugin (Track D, T0) - #142
Open
BigGbotex wants to merge 1 commit into
Open
Conversation
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.
What this is
A ZeroClaw WIT tool plugin: given a Solana mint address, returns a 🔴/🟡/🟢 risk verdict with plain-English reasons — mint/freeze authority status, dangerous Token-2022 extensions (permanent delegate, transfer hook, non-transferable, frozen-by-default, transfer fee), holder concentration, and liquidity, instead of a raw RPC dump.
Track D (Onchain intelligence & safety) — the brief specifically calls this one out: "This plugin makes every other plugin safer; we'd like it to exist most of all."
Custody tier: T0 (Read)
No transaction is ever built, signed, or submitted. The only outbound calls are read-only JSON-RPC (
getAccountInfo,getTokenLargestAccounts) and a best-effort GET to Jupiter's public quote API to check for a liquidity route. The only "secret" this plugin can read is an optional operator-supplied RPC URL.Layout
src/risk.rs— pure core, no wasm/http deps, host-testable with plaincargo testsrc/lib.rs— thin#[cfg(target_family = "wasm")]shim overwasi:httpviawakitests/risk.rs— 17 host-run tests against mocked RPC JSON fixtures, including a prompt-injection testFull threat model, the prompt-injection transcript, config keys, and build instructions are in
README.md.Verified