chain-insights 0.76.0 → 0.78.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +5 -5
- package/dist/cli.mjs +5 -5
- package/dist/{dex-registry-CZQB2YhU.cjs → dex-registry-DdXOg5On.cjs} +4 -0
- package/dist/{dex-registry-D6Xxi_vr.mjs → dex-registry-sPTFuCrP.mjs} +5 -1
- package/dist/dex-registry-sPTFuCrP.mjs.map +1 -0
- package/dist/{dex-tool-DsM-pSku.cjs → dex-tool-CDmhhXfk.cjs} +3 -3
- package/dist/{dex-tool-BoAYqhZO.mjs → dex-tool-D61sIjpq.mjs} +4 -4
- package/dist/{dex-tool-BoAYqhZO.mjs.map → dex-tool-D61sIjpq.mjs.map} +1 -1
- package/dist/mcp-proxy.cjs +169 -5
- package/dist/mcp-proxy.d.cts.map +1 -1
- package/dist/mcp-proxy.d.mts.map +1 -1
- package/dist/mcp-proxy.mjs +169 -5
- package/dist/mcp-proxy.mjs.map +1 -1
- package/dist/{token-lookup-BJ00JO9A.cjs → token-lookup-DvgEyqcC.cjs} +1 -1
- package/dist/{token-lookup-XnyisLQW.mjs → token-lookup-sH2DesLS.mjs} +2 -2
- package/dist/{token-lookup-XnyisLQW.mjs.map → token-lookup-sH2DesLS.mjs.map} +1 -1
- package/docs/graph-query-compatibility.md +19 -0
- package/docs/graph-tools.md +51 -0
- package/package.json +2 -2
- package/registry/README.md +12 -6
- package/registry/robinhood.json +187 -2
- package/registry/robinhood.md +86 -2
- package/skills/chain-insights-cypher/SKILL.md +64 -3
- package/skills/chain-insights-dex/SKILL.md +7 -1
- package/skills/chain-insights-virtuals/SKILL.md +3 -1
- package/dist/dex-registry-D6Xxi_vr.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-BW-eSwOZ.cjs");
|
|
2
2
|
const require_answer_hint = require("./answer-hint-BlYEBq_Y.cjs");
|
|
3
|
-
const require_dex_registry = require("./dex-registry-
|
|
3
|
+
const require_dex_registry = require("./dex-registry-DdXOg5On.cjs");
|
|
4
4
|
const require_print_result = require("./print-result-BYppJlUi.cjs");
|
|
5
5
|
// src/mcp/token-lookup.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BJohB4LM.mjs";
|
|
2
2
|
import { t as ANSWER_HINT } from "./answer-hint-vOE1O6Lf.mjs";
|
|
3
|
-
import { a as normalizeDexNetwork, t as DexRegistryError } from "./dex-registry-
|
|
3
|
+
import { a as normalizeDexNetwork, t as DexRegistryError } from "./dex-registry-sPTFuCrP.mjs";
|
|
4
4
|
import { i as isEpochMs, o as utcText } from "./print-result-IFARsMnL.mjs";
|
|
5
5
|
// src/mcp/token-lookup.ts
|
|
6
6
|
/**
|
|
@@ -300,4 +300,4 @@ async function handleMetaTokenLookup(args, deps) {
|
|
|
300
300
|
}
|
|
301
301
|
export { SYMBOL_MAX as a, META_TOKEN_LOOKUP_TOOL as i, META_TOKEN_LOOKUP_DESCRIPTION as n, handleMetaTokenLookup as o, META_TOKEN_LOOKUP_TITLE as r, token_lookup_exports as s, META_TOKEN_LOOKUP_ANNOTATIONS as t };
|
|
302
302
|
|
|
303
|
-
//# sourceMappingURL=token-lookup-
|
|
303
|
+
//# sourceMappingURL=token-lookup-sH2DesLS.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-lookup-XnyisLQW.mjs","names":[],"sources":["../src/mcp/token-lookup.ts"],"sourcesContent":["/**\n * meta_token_lookup: a ticker or a token name becomes its contracts.\n *\n * A local tool of the proxy. It sends one anchored facts read of the Asset\n * lookup by symbol, the same read by name when the symbol answers nothing, and\n * then the creator and the factory of each candidate from topology, one batch\n * member per candidate. Nothing is matched here: the graph server matches the\n * symbol or the name, case-insensitively and exactly, and orders the rows\n * verified first, then oldest first. The proxy keeps that order.\n *\n * Tickers collide on purpose: clones reuse a symbol to borrow its trust. The\n * tool never picks one. The description below is the contract with every\n * host, Claude Desktop chat included, which reads no skill.\n */\n\nimport { ANSWER_HINT } from './answer-hint.js'\nimport { DexRegistryError, normalizeDexNetwork } from './dex-registry.js'\nimport { isEpochMs, utcText } from './timestamp-text.js'\n\nexport const META_TOKEN_LOOKUP_TOOL = 'meta_token_lookup'\nexport const META_TOKEN_LOOKUP_SCHEMA = 'chain-insights.meta-token-lookup.v1' as const\nexport const META_TOKEN_LOOKUP_TITLE = 'Token by ticker or name'\nexport const META_TOKEN_LOOKUP_DESCRIPTION =\n 'Call this first when a question names a token by its ticker or name and gives no contract ' +\n '(TCITY, USDG, SPCX). It returns every contract on the network that carries that symbol, ' +\n 'verified first, then oldest first. Tickers collide: never treat the first row as the token. ' +\n 'When several match, name them and ask, or pick by the evidence the user gave. Zero candidates ' +\n 'means no contract carries the symbol: say so, and do not search the web.'\nexport const META_TOKEN_LOOKUP_ANNOTATIONS = {\n readOnlyHint: true,\n idempotentHint: true,\n openWorldHint: false,\n} as const\nexport const META_TOKEN_LOOKUP_ARGS = ['network', 'symbol'] as const\n\n/** The candidates returned. The read asks for one more, so a full page says there are more. */\nexport const CANDIDATES_MAX = 25\nexport const ROWS_READ = CANDIDATES_MAX + 1\n/** The graph server admits at most 20 members in one graph_query_batch. */\nexport const CREATOR_BATCH_MAX = 20\nexport const SYMBOL_MAX = 64\n\nexport const ADDRESS_INPUT_HINT = 'an address is already an anchor: read it on USE topology'\n\nexport interface TokenCandidate {\n contract: string\n symbol: string | null\n name: string | null\n token_standard: string | null\n decimals: number | null\n verified: boolean\n verification_source: string | null\n first_seen_timestamp: number | null\n first_seen_timestamp_utc: string | null\n creator: string | null\n factory: string | null\n}\n\nexport interface MetaTokenLookupResult {\n schema: typeof META_TOKEN_LOOKUP_SCHEMA\n network: string\n query: string\n matched_on: 'symbol' | 'name' | null\n candidates: TokenCandidate[]\n /** The rows the server sent, at most 26: 26 means there are more than the 25 returned. */\n total: number\n truncated: boolean\n hint: string\n}\n\n/** One graph_query or graph_query_batch reply as the remote client returns it. */\nexport type GraphAnswer = {\n content?: unknown[]\n structuredContent?: unknown\n isError?: boolean\n}\n\nexport interface TokenToolDependencies {\n /** One graph_query through the proxy's remote client, billed as any read. */\n graphQuery: (args: { network: string; query: string }) => Promise<GraphAnswer>\n /** One graph_query_batch through the proxy's remote client, billed as any read. */\n graphQueryBatch: (args: {\n network: string\n queries: Array<{ id: string; query: string }>\n }) => Promise<GraphAnswer>\n /** The reason no read can be sent now, or undefined when the graph is reachable. */\n unavailable?: () => Promise<string | undefined> | string | undefined\n /** The text of a call that threw: payment required, transport. */\n describeFailure: (err: unknown) => string\n}\n\nexport type MetaTokenLookupToolResult = {\n content: Array<{ type: 'text'; text: string }>\n structuredContent?: Record<string, unknown>\n isError: boolean\n}\n\nconst ADDRESS_FORM = /^0x[0-9a-fA-F]{40}$/\nconst CONTRACT_FORM = /^0x[0-9a-f]{40}$/\n// A string literal of the read holds no double quote, no backslash and no\n// control character: the symbol is refused rather than escaped, so the read the\n// server receives is always the read written here.\nfunction unsafeLiteral(text: string): boolean {\n for (const char of text) {\n const code = char.codePointAt(0)!\n if (char === '\"' || char === '\\\\' || code < 0x20 || code === 0x7f) return true\n }\n return false\n}\nconst CODE_PREFIX = /^([a-z][a-z0-9_]*):\\s*/\n// Codes of a read that was stopped, not refused: the same read may answer later.\nconst TRANSIENT_CODE =\n /(timeout|memory_limit|cpu_limit|busy|_failed$|rate_limited|unavailable|too_large|node_error)/\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return !!value && typeof value === 'object' && !Array.isArray(value)\n}\n\nfunction errorResult(text: string): MetaTokenLookupToolResult {\n return { content: [{ type: 'text', text }], isError: true }\n}\n\nfunction textResult(structured: MetaTokenLookupResult): MetaTokenLookupToolResult {\n return {\n content: [{ type: 'text', text: JSON.stringify(structured, null, 2) }],\n structuredContent: structured as unknown as Record<string, unknown>,\n isError: false,\n }\n}\n\n/** The facts Asset read by symbol or by name, in the one shape the graph server admits. */\nexport function assetQuery(key: 'symbol' | 'name', value: string): string {\n return (\n `USE facts MATCH (t:Asset {${key}: \"${value}\"}) ` +\n 'RETURN t.asset_contract AS contract, t.asset_symbol AS symbol, t.name AS name, ' +\n 't.token_standard AS token_standard, t.decimals AS decimals, t.verified AS verified, ' +\n 't.verification_source AS verification_source, t.first_seen_timestamp AS first_seen_timestamp ' +\n `LIMIT ${ROWS_READ}`\n )\n}\n\n/** The topology read of who deployed one contract: the deploying address and the transaction's sender. */\nexport function creatorQuery(contract: string): string {\n return (\n `USE topology MATCH (f:Address)-[d:DEPLOYED_CONTRACT]->(t:Address {address: \"${contract}\"}) ` +\n 'RETURN f.address AS factory, d.tx_origin AS creator LIMIT 1'\n )\n}\n\nconst textOrNull = (value: unknown): string | null =>\n typeof value === 'string' && value.trim() !== '' ? value : null\n\nconst numberOrNull = (value: unknown): number | null => {\n if (typeof value === 'number' && Number.isFinite(value)) return value\n if (typeof value === 'string' && value.trim() !== '' && Number.isFinite(Number(value)))\n return Number(value)\n return null\n}\n\nconst addressOrNull = (value: unknown): string | null =>\n typeof value === 'string' && ADDRESS_FORM.test(value.trim()) ? value.trim().toLowerCase() : null\n\nfunction verifiedOf(value: unknown): boolean {\n if (typeof value === 'boolean') return value\n if (typeof value === 'number') return value === 1\n if (typeof value === 'string') return ['true', '1'].includes(value.trim().toLowerCase())\n return false\n}\n\nfunction answerText(answer: GraphAnswer): string {\n return (Array.isArray(answer.content) ? answer.content : [])\n .map((block) => (isRecord(block) && typeof block.text === 'string' ? block.text : ''))\n .filter(Boolean)\n .join('\\n')\n .trim()\n}\n\ntype Refusal = { code: string; text: string; transient: boolean }\n\n/** A graph_query answer that did not answer: its code, its text, and whether the same read may answer later. */\nfunction refusalOf(answer: GraphAnswer): Refusal {\n const text = answerText(answer)\n const detail = isRecord(answer.structuredContent)\n ? answer.structuredContent.error_detail\n : undefined\n const detailCode = isRecord(detail) && typeof detail.code === 'string' ? detail.code : ''\n const detailClass = isRecord(detail) && typeof detail.class === 'string' ? detail.class : ''\n const named = detailCode || CODE_PREFIX.exec(text)?.[1] || ''\n // A refusal that names no class is a stop only when its code says so; a\n // refusal in plain words (\"unknown label Asset\") is a server that lacks the read.\n const transient = detailClass ? detailClass !== 'refused' : TRANSIENT_CODE.test(named)\n const code = named || 'not_served'\n return { code, text: text || `${code}: the graph endpoint refused the read`, transient }\n}\n\n/** The result rows of a graph_query answer, or null when it holds none. */\nfunction rowsOf(answer: GraphAnswer): Array<Record<string, unknown>> | null {\n const facts = isRecord(answer.structuredContent) ? answer.structuredContent.facts : undefined\n const query = isRecord(facts) ? facts.query : undefined\n const results = isRecord(query) ? query.results : undefined\n return Array.isArray(results) ? results.filter(isRecord) : null\n}\n\ntype Member = { id?: unknown; ok?: unknown; results?: unknown; error?: unknown }\n\nfunction membersOf(answer: GraphAnswer): Map<string, Member> {\n const facts = isRecord(answer.structuredContent) ? answer.structuredContent.facts : undefined\n const queries = isRecord(facts) ? facts.queries : undefined\n const members = new Map<string, Member>()\n if (Array.isArray(queries)) {\n for (const member of queries)\n if (isRecord(member) && typeof member.id === 'string') members.set(member.id, member)\n }\n return members\n}\n\nfunction candidateOf(row: Record<string, unknown>): TokenCandidate | null {\n const contract = textOrNull(row.contract)?.trim().toLowerCase()\n if (!contract) return null\n const firstSeen = numberOrNull(row.first_seen_timestamp)\n return {\n contract,\n symbol: textOrNull(row.symbol),\n name: textOrNull(row.name),\n token_standard: textOrNull(row.token_standard),\n decimals: numberOrNull(row.decimals),\n verified: verifiedOf(row.verified),\n verification_source: textOrNull(row.verification_source),\n first_seen_timestamp: firstSeen,\n first_seen_timestamp_utc: isEpochMs(firstSeen) ? utcText(firstSeen) : null,\n creator: null,\n factory: null,\n }\n}\n\ntype Read =\n | { kind: 'rows'; rows: Array<Record<string, unknown>> }\n | { kind: 'not_served'; refusal: Refusal }\n | { kind: 'failed'; text: string }\n\nasync function readAssets(\n deps: TokenToolDependencies,\n network: string,\n key: 'symbol' | 'name',\n value: string\n): Promise<Read> {\n let answer: GraphAnswer\n try {\n answer = await deps.graphQuery({ network, query: assetQuery(key, value) })\n } catch (err) {\n return { kind: 'failed', text: deps.describeFailure(err) }\n }\n const rows = rowsOf(answer)\n if (answer.isError !== true && rows !== null) return { kind: 'rows', rows }\n const refusal = refusalOf(answer)\n if (answer.isError === true && refusal.transient) return { kind: 'failed', text: refusal.text }\n return { kind: 'not_served', refusal }\n}\n\n/**\n * The creator and the factory of each candidate, written in place. Returns why\n * some creators were not read, or null when every read answered. A read that\n * answered with no row leaves the candidate's creator empty with no note: the\n * graph holds no deployment for it.\n */\nasync function readCreators(\n deps: TokenToolDependencies,\n network: string,\n candidates: TokenCandidate[]\n): Promise<string | null> {\n const contracts = [\n ...new Set(candidates.map((c) => c.contract).filter((c) => CONTRACT_FORM.test(c))),\n ]\n const found = new Map<string, { creator: string | null; factory: string | null }>()\n const reasons: string[] = []\n let unread = candidates.length - candidates.filter((c) => CONTRACT_FORM.test(c.contract)).length\n for (let at = 0; at < contracts.length; at += CREATOR_BATCH_MAX) {\n const chunk = contracts.slice(at, at + CREATOR_BATCH_MAX)\n const queries = chunk.map((contract) => ({\n id: `creator:${contract}`,\n query: creatorQuery(contract),\n }))\n let members = new Map<string, Member>()\n try {\n const answer = await deps.graphQueryBatch({ network, queries })\n members = membersOf(answer)\n if (members.size === 0) {\n reasons.push(\n answer.isError === true ? refusalOf(answer).text : 'the batch answer held no reads'\n )\n }\n } catch (err) {\n reasons.push(deps.describeFailure(err))\n }\n for (const contract of chunk) {\n const member = members.get(`creator:${contract}`)\n if (member?.ok === true && Array.isArray(member.results)) {\n const row = member.results.find(isRecord)\n found.set(contract, {\n creator: row ? addressOrNull(row.creator) : null,\n factory: row ? addressOrNull(row.factory) : null,\n })\n continue\n }\n unread += 1\n if (member && typeof member.error === 'string' && !reasons.includes(member.error))\n reasons.push(member.error)\n }\n }\n for (const candidate of candidates) {\n const read = found.get(candidate.contract)\n if (read) Object.assign(candidate, read)\n }\n if (unread === 0) return null\n return `${unread} of ${candidates.length}${reasons.length > 0 ? `: ${reasons.join('; ')}` : ''}`\n}\n\nconst NO_WEB =\n 'Do not search the web and do not guess a contract: a web page is not a contract on this network.'\n\nfunction hintFor(\n result: Omit<MetaTokenLookupResult, 'hint'>,\n creatorsNotRead: string | null\n): string {\n const { network, query, candidates, matched_on, truncated } = result\n const parts: string[] = [ANSWER_HINT]\n if (candidates.length === 0) {\n parts.push(\n `No contract on ${network} carries the symbol or the name \"${query}\". Say so in one line. ${NO_WEB} ` +\n 'Ask the user for the contract if they have one.'\n )\n return parts.join(' ')\n }\n if (matched_on === 'name') {\n parts.push(`No contract carries \"${query}\" as its symbol; these carry it as their name.`)\n }\n if (candidates.length === 1) {\n parts.push(\n `One contract on ${network} carries \"${query}\": ${candidates[0]!.contract}. ` +\n 'Say it is the only one on this network, then read it by this full contract on USE topology.'\n )\n } else {\n parts.push(\n `${candidates.length} contracts on ${network} carry \"${query}\"` +\n `${truncated ? `, and more exist than the ${CANDIDATES_MAX} listed` : ''}. ` +\n 'Tickers collide: never treat the first row as the token. Name them, each contract in full, ' +\n 'with its creator and first seen time, and ask which one the user means, or pick one by the evidence the user gave ' +\n '(a creator, a launch date, a price move) and say why.'\n )\n }\n if (creatorsNotRead) {\n parts.push(\n `The creators were not read for ${creatorsNotRead}. creator and factory are empty there because the read failed, ` +\n 'not because the chain holds none.'\n )\n }\n parts.push('Write every contract and creator in full, 0x plus 40 hex characters.')\n return parts.join(' ')\n}\n\n/** meta_token_lookup, {network, symbol}. Every argument is checked before a read is sent. */\nexport async function handleMetaTokenLookup(\n args: unknown,\n deps: TokenToolDependencies\n): Promise<MetaTokenLookupToolResult> {\n const record = isRecord(args) ? args : {}\n let network: string\n try {\n network = normalizeDexNetwork(record.network)\n } catch (err) {\n return errorResult(\n err instanceof DexRegistryError ? err.message : `invalid_network: ${(err as Error).message}`\n )\n }\n if (typeof record.symbol !== 'string' || record.symbol.trim() === '') {\n return errorResult(\n 'invalid_symbol: symbol is required: the ticker or the name as the user wrote it, for example TCITY'\n )\n }\n const symbol = record.symbol.trim()\n if (symbol.length > SYMBOL_MAX) {\n return errorResult(`invalid_symbol: symbol holds at most ${SYMBOL_MAX} characters`)\n }\n const base = {\n schema: META_TOKEN_LOOKUP_SCHEMA,\n network,\n query: symbol,\n }\n\n if (ADDRESS_FORM.test(symbol)) {\n const address = symbol.toLowerCase()\n return textResult({\n ...base,\n matched_on: null,\n candidates: [],\n total: 0,\n truncated: false,\n hint: `${ANSWER_HINT} ${address} is a contract address, not a ticker: ${ADDRESS_INPUT_HINT}. Send no token lookup for it.`,\n })\n }\n if (unsafeLiteral(symbol)) {\n return errorResult(\n 'invalid_symbol: a symbol holds no double quote, backslash or control character. Send the ticker or the name as plain text.'\n )\n }\n\n const unavailable = await deps.unavailable?.()\n if (unavailable) {\n return errorResult(\n `No token read was sent: ${unavailable} The lookup has no answer yet, which is not \"no contract\": try again later, or ask the user for the contract. ${NO_WEB}`\n )\n }\n\n let matchedOn: 'symbol' | 'name' = 'symbol'\n let read = await readAssets(deps, network, 'symbol', symbol)\n if (read.kind === 'rows' && read.rows.length === 0) {\n matchedOn = 'name'\n read = await readAssets(deps, network, 'name', symbol)\n }\n if (read.kind === 'failed') {\n return errorResult(\n `The token read failed: ${read.text} This is not \"no contract\": send the same lookup again once, or ask the user for the contract. ${NO_WEB}`\n )\n }\n if (read.kind === 'not_served') {\n return textResult({\n ...base,\n matched_on: null,\n candidates: [],\n total: 0,\n truncated: false,\n hint:\n `${ANSWER_HINT} This Chain Insights server does not serve the token lookup yet (${read.refusal.code}). ` +\n `That is not \"no contract carries ${symbol}\": ask the user for the token's contract, 0x plus 40 hex characters. ${NO_WEB}`,\n })\n }\n\n const total = read.rows.length\n const candidates = read.rows\n .slice(0, CANDIDATES_MAX)\n .map(candidateOf)\n .filter((candidate): candidate is TokenCandidate => candidate !== null)\n const creatorsNotRead =\n candidates.length > 0 ? await readCreators(deps, network, candidates) : null\n const result = {\n ...base,\n matched_on: candidates.length > 0 ? matchedOn : null,\n candidates,\n total,\n truncated: total > CANDIDATES_MAX,\n }\n return textResult({ ...result, hint: hintFor(result, creatorsNotRead) })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,MAAa,yBAAyB;AACtC,MAAa,2BAA2B;AACxC,MAAa,0BAA0B;AACvC,MAAa,gCACX;AAKF,MAAa,gCAAgC;CAC3C,cAAc;CACd,gBAAgB;CAChB,eAAe;AACjB;;AAIA,MAAa,iBAAiB;AAC9B,MAAa,YAAY;;AAEzB,MAAa,oBAAoB;AACjC,MAAa,aAAa;AAE1B,MAAa,qBAAqB;AAuDlC,MAAM,eAAe;AACrB,MAAM,gBAAgB;AAItB,SAAS,cAAc,MAAuB;CAC5C,KAAK,MAAM,QAAQ,MAAM;EACvB,MAAM,OAAO,KAAK,YAAY,CAAC;EAC/B,IAAI,SAAS,QAAO,SAAS,QAAQ,OAAO,MAAQ,SAAS,KAAM,OAAO;CAC5E;CACA,OAAO;AACT;AACA,MAAM,cAAc;AAEpB,MAAM,iBACJ;AAEF,SAAS,SAAS,OAAkD;CAClE,OAAO,CAAC,CAAC,SAAS,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK;AACrE;AAEA,SAAS,YAAY,MAAyC;CAC5D,OAAO;EAAE,SAAS,CAAC;GAAE,MAAM;GAAQ;EAAK,CAAC;EAAG,SAAS;CAAK;AAC5D;AAEA,SAAS,WAAW,YAA8D;CAChF,OAAO;EACL,SAAS,CAAC;GAAE,MAAM;GAAQ,MAAM,KAAK,UAAU,YAAY,MAAM,CAAC;EAAE,CAAC;EACrE,mBAAmB;EACnB,SAAS;CACX;AACF;;AAGA,SAAgB,WAAW,KAAwB,OAAuB;CACxE,OACE,6BAA6B,IAAI,KAAK,MAAM,4QAInC;AAEb;;AAGA,SAAgB,aAAa,UAA0B;CACrD,OACE,+EAA+E,SAAS;AAG5F;AAEA,MAAM,cAAc,UAClB,OAAO,UAAU,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B,OAAO,YACL,0BAA0B,KAAK,KAAK,iGAAiG,QACvI;CAEF,IAAI,KAAK,SAAS,cAChB,OAAO,WAAW;EAChB,GAAG;EACH,YAAY;EACZ,YAAY,CAAC;EACb,OAAO;EACP,WAAW;EACX,MACE,GAAG,YAAY,mEAAmE,KAAK,QAAQ,KAAK,sCAChE,OAAO,uEAAuE;CACtH,CAAC;CAGH,MAAM,QAAQ,KAAK,KAAK;CACxB,MAAM,aAAa,KAAK,KACrB,MAAM,GAAG,cAAc,CAAC,CACxB,IAAI,WAAW,CAAC,CAChB,QAAQ,cAA2C,cAAc,IAAI;CACxE,MAAM,kBACJ,WAAW,SAAS,IAAI,MAAM,aAAa,MAAM,SAAS,UAAU,IAAI;CAC1E,MAAM,SAAS;EACb,GAAG;EACH,YAAY,WAAW,SAAS,IAAI,YAAY;EAChD;EACA;EACA,WAAW,QAAQ;CACrB;CACA,OAAO,WAAW;EAAE,GAAG;EAAQ,MAAM,QAAQ,QAAQ,eAAe;CAAE,CAAC;AACzE"}
|
|
1
|
+
{"version":3,"file":"token-lookup-sH2DesLS.mjs","names":[],"sources":["../src/mcp/token-lookup.ts"],"sourcesContent":["/**\n * meta_token_lookup: a ticker or a token name becomes its contracts.\n *\n * A local tool of the proxy. It sends one anchored facts read of the Asset\n * lookup by symbol, the same read by name when the symbol answers nothing, and\n * then the creator and the factory of each candidate from topology, one batch\n * member per candidate. Nothing is matched here: the graph server matches the\n * symbol or the name, case-insensitively and exactly, and orders the rows\n * verified first, then oldest first. The proxy keeps that order.\n *\n * Tickers collide on purpose: clones reuse a symbol to borrow its trust. The\n * tool never picks one. The description below is the contract with every\n * host, Claude Desktop chat included, which reads no skill.\n */\n\nimport { ANSWER_HINT } from './answer-hint.js'\nimport { DexRegistryError, normalizeDexNetwork } from './dex-registry.js'\nimport { isEpochMs, utcText } from './timestamp-text.js'\n\nexport const META_TOKEN_LOOKUP_TOOL = 'meta_token_lookup'\nexport const META_TOKEN_LOOKUP_SCHEMA = 'chain-insights.meta-token-lookup.v1' as const\nexport const META_TOKEN_LOOKUP_TITLE = 'Token by ticker or name'\nexport const META_TOKEN_LOOKUP_DESCRIPTION =\n 'Call this first when a question names a token by its ticker or name and gives no contract ' +\n '(TCITY, USDG, SPCX). It returns every contract on the network that carries that symbol, ' +\n 'verified first, then oldest first. Tickers collide: never treat the first row as the token. ' +\n 'When several match, name them and ask, or pick by the evidence the user gave. Zero candidates ' +\n 'means no contract carries the symbol: say so, and do not search the web.'\nexport const META_TOKEN_LOOKUP_ANNOTATIONS = {\n readOnlyHint: true,\n idempotentHint: true,\n openWorldHint: false,\n} as const\nexport const META_TOKEN_LOOKUP_ARGS = ['network', 'symbol'] as const\n\n/** The candidates returned. The read asks for one more, so a full page says there are more. */\nexport const CANDIDATES_MAX = 25\nexport const ROWS_READ = CANDIDATES_MAX + 1\n/** The graph server admits at most 20 members in one graph_query_batch. */\nexport const CREATOR_BATCH_MAX = 20\nexport const SYMBOL_MAX = 64\n\nexport const ADDRESS_INPUT_HINT = 'an address is already an anchor: read it on USE topology'\n\nexport interface TokenCandidate {\n contract: string\n symbol: string | null\n name: string | null\n token_standard: string | null\n decimals: number | null\n verified: boolean\n verification_source: string | null\n first_seen_timestamp: number | null\n first_seen_timestamp_utc: string | null\n creator: string | null\n factory: string | null\n}\n\nexport interface MetaTokenLookupResult {\n schema: typeof META_TOKEN_LOOKUP_SCHEMA\n network: string\n query: string\n matched_on: 'symbol' | 'name' | null\n candidates: TokenCandidate[]\n /** The rows the server sent, at most 26: 26 means there are more than the 25 returned. */\n total: number\n truncated: boolean\n hint: string\n}\n\n/** One graph_query or graph_query_batch reply as the remote client returns it. */\nexport type GraphAnswer = {\n content?: unknown[]\n structuredContent?: unknown\n isError?: boolean\n}\n\nexport interface TokenToolDependencies {\n /** One graph_query through the proxy's remote client, billed as any read. */\n graphQuery: (args: { network: string; query: string }) => Promise<GraphAnswer>\n /** One graph_query_batch through the proxy's remote client, billed as any read. */\n graphQueryBatch: (args: {\n network: string\n queries: Array<{ id: string; query: string }>\n }) => Promise<GraphAnswer>\n /** The reason no read can be sent now, or undefined when the graph is reachable. */\n unavailable?: () => Promise<string | undefined> | string | undefined\n /** The text of a call that threw: payment required, transport. */\n describeFailure: (err: unknown) => string\n}\n\nexport type MetaTokenLookupToolResult = {\n content: Array<{ type: 'text'; text: string }>\n structuredContent?: Record<string, unknown>\n isError: boolean\n}\n\nconst ADDRESS_FORM = /^0x[0-9a-fA-F]{40}$/\nconst CONTRACT_FORM = /^0x[0-9a-f]{40}$/\n// A string literal of the read holds no double quote, no backslash and no\n// control character: the symbol is refused rather than escaped, so the read the\n// server receives is always the read written here.\nfunction unsafeLiteral(text: string): boolean {\n for (const char of text) {\n const code = char.codePointAt(0)!\n if (char === '\"' || char === '\\\\' || code < 0x20 || code === 0x7f) return true\n }\n return false\n}\nconst CODE_PREFIX = /^([a-z][a-z0-9_]*):\\s*/\n// Codes of a read that was stopped, not refused: the same read may answer later.\nconst TRANSIENT_CODE =\n /(timeout|memory_limit|cpu_limit|busy|_failed$|rate_limited|unavailable|too_large|node_error)/\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return !!value && typeof value === 'object' && !Array.isArray(value)\n}\n\nfunction errorResult(text: string): MetaTokenLookupToolResult {\n return { content: [{ type: 'text', text }], isError: true }\n}\n\nfunction textResult(structured: MetaTokenLookupResult): MetaTokenLookupToolResult {\n return {\n content: [{ type: 'text', text: JSON.stringify(structured, null, 2) }],\n structuredContent: structured as unknown as Record<string, unknown>,\n isError: false,\n }\n}\n\n/** The facts Asset read by symbol or by name, in the one shape the graph server admits. */\nexport function assetQuery(key: 'symbol' | 'name', value: string): string {\n return (\n `USE facts MATCH (t:Asset {${key}: \"${value}\"}) ` +\n 'RETURN t.asset_contract AS contract, t.asset_symbol AS symbol, t.name AS name, ' +\n 't.token_standard AS token_standard, t.decimals AS decimals, t.verified AS verified, ' +\n 't.verification_source AS verification_source, t.first_seen_timestamp AS first_seen_timestamp ' +\n `LIMIT ${ROWS_READ}`\n )\n}\n\n/** The topology read of who deployed one contract: the deploying address and the transaction's sender. */\nexport function creatorQuery(contract: string): string {\n return (\n `USE topology MATCH (f:Address)-[d:DEPLOYED_CONTRACT]->(t:Address {address: \"${contract}\"}) ` +\n 'RETURN f.address AS factory, d.tx_origin AS creator LIMIT 1'\n )\n}\n\nconst textOrNull = (value: unknown): string | null =>\n typeof value === 'string' && value.trim() !== '' ? value : null\n\nconst numberOrNull = (value: unknown): number | null => {\n if (typeof value === 'number' && Number.isFinite(value)) return value\n if (typeof value === 'string' && value.trim() !== '' && Number.isFinite(Number(value)))\n return Number(value)\n return null\n}\n\nconst addressOrNull = (value: unknown): string | null =>\n typeof value === 'string' && ADDRESS_FORM.test(value.trim()) ? value.trim().toLowerCase() : null\n\nfunction verifiedOf(value: unknown): boolean {\n if (typeof value === 'boolean') return value\n if (typeof value === 'number') return value === 1\n if (typeof value === 'string') return ['true', '1'].includes(value.trim().toLowerCase())\n return false\n}\n\nfunction answerText(answer: GraphAnswer): string {\n return (Array.isArray(answer.content) ? answer.content : [])\n .map((block) => (isRecord(block) && typeof block.text === 'string' ? block.text : ''))\n .filter(Boolean)\n .join('\\n')\n .trim()\n}\n\ntype Refusal = { code: string; text: string; transient: boolean }\n\n/** A graph_query answer that did not answer: its code, its text, and whether the same read may answer later. */\nfunction refusalOf(answer: GraphAnswer): Refusal {\n const text = answerText(answer)\n const detail = isRecord(answer.structuredContent)\n ? answer.structuredContent.error_detail\n : undefined\n const detailCode = isRecord(detail) && typeof detail.code === 'string' ? detail.code : ''\n const detailClass = isRecord(detail) && typeof detail.class === 'string' ? detail.class : ''\n const named = detailCode || CODE_PREFIX.exec(text)?.[1] || ''\n // A refusal that names no class is a stop only when its code says so; a\n // refusal in plain words (\"unknown label Asset\") is a server that lacks the read.\n const transient = detailClass ? detailClass !== 'refused' : TRANSIENT_CODE.test(named)\n const code = named || 'not_served'\n return { code, text: text || `${code}: the graph endpoint refused the read`, transient }\n}\n\n/** The result rows of a graph_query answer, or null when it holds none. */\nfunction rowsOf(answer: GraphAnswer): Array<Record<string, unknown>> | null {\n const facts = isRecord(answer.structuredContent) ? answer.structuredContent.facts : undefined\n const query = isRecord(facts) ? facts.query : undefined\n const results = isRecord(query) ? query.results : undefined\n return Array.isArray(results) ? results.filter(isRecord) : null\n}\n\ntype Member = { id?: unknown; ok?: unknown; results?: unknown; error?: unknown }\n\nfunction membersOf(answer: GraphAnswer): Map<string, Member> {\n const facts = isRecord(answer.structuredContent) ? answer.structuredContent.facts : undefined\n const queries = isRecord(facts) ? facts.queries : undefined\n const members = new Map<string, Member>()\n if (Array.isArray(queries)) {\n for (const member of queries)\n if (isRecord(member) && typeof member.id === 'string') members.set(member.id, member)\n }\n return members\n}\n\nfunction candidateOf(row: Record<string, unknown>): TokenCandidate | null {\n const contract = textOrNull(row.contract)?.trim().toLowerCase()\n if (!contract) return null\n const firstSeen = numberOrNull(row.first_seen_timestamp)\n return {\n contract,\n symbol: textOrNull(row.symbol),\n name: textOrNull(row.name),\n token_standard: textOrNull(row.token_standard),\n decimals: numberOrNull(row.decimals),\n verified: verifiedOf(row.verified),\n verification_source: textOrNull(row.verification_source),\n first_seen_timestamp: firstSeen,\n first_seen_timestamp_utc: isEpochMs(firstSeen) ? utcText(firstSeen) : null,\n creator: null,\n factory: null,\n }\n}\n\ntype Read =\n | { kind: 'rows'; rows: Array<Record<string, unknown>> }\n | { kind: 'not_served'; refusal: Refusal }\n | { kind: 'failed'; text: string }\n\nasync function readAssets(\n deps: TokenToolDependencies,\n network: string,\n key: 'symbol' | 'name',\n value: string\n): Promise<Read> {\n let answer: GraphAnswer\n try {\n answer = await deps.graphQuery({ network, query: assetQuery(key, value) })\n } catch (err) {\n return { kind: 'failed', text: deps.describeFailure(err) }\n }\n const rows = rowsOf(answer)\n if (answer.isError !== true && rows !== null) return { kind: 'rows', rows }\n const refusal = refusalOf(answer)\n if (answer.isError === true && refusal.transient) return { kind: 'failed', text: refusal.text }\n return { kind: 'not_served', refusal }\n}\n\n/**\n * The creator and the factory of each candidate, written in place. Returns why\n * some creators were not read, or null when every read answered. A read that\n * answered with no row leaves the candidate's creator empty with no note: the\n * graph holds no deployment for it.\n */\nasync function readCreators(\n deps: TokenToolDependencies,\n network: string,\n candidates: TokenCandidate[]\n): Promise<string | null> {\n const contracts = [\n ...new Set(candidates.map((c) => c.contract).filter((c) => CONTRACT_FORM.test(c))),\n ]\n const found = new Map<string, { creator: string | null; factory: string | null }>()\n const reasons: string[] = []\n let unread = candidates.length - candidates.filter((c) => CONTRACT_FORM.test(c.contract)).length\n for (let at = 0; at < contracts.length; at += CREATOR_BATCH_MAX) {\n const chunk = contracts.slice(at, at + CREATOR_BATCH_MAX)\n const queries = chunk.map((contract) => ({\n id: `creator:${contract}`,\n query: creatorQuery(contract),\n }))\n let members = new Map<string, Member>()\n try {\n const answer = await deps.graphQueryBatch({ network, queries })\n members = membersOf(answer)\n if (members.size === 0) {\n reasons.push(\n answer.isError === true ? refusalOf(answer).text : 'the batch answer held no reads'\n )\n }\n } catch (err) {\n reasons.push(deps.describeFailure(err))\n }\n for (const contract of chunk) {\n const member = members.get(`creator:${contract}`)\n if (member?.ok === true && Array.isArray(member.results)) {\n const row = member.results.find(isRecord)\n found.set(contract, {\n creator: row ? addressOrNull(row.creator) : null,\n factory: row ? addressOrNull(row.factory) : null,\n })\n continue\n }\n unread += 1\n if (member && typeof member.error === 'string' && !reasons.includes(member.error))\n reasons.push(member.error)\n }\n }\n for (const candidate of candidates) {\n const read = found.get(candidate.contract)\n if (read) Object.assign(candidate, read)\n }\n if (unread === 0) return null\n return `${unread} of ${candidates.length}${reasons.length > 0 ? `: ${reasons.join('; ')}` : ''}`\n}\n\nconst NO_WEB =\n 'Do not search the web and do not guess a contract: a web page is not a contract on this network.'\n\nfunction hintFor(\n result: Omit<MetaTokenLookupResult, 'hint'>,\n creatorsNotRead: string | null\n): string {\n const { network, query, candidates, matched_on, truncated } = result\n const parts: string[] = [ANSWER_HINT]\n if (candidates.length === 0) {\n parts.push(\n `No contract on ${network} carries the symbol or the name \"${query}\". Say so in one line. ${NO_WEB} ` +\n 'Ask the user for the contract if they have one.'\n )\n return parts.join(' ')\n }\n if (matched_on === 'name') {\n parts.push(`No contract carries \"${query}\" as its symbol; these carry it as their name.`)\n }\n if (candidates.length === 1) {\n parts.push(\n `One contract on ${network} carries \"${query}\": ${candidates[0]!.contract}. ` +\n 'Say it is the only one on this network, then read it by this full contract on USE topology.'\n )\n } else {\n parts.push(\n `${candidates.length} contracts on ${network} carry \"${query}\"` +\n `${truncated ? `, and more exist than the ${CANDIDATES_MAX} listed` : ''}. ` +\n 'Tickers collide: never treat the first row as the token. Name them, each contract in full, ' +\n 'with its creator and first seen time, and ask which one the user means, or pick one by the evidence the user gave ' +\n '(a creator, a launch date, a price move) and say why.'\n )\n }\n if (creatorsNotRead) {\n parts.push(\n `The creators were not read for ${creatorsNotRead}. creator and factory are empty there because the read failed, ` +\n 'not because the chain holds none.'\n )\n }\n parts.push('Write every contract and creator in full, 0x plus 40 hex characters.')\n return parts.join(' ')\n}\n\n/** meta_token_lookup, {network, symbol}. Every argument is checked before a read is sent. */\nexport async function handleMetaTokenLookup(\n args: unknown,\n deps: TokenToolDependencies\n): Promise<MetaTokenLookupToolResult> {\n const record = isRecord(args) ? args : {}\n let network: string\n try {\n network = normalizeDexNetwork(record.network)\n } catch (err) {\n return errorResult(\n err instanceof DexRegistryError ? err.message : `invalid_network: ${(err as Error).message}`\n )\n }\n if (typeof record.symbol !== 'string' || record.symbol.trim() === '') {\n return errorResult(\n 'invalid_symbol: symbol is required: the ticker or the name as the user wrote it, for example TCITY'\n )\n }\n const symbol = record.symbol.trim()\n if (symbol.length > SYMBOL_MAX) {\n return errorResult(`invalid_symbol: symbol holds at most ${SYMBOL_MAX} characters`)\n }\n const base = {\n schema: META_TOKEN_LOOKUP_SCHEMA,\n network,\n query: symbol,\n }\n\n if (ADDRESS_FORM.test(symbol)) {\n const address = symbol.toLowerCase()\n return textResult({\n ...base,\n matched_on: null,\n candidates: [],\n total: 0,\n truncated: false,\n hint: `${ANSWER_HINT} ${address} is a contract address, not a ticker: ${ADDRESS_INPUT_HINT}. Send no token lookup for it.`,\n })\n }\n if (unsafeLiteral(symbol)) {\n return errorResult(\n 'invalid_symbol: a symbol holds no double quote, backslash or control character. Send the ticker or the name as plain text.'\n )\n }\n\n const unavailable = await deps.unavailable?.()\n if (unavailable) {\n return errorResult(\n `No token read was sent: ${unavailable} The lookup has no answer yet, which is not \"no contract\": try again later, or ask the user for the contract. ${NO_WEB}`\n )\n }\n\n let matchedOn: 'symbol' | 'name' = 'symbol'\n let read = await readAssets(deps, network, 'symbol', symbol)\n if (read.kind === 'rows' && read.rows.length === 0) {\n matchedOn = 'name'\n read = await readAssets(deps, network, 'name', symbol)\n }\n if (read.kind === 'failed') {\n return errorResult(\n `The token read failed: ${read.text} This is not \"no contract\": send the same lookup again once, or ask the user for the contract. ${NO_WEB}`\n )\n }\n if (read.kind === 'not_served') {\n return textResult({\n ...base,\n matched_on: null,\n candidates: [],\n total: 0,\n truncated: false,\n hint:\n `${ANSWER_HINT} This Chain Insights server does not serve the token lookup yet (${read.refusal.code}). ` +\n `That is not \"no contract carries ${symbol}\": ask the user for the token's contract, 0x plus 40 hex characters. ${NO_WEB}`,\n })\n }\n\n const total = read.rows.length\n const candidates = read.rows\n .slice(0, CANDIDATES_MAX)\n .map(candidateOf)\n .filter((candidate): candidate is TokenCandidate => candidate !== null)\n const creatorsNotRead =\n candidates.length > 0 ? await readCreators(deps, network, candidates) : null\n const result = {\n ...base,\n matched_on: candidates.length > 0 ? matchedOn : null,\n candidates,\n total,\n truncated: total > CANDIDATES_MAX,\n }\n return textResult({ ...result, hint: hintFor(result, creatorsNotRead) })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,MAAa,yBAAyB;AACtC,MAAa,2BAA2B;AACxC,MAAa,0BAA0B;AACvC,MAAa,gCACX;AAKF,MAAa,gCAAgC;CAC3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CACxB,MAAM,aAAa,KAAK,KACrB,MAAM,GAAG,cAAc,CAAC,CACxB,IAAI,WAAW,CAAC,CAChB,QAAQ,cAA2C,cAAc,IAAI;CACxE,MAAM,kBACJ,WAAW,SAAS,IAAI,MAAM,aAAa,MAAM,SAAS,UAAU,IAAI;CAC1E,MAAM,SAAS;EACb,GAAG;EACH,YAAY,WAAW,SAAS,IAAI,YAAY;EAChD;EACA;EACA,WAAW,QAAQ;CACrB;CACA,OAAO,WAAW;EAAE,GAAG;EAAQ,MAAM,QAAQ,QAAQ,eAAe;CAAE,CAAC;AACzE"}
|
|
@@ -56,6 +56,9 @@ read as it is.
|
|
|
56
56
|
-- A probe: one node, no WHERE, a LIMIT of 100 or less
|
|
57
57
|
USE topology MATCH (a:Address) RETURN a.address AS address, a.network AS network LIMIT 20
|
|
58
58
|
|
|
59
|
+
-- A mark is an anchor: a WHERE on the node's own properties is allowed
|
|
60
|
+
USE topology MATCH (a:Mixer) WHERE "Mixer" IN a.labels RETURN a.address AS address, a.labels AS labels LIMIT 5
|
|
61
|
+
|
|
59
62
|
-- Anchored: an address in the pattern
|
|
60
63
|
USE topology MATCH (a:Address {address: "0x…"})-[f:FLOWED_TO]->(b:Address)
|
|
61
64
|
WHERE NOT a:Pool
|
|
@@ -403,6 +406,22 @@ while it has a live label of that role. A flag is never `false`, so test it
|
|
|
403
406
|
with `IS NOT NULL` or `IS NULL`, not `= false`. A withdrawn label removes its
|
|
404
407
|
node label and its flag. Only `is_exchange` ends a walk.
|
|
405
408
|
|
|
409
|
+
The labels layer adds three judgement marks with no flag: `:Poisoned` (a
|
|
410
|
+
look-alike address that sent worthless dust), `:Targeted` (a poisoning target
|
|
411
|
+
not yet proven to have lost money) and `:OnMoneyTrail` (on the trail the
|
|
412
|
+
evidence walk followed from an accused address). Beside the marks, sorted
|
|
413
|
+
lists say why: `risk_claims` on `:Scam`, `:Poisoned` and `:Sanctioned`,
|
|
414
|
+
`protection_claims` on `:Victim` and `:Targeted`, `traced_claims` on
|
|
415
|
+
`:OnMoneyTrail`, and `suspect_labels` for an address that used a mixer pool.
|
|
416
|
+
The values and their meaning are in
|
|
417
|
+
[Graph tools](graph-tools.md#judgement-marks-and-their-claims).
|
|
418
|
+
|
|
419
|
+
| Form | Result |
|
|
420
|
+
| ------------------------------------------------------------- | ---------------------------------------- |
|
|
421
|
+
| `MATCH (a:Scam) WHERE "FAKE_TOKEN" IN a.risk_claims RETURN a.address, a.risk_claims LIMIT 25` | ✅ the mark is the anchor |
|
|
422
|
+
| `MATCH (a:Address {address: "0x1111111111111111111111111111111111111111"}) RETURN a.protection_claims LIMIT 1` | ✅ anchored on one address |
|
|
423
|
+
| `MATCH (a:Address) WHERE "FAKE_TOKEN" IN a.risk_claims` | refused: no mark and no address |
|
|
424
|
+
|
|
406
425
|
Caveats: facts carries only its mapped labels, so role-label patterns are
|
|
407
426
|
topology-only. The property-flag form (`is_exchange`) remains the canonical
|
|
408
427
|
filter.
|
package/docs/graph-tools.md
CHANGED
|
@@ -402,6 +402,57 @@ flag on the node.
|
|
|
402
402
|
which (`USDG` or `PAXG` on robinhood). An unfreeze removes it. It is never
|
|
403
403
|
`:Scam` for the freeze alone.
|
|
404
404
|
|
|
405
|
+
### Judgement marks and their claims
|
|
406
|
+
|
|
407
|
+
Three more marks come from the labels layer: `:Poisoned`, `:Targeted` and
|
|
408
|
+
`:OnMoneyTrail`. They have no flag. Why a judgement mark is there sits in a
|
|
409
|
+
sorted list on the node, beside the mark.
|
|
410
|
+
|
|
411
|
+
| Mark | List | Holds |
|
|
412
|
+
| --------------- | ------------------- | ------------------------------------------------- |
|
|
413
|
+
| `:Scam` | `risk_claims` | the live risk values below |
|
|
414
|
+
| `:Poisoned` | `risk_claims` | `ADDRESS_POISONING` |
|
|
415
|
+
| `:Sanctioned` | `risk_claims` | `SANCTIONED` |
|
|
416
|
+
| `:Victim` | `protection_claims` | `VICTIM` |
|
|
417
|
+
| `:Targeted` | `protection_claims` | `ADDRESS_POISONING_TARGET`, an older value |
|
|
418
|
+
| `:OnMoneyTrail` | `traced_claims` | the trail values below |
|
|
419
|
+
| none | `suspect_labels` | `MIXER_DEPOSITOR`, `MIXER_WITHDRAWER` |
|
|
420
|
+
|
|
421
|
+
What each value means:
|
|
422
|
+
|
|
423
|
+
| Value | Meaning |
|
|
424
|
+
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
|
|
425
|
+
| `FAKE_TOKEN` | A fake token: a spoof contract that imitates a real token. |
|
|
426
|
+
| `FAKE_TOKEN_DEPLOYER` | The creator of a fake token. |
|
|
427
|
+
| `ADDRESS_POISONING` | A poisoner: a look-alike address that sent worthless dust so the target copies it from its history. `:Poisoned`, never `:Scam`. |
|
|
428
|
+
| `INBOUND_IMPERSONATION` | A look-alike address that paid the target to get into its history. |
|
|
429
|
+
| `PHANTOM_TRANSFER` | A contract that writes fake transfer events, claiming a transfer from a look-alike that never happened. |
|
|
430
|
+
| `PHANTOM_TRANSFER_EMITTER` | A contract that writes fake transfer events, claiming a transfer from a look-alike that never happened. |
|
|
431
|
+
| `PHANTOM_ENTRYPOINT` | A contract that writes fake transfer events, claiming a transfer from a look-alike that never happened. |
|
|
432
|
+
| `SWEEPER_DELEGATE` | An EIP-7702 delegate that empties the accounts that delegate to it. |
|
|
433
|
+
| `SWEEP_BENEFICIARY` | Where a sweeper sends the funds. |
|
|
434
|
+
| `UNSAFE_DELEGATE` | A delegate any caller can use to empty the account. |
|
|
435
|
+
| `APPROVAL_DRAINER` | A spender that moved the tokens of at least three owners with their approval or Permit2 within 72 hours of the grant, and paid nothing back. |
|
|
436
|
+
| `APPROVAL_DRAIN_BENEFICIARY` | The receiver of those tokens. |
|
|
437
|
+
| `SANCTIONED` | On a sanctions list. |
|
|
438
|
+
| `VICTIM` | Lost money to a scam the evidence walk traced: it paid the accused, was swept, or was drained after the attempt. Receiving a fake token or dust never makes a victim. |
|
|
439
|
+
| `ADDRESS_POISONING_TARGET` | A poisoning target the walk has not proven lost money. Not a victim. |
|
|
440
|
+
| `LAUNDERED` | On the trail from an accused address: it received the accused's money along the walk and moved it on. |
|
|
441
|
+
| `RECEIVED` | On the trail: it received that money and still holds it. It becomes `LAUNDERED` when it forwards it. |
|
|
442
|
+
| `FUNDER` | It funded the accused address. |
|
|
443
|
+
| `MIXED` | On the trail: it received that money and paid it into a mixer pool, where the walk ends. |
|
|
444
|
+
| `MIXER_DEPOSITOR` | It put money into a mixer pool. A warning, not a theft. |
|
|
445
|
+
| `MIXER_WITHDRAWER` | It took money out of a mixer pool. A warning, not a theft. |
|
|
446
|
+
|
|
447
|
+
- Ask by mark, `MATCH (a:Scam) WHERE "FAKE_TOKEN" IN a.risk_claims` for fake
|
|
448
|
+
tokens, or anchor on one full address. The mark is the anchor, and a
|
|
449
|
+
`WHERE` on its own properties is allowed. A `WHERE` with no mark and no
|
|
450
|
+
address is refused.
|
|
451
|
+
- The graph holds no link from an accused address to its victims. Answer per
|
|
452
|
+
address.
|
|
453
|
+
- An answer says what a value means in plain words: "a fake-token scam", never
|
|
454
|
+
the list name or the code.
|
|
455
|
+
|
|
405
456
|
- Each flag is absent unless true. An address carries the flag only while it
|
|
406
457
|
has a live label of that role. A flag is never `false`.
|
|
407
458
|
- Test a flag with `IS NOT NULL` or `IS NULL`. Do not test `= false`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chain-insights",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.78.0",
|
|
4
4
|
"description": "AML investigation CLI and MCP proxy for blockchain risk screening and Chain Insights Graph access",
|
|
5
5
|
"homepage": "https://chain-insights.ai",
|
|
6
6
|
"repository": {
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"vitest": "^5.0.3"
|
|
94
94
|
},
|
|
95
95
|
"chainInsights": {
|
|
96
|
-
"dexRegistryVersion":
|
|
96
|
+
"dexRegistryVersion": 6
|
|
97
97
|
},
|
|
98
98
|
"overrides": {
|
|
99
99
|
"ws": "8.21.0",
|
package/registry/README.md
CHANGED
|
@@ -22,8 +22,8 @@ flowchart LR
|
|
|
22
22
|
|
|
23
23
|
| File | Rows served | Why |
|
|
24
24
|
|---|---|---|
|
|
25
|
-
| [robinhood.md](robinhood.md) |
|
|
26
|
-
| [robinhood.json](robinhood.json) |
|
|
25
|
+
| [robinhood.md](robinhood.md) | 83 | registry version 6, recorded 2026-11-05; the `dyor` row and the Ekubo positions row are not served |
|
|
26
|
+
| [robinhood.json](robinhood.json) | 40 exchanges | the served copy of `robinhood.md`, never edited by hand |
|
|
27
27
|
|
|
28
28
|
A change to the rows merged on `main` reaches every running proxy within one
|
|
29
29
|
hour. No release is needed for a data change.
|
|
@@ -36,7 +36,11 @@ hour. No release is needed for a data change.
|
|
|
36
36
|
data shows the address does what its role says:
|
|
37
37
|
- `factory`: a contract that created pools;
|
|
38
38
|
- `manager`: a contract that holds pools;
|
|
39
|
-
- `router`: a contract that forwards swaps
|
|
39
|
+
- `router`: a contract that forwards swaps;
|
|
40
|
+
- `helper`: a contract of the exchange that the trail does not read: a
|
|
41
|
+
position NFT, a staking gauge, a parts deployer, or a swap router of a
|
|
42
|
+
vault, where the manager stays the contract past the swap. The chain or
|
|
43
|
+
its verified source must tie it to the exchange.
|
|
40
44
|
Write the check into the file's `## Verification` section.
|
|
41
45
|
3. **An unchecked row stays in the table.** Its verification cell says
|
|
42
46
|
`not served:` and the reason. It is served later, when a check passes.
|
|
@@ -60,7 +64,7 @@ The `## Rows` table has twelve columns, in this order.
|
|
|
60
64
|
| aliases | the names a user types, comma separated, on one row of the exchange or spread over several |
|
|
61
65
|
| trail type | how money is traced through the exchange: `plain`, `vault`, `gauge` or `launchpad`. Every row of an exchange carries the same trail type |
|
|
62
66
|
| adapter | the adapter id of the DEX indexer that reads the row's pools: `cl-gauge-v1`, `uniswap-v4` |
|
|
63
|
-
| role | `factory` creates pools, `manager` holds pools, `router` forwards swaps |
|
|
67
|
+
| role | `factory` creates pools, `manager` holds pools, `router` forwards swaps, `helper` is a contract of the exchange that the trail does not read. A lookup by address finds a helper; the reads of the exchange follow, none for the helper itself |
|
|
64
68
|
| address | lowercase `0x` hex in backticks |
|
|
65
69
|
| valid from block | the first block the row holds from, `0` when it is not known yet |
|
|
66
70
|
| example pool | optional: one pool of the exchange, read live by the release suite. Empty or `-` when not given |
|
|
@@ -80,14 +84,14 @@ A row is refused for one of these reasons:
|
|
|
80
84
|
| `duplicate row` | the same key, role and address twice |
|
|
81
85
|
| `bad dex key` | the key is not lowercase letters, digits, `.`, `_` or `-` |
|
|
82
86
|
| `bad address` | the address is not lowercase `0x` and 40 hex digits |
|
|
83
|
-
| `unknown role` | the role is not `factory`, `manager` or `
|
|
87
|
+
| `unknown role` | the role is not `factory`, `manager`, `router` or `helper` |
|
|
84
88
|
| `unknown trail type` | the trail type is not `plain`, `vault`, `gauge` or `launchpad` |
|
|
85
89
|
| `bad adapter` | the adapter is empty or not an id |
|
|
86
90
|
| `no source link` | the source link is not `[text](https://…)` |
|
|
87
91
|
| `bad block`, `bad example pool`, `bad pool floor` | the cell is not a number or a pool |
|
|
88
92
|
| `too long` | a value does not fit its column |
|
|
89
93
|
| `dex rows disagree` | two rows of one exchange give a different display, trail type, example pool or pool floor |
|
|
90
|
-
| `no factory or manager row for the dex` | the exchange has router rows only |
|
|
94
|
+
| `no factory or manager row for the dex` | the exchange has router or helper rows only |
|
|
91
95
|
|
|
92
96
|
## The check
|
|
93
97
|
|
|
@@ -120,6 +124,8 @@ node scripts/render-dex-registry.mjs --check # exit 1 when a memo table differ
|
|
|
120
124
|
`registry/<network>.json` has the schema `chain-insights.dex-registry.v1`:
|
|
121
125
|
|
|
122
126
|
- one entry per exchange, in the order the file first names it;
|
|
127
|
+
- `helpers` lists its `helper` addresses, when it has any. An older proxy
|
|
128
|
+
ignores the field;
|
|
123
129
|
- `factories` lists its `factory` and `manager` addresses, `routers` its
|
|
124
130
|
`router` addresses; an exchange with no router row lists its manager there,
|
|
125
131
|
because a vault forwards its own swaps;
|
package/registry/robinhood.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "chain-insights.dex-registry.v1",
|
|
3
3
|
"network": "robinhood",
|
|
4
|
-
"registry_version":
|
|
5
|
-
"recorded_on": "2026-11-
|
|
4
|
+
"registry_version": 6,
|
|
5
|
+
"recorded_on": "2026-11-05",
|
|
6
6
|
"rows": [
|
|
7
7
|
{
|
|
8
8
|
"dex": "aero",
|
|
@@ -24,6 +24,16 @@
|
|
|
24
24
|
"0x0fef9e88a7b76bcdbf451780c6774fe32965ee98": "router",
|
|
25
25
|
"0x9ee35bf1bd69a03c6f0393582030fce8bb93d418": "router"
|
|
26
26
|
},
|
|
27
|
+
"helpers": [
|
|
28
|
+
"0x4857db576ee0e45f10525ec59527bfd10beec60b",
|
|
29
|
+
"0xf437f62053acb121665b8fdbfea8f214fb8e589d",
|
|
30
|
+
"0x220d17d3260f130a4f91a1ba2d21f8f75f624942",
|
|
31
|
+
"0xe033f4bd3d7ccf537a2f954ecdc8eb1218e3b7a6",
|
|
32
|
+
"0x750a4e760873c863daf22890b8db55f4c71f1114",
|
|
33
|
+
"0x045ccb9d8a98cb748b39253005be2d6d5b955c14",
|
|
34
|
+
"0x5874f5b8728776993de4c90c61473d76eeab90db",
|
|
35
|
+
"0xe5b468c4e13b45ec10a1d22ace7e2c0fc0671da0"
|
|
36
|
+
],
|
|
27
37
|
"factories": [
|
|
28
38
|
"0xc63d7338c178e805c544b8f897066bd3bbcbe136"
|
|
29
39
|
],
|
|
@@ -309,6 +319,33 @@
|
|
|
309
319
|
"since_block": 0,
|
|
310
320
|
"source": "https://developers.uniswap.org/docs/protocols/v3/deployments/v3-robinhood-chain-deployments"
|
|
311
321
|
},
|
|
322
|
+
{
|
|
323
|
+
"dex": "eth-usdg-router",
|
|
324
|
+
"display": "unnamed ETH/USDG swap router (routes into Uniswap v3 and v4)",
|
|
325
|
+
"aliases": [
|
|
326
|
+
"ETH/USDG router",
|
|
327
|
+
"ETH/USDG swap router",
|
|
328
|
+
"USDG swap router"
|
|
329
|
+
],
|
|
330
|
+
"trail_type": "plain",
|
|
331
|
+
"adapters": [
|
|
332
|
+
"uniswap-v3"
|
|
333
|
+
],
|
|
334
|
+
"roles": {
|
|
335
|
+
"0x1f7d7550b1b028f7571e69a784071f0205fd2efa": "factory",
|
|
336
|
+
"0x7a39b98d31f84152bc724bc5ddb41dbcb338f2a5": "router"
|
|
337
|
+
},
|
|
338
|
+
"factories": [
|
|
339
|
+
"0x1f7d7550b1b028f7571e69a784071f0205fd2efa"
|
|
340
|
+
],
|
|
341
|
+
"routers": [
|
|
342
|
+
"0x7a39b98d31f84152bc724bc5ddb41dbcb338f2a5"
|
|
343
|
+
],
|
|
344
|
+
"example_pool": "0x52e65b17fb6e5ba00ed806f37afcd2daa50271ca",
|
|
345
|
+
"pool_floor": null,
|
|
346
|
+
"since_block": 105000018,
|
|
347
|
+
"source": "https://github.com/chainswarm/scout-agent/issues/164"
|
|
348
|
+
},
|
|
312
349
|
{
|
|
313
350
|
"dex": "uniswap-v4",
|
|
314
351
|
"display": "Uniswap v4",
|
|
@@ -326,6 +363,10 @@
|
|
|
326
363
|
"roles": {
|
|
327
364
|
"0x8366a39cc670b4001a1121b8f6a443a643e40951": "manager"
|
|
328
365
|
},
|
|
366
|
+
"helpers": [
|
|
367
|
+
"0x204faca1764b154221e35c0d20abb3c525710498",
|
|
368
|
+
"0x8876789976decbfcbbbe364623c63652db8c0904"
|
|
369
|
+
],
|
|
329
370
|
"factories": [
|
|
330
371
|
"0x8366a39cc670b4001a1121b8f6a443a643e40951"
|
|
331
372
|
],
|
|
@@ -897,6 +938,150 @@
|
|
|
897
938
|
"pool_floor": null,
|
|
898
939
|
"since_block": 0,
|
|
899
940
|
"source": "https://github.com/chainswarm/AP1000/blob/main/openspec/changes/archive/2026-10-16-silent-factory-discovery-and-labels/design.md"
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
"dex": "weth-unwrap-helper",
|
|
944
|
+
"display": "unnamed WETH-unwrap helper of Uniswap sell routes",
|
|
945
|
+
"aliases": [
|
|
946
|
+
"WETH-unwrap helper"
|
|
947
|
+
],
|
|
948
|
+
"trail_type": "plain",
|
|
949
|
+
"adapters": [
|
|
950
|
+
"uniswap-v3"
|
|
951
|
+
],
|
|
952
|
+
"roles": {
|
|
953
|
+
"0x1f7d7550b1b028f7571e69a784071f0205fd2efa": "factory",
|
|
954
|
+
"0x0849c295bc609da9fde347834f92a75c2c4eb178": "router"
|
|
955
|
+
},
|
|
956
|
+
"factories": [
|
|
957
|
+
"0x1f7d7550b1b028f7571e69a784071f0205fd2efa"
|
|
958
|
+
],
|
|
959
|
+
"routers": [
|
|
960
|
+
"0x0849c295bc609da9fde347834f92a75c2c4eb178"
|
|
961
|
+
],
|
|
962
|
+
"example_pool": null,
|
|
963
|
+
"pool_floor": null,
|
|
964
|
+
"since_block": 103295248,
|
|
965
|
+
"source": "https://github.com/chainswarm/scout-agent/issues/162"
|
|
966
|
+
},
|
|
967
|
+
{
|
|
968
|
+
"dex": "realm-etf",
|
|
969
|
+
"display": "Realm ETF launchpad",
|
|
970
|
+
"aliases": [
|
|
971
|
+
"Realm",
|
|
972
|
+
"Realm ETF",
|
|
973
|
+
"RealmEtf"
|
|
974
|
+
],
|
|
975
|
+
"trail_type": "launchpad",
|
|
976
|
+
"adapters": [
|
|
977
|
+
"uniswap-v4"
|
|
978
|
+
],
|
|
979
|
+
"roles": {
|
|
980
|
+
"0x124ad86c732b16366ed26445e3943adef635f123": "factory",
|
|
981
|
+
"0x74dd0a05540f7c1ae419c18f8d55ff220076e8c8": "router"
|
|
982
|
+
},
|
|
983
|
+
"factories": [
|
|
984
|
+
"0x124ad86c732b16366ed26445e3943adef635f123"
|
|
985
|
+
],
|
|
986
|
+
"routers": [
|
|
987
|
+
"0x74dd0a05540f7c1ae419c18f8d55ff220076e8c8"
|
|
988
|
+
],
|
|
989
|
+
"example_pool": null,
|
|
990
|
+
"pool_floor": null,
|
|
991
|
+
"since_block": 101031051,
|
|
992
|
+
"source": "https://sourcify.dev/server/v2/contract/4663/0x74dd0a05540f7c1ae419c18f8d55ff220076e8c8"
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
"dex": "pangea",
|
|
996
|
+
"display": "Pangea launch factory",
|
|
997
|
+
"aliases": [
|
|
998
|
+
"Pangea",
|
|
999
|
+
"Pangea launch"
|
|
1000
|
+
],
|
|
1001
|
+
"trail_type": "launchpad",
|
|
1002
|
+
"adapters": [
|
|
1003
|
+
"uniswap-v4"
|
|
1004
|
+
],
|
|
1005
|
+
"roles": {
|
|
1006
|
+
"0xadf9c12eaf14da2f7780c0587cc06034f1edf8d3": "factory"
|
|
1007
|
+
},
|
|
1008
|
+
"helpers": [
|
|
1009
|
+
"0x6ea418b883571af6155145d5604187f92b2d7b92"
|
|
1010
|
+
],
|
|
1011
|
+
"factories": [
|
|
1012
|
+
"0xadf9c12eaf14da2f7780c0587cc06034f1edf8d3"
|
|
1013
|
+
],
|
|
1014
|
+
"routers": [],
|
|
1015
|
+
"example_pool": null,
|
|
1016
|
+
"pool_floor": null,
|
|
1017
|
+
"since_block": 96290239,
|
|
1018
|
+
"source": "https://sourcify.dev/server/v2/contract/4663/0xadf9c12eaf14da2f7780c0587cc06034f1edf8d3"
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
"dex": "icecreamswap",
|
|
1022
|
+
"display": "IceCreamSwap aggregator",
|
|
1023
|
+
"aliases": [
|
|
1024
|
+
"IceCreamSwap",
|
|
1025
|
+
"IceCream",
|
|
1026
|
+
"Ice Cream Swap"
|
|
1027
|
+
],
|
|
1028
|
+
"trail_type": "plain",
|
|
1029
|
+
"adapters": [
|
|
1030
|
+
"uniswap-v3"
|
|
1031
|
+
],
|
|
1032
|
+
"roles": {
|
|
1033
|
+
"0x1f7d7550b1b028f7571e69a784071f0205fd2efa": "factory",
|
|
1034
|
+
"0x603206d6105217dd972e4ab30676a220ca393346": "router",
|
|
1035
|
+
"0x2ca37ff95caf25366ef16fc2e655b78a165d125f": "router",
|
|
1036
|
+
"0xec9aa0a6c2372131a0502aba6188269ab52cacb5": "router",
|
|
1037
|
+
"0xe6eeda550918638529c6cf2ea14f9ea0572d6f88": "router"
|
|
1038
|
+
},
|
|
1039
|
+
"factories": [
|
|
1040
|
+
"0x1f7d7550b1b028f7571e69a784071f0205fd2efa"
|
|
1041
|
+
],
|
|
1042
|
+
"routers": [
|
|
1043
|
+
"0x603206d6105217dd972e4ab30676a220ca393346",
|
|
1044
|
+
"0x2ca37ff95caf25366ef16fc2e655b78a165d125f",
|
|
1045
|
+
"0xec9aa0a6c2372131a0502aba6188269ab52cacb5",
|
|
1046
|
+
"0xe6eeda550918638529c6cf2ea14f9ea0572d6f88"
|
|
1047
|
+
],
|
|
1048
|
+
"example_pool": null,
|
|
1049
|
+
"pool_floor": null,
|
|
1050
|
+
"since_block": 3087983,
|
|
1051
|
+
"source": "https://sourcify.dev/server/v2/contract/4663/0x603206d6105217dd972e4ab30676a220ca393346"
|
|
1052
|
+
},
|
|
1053
|
+
{
|
|
1054
|
+
"dex": "per-launch-v4-router",
|
|
1055
|
+
"display": "unnamed per-launch Uniswap v4 swap routers",
|
|
1056
|
+
"aliases": [
|
|
1057
|
+
"per-launch router",
|
|
1058
|
+
"per-launch v4 router"
|
|
1059
|
+
],
|
|
1060
|
+
"trail_type": "vault",
|
|
1061
|
+
"adapters": [
|
|
1062
|
+
"uniswap-v4"
|
|
1063
|
+
],
|
|
1064
|
+
"roles": {
|
|
1065
|
+
"0x8366a39cc670b4001a1121b8f6a443a643e40951": "manager"
|
|
1066
|
+
},
|
|
1067
|
+
"helpers": [
|
|
1068
|
+
"0xe672754903b2be414abbec68ee1a6d7884ba993b",
|
|
1069
|
+
"0x0c388f9d803e17addc439a50a9c9b9e3937221f5",
|
|
1070
|
+
"0x3201074c2a813d9827c563395c16a86560f57437",
|
|
1071
|
+
"0x80d49714825e23d4801549a765cb88cf917f2f02",
|
|
1072
|
+
"0xf5b7cba51da2cef7fb334aa34c83203efa1f083e",
|
|
1073
|
+
"0xff4b110e9e3b70de24490bef682f18a2342b55a9"
|
|
1074
|
+
],
|
|
1075
|
+
"factories": [
|
|
1076
|
+
"0x8366a39cc670b4001a1121b8f6a443a643e40951"
|
|
1077
|
+
],
|
|
1078
|
+
"routers": [
|
|
1079
|
+
"0x8366a39cc670b4001a1121b8f6a443a643e40951"
|
|
1080
|
+
],
|
|
1081
|
+
"example_pool": null,
|
|
1082
|
+
"pool_floor": null,
|
|
1083
|
+
"since_block": 90471772,
|
|
1084
|
+
"source": "https://github.com/chainswarm/scout-agent/issues/134"
|
|
900
1085
|
}
|
|
901
1086
|
]
|
|
902
1087
|
}
|