Repository navigation
tools: BaseTokenGate — read-only pre-trade safety check for arbitrary Base tokens - #214
rezearcher wants to merge 3 commits into
Conversation
…ary Base tokens Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Thanks for the PR and for disclosing that you run the endpoint. We're closing this one rather than merging it. The main issue: the tool signs whatever amount and recipient the endpoint's 402 response asks for, while If you'd like to offer the token gate to Franklin users, the way in is to list it as a partner API on the BlockRun gateway, so it is paid and capped like every other tool. We're happy to talk about that. (Separately: the PhoneLookup and RealFace comments in |
Follow-up to #213. Instead of just suggesting a gate, here's a small, self-contained, read-only tool so you can judge it on the code.
What:
BaseTokenGate— beforeBase0xQuoteinto a token that isn't in the built-in symbol list, the agent calls this to get a one-word GO / HOLD / BLOCK + reason (honeypot/sellability simulation, admin-control checks, Uniswap v3 liquidity vs. trade size). Backed by Grey Ridge's x402 endpointGET https://api.greyridgesignals.ai/gate/swap.Design (matches existing conventions):
exa.ts(createPaymentPayloadfrom@blockrun/llm), $0.008 USDC/call from the Base wallet, recorded viarecordUsage.walletMayPay(gatewayHeaders()), so key-mode users never get a wallet signature (the repo'sapi-key.local.mjsfence passes).frameUntrusted(third-party data, not instructions).FRANKLIN_TOKEN_GATE_URL.tsc --noEmitclean;npm test918/918 pass locally. 2 files, ~140 lines.Try it without paying:
curl 'https://api.greyridgesignals.ai/gate/swap/preview?token=aero'(free samples for usdc|weth|cbbtc|aero|degen); the paid route works for any Base ERC-20.Happy to rename, drop the payment path and ship it as free-preview-only, or change anything else you'd like. Disclosure: I run the endpoint.
🤖 Generated with Claude Code