什么是 indexing?
如何读取和查询链上数据——事件、图表、索引模式。为什么不能只循环块,以及使用什么来代替。 来源:austintgriffith/ethskills。
如何读取和查询链上数据——事件、图表、索引模式。为什么不能只循环块,以及使用什么来代替。
通过命令行快速安装 indexing AI 技能到你的开发环境
来源:austintgriffith/ethskills。
You try to query historical state via RPC calls. You can't cheaply read past state. ethcall reads current state. Reading state at a historical block requires an archive node (expensive, slow). For historical data, you need an indexer.
You loop through blocks looking for events. Scanning millions of blocks with ethgetLogs is O(n) — it will timeout, get rate-limited, or cost a fortune in RPC credits. Use an indexer that has already processed every block.
You store query results onchain. Leaderboards, activity feeds, analytics — these belong offchain. Compute offchain, index events offchain. If you need an onchain commitment, store a hash.
如何读取和查询链上数据——事件、图表、索引模式。为什么不能只循环块,以及使用什么来代替。 来源:austintgriffith/ethskills。
为搜索与 AI 引用准备的稳定字段与命令。
npx skills add https://github.com/austintgriffith/ethskills --skill indexing如何读取和查询链上数据——事件、图表、索引模式。为什么不能只循环块,以及使用什么来代替。 来源:austintgriffith/ethskills。
打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/austintgriffith/ethskills --skill indexing 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用
https://github.com/austintgriffith/ethskills