grimoire-uniswap
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGrimoire Uniswap Skill
Grimoire Uniswap 技能工具
Use the Grimoire CLI to read public Uniswap adapter data.
Preferred:
grimoire venue uniswap ...
If you installed directly, you can also use .
@grimoirelabs/venuesgrimoire-uniswap使用Grimoire CLI读取公开的Uniswap适配器数据。
推荐使用:
grimoire venue uniswap ...
如果你直接安装了,也可以使用命令。
@grimoirelabs/venuesgrimoire-uniswapWhen to use
适用场景
- Fetch Uniswap router metadata, tokens, or pools for quick VM prototyping.
- Produce snapshot blocks with
paramsfor VM runs.--format spell
- 快速获取Uniswap路由元数据、代币或资金池信息,用于虚拟机原型开发。
- 使用参数生成快照
--format spell块,供虚拟机运行使用。params
Prerequisites
前置条件
- Global CLI:
npm i -g @grimoirelabs/cli - No install:
npx -y @grimoirelabs/cli venue uniswap ...
- 全局安装CLI:
npm i -g @grimoirelabs/cli - 无需安装直接使用:
npx -y @grimoirelabs/cli venue uniswap ...
VM snapshot usage
虚拟机快照使用方式
Use to emit a VM-ready block you can paste into a spell.
--format spellparams:使用参数可生成适用于虚拟机的代码块,你可以直接复制粘贴到spell文件中。
--format spellparams:Commands
可用命令
grimoire venue uniswap info [--format <json|table>]grimoire venue uniswap routers [--chain <id>] [--format <json|table>]grimoire venue uniswap tokens [--chain <id>] [--symbol <sym>] [--address <addr>] [--source <url>] [--format <json|table|spell>]grimoire venue uniswap pools --chain <id> --token0 <address|symbol> --token1 <address|symbol> [--fee <bps>] [--limit <n>] [--source <url>] [--format <json|table|spell>] [--endpoint <url>] [--graph-key <key>] [--subgraph-id <id>] [--rpc-url <url>] [--factory <address>]
If you provide (or ) and omit /, pools uses onchain factory lookups instead of The Graph.
--rpc-urlRPC_URL--endpoint--graph-keygrimoire venue uniswap info [--format <json|table>]grimoire venue uniswap routers [--chain <id>] [--format <json|table>]grimoire venue uniswap tokens [--chain <id>] [--symbol <sym>] [--address <addr>] [--source <url>] [--format <json|table|spell>]grimoire venue uniswap pools --chain <id> --token0 <address|symbol> --token1 <address|symbol> [--fee <bps>] [--limit <n>] [--source <url>] [--format <json|table|spell>] [--endpoint <url>] [--graph-key <key>] [--subgraph-id <id>] [--rpc-url <url>] [--factory <address>]
如果你提供了(或环境变量)且未指定/,资金池查询将使用链上工厂查找而非The Graph服务。
--rpc-urlRPC_URL--endpoint--graph-keyExamples
使用示例
bash
grimoire venue uniswap info --format table
grimoire venue uniswap routers
grimoire venue uniswap routers --chain 1
grimoire venue uniswap tokens --chain 1 --symbol USDC --format spell
grimoire venue uniswap pools --chain 1 --token0 USDC --token1 WETH --fee 3000 --format spell
grimoire venue uniswap pools --chain 8453 --token0 USDC --token1 WETH --fee 500 --rpc-url $RPC_URL --format table
grimoire venue uniswap pools --chain 8453 --token0 USDC --token1 WETH --fee 500 --graph-key $GRAPH_API_KEY --subgraph-id <id> --format tablebash
grimoire venue uniswap info --format table
grimoire venue uniswap routers
grimoire venue uniswap routers --chain 1
grimoire venue uniswap tokens --chain 1 --symbol USDC --format spell
grimoire venue uniswap pools --chain 1 --token0 USDC --token1 WETH --fee 3000 --format spell
grimoire venue uniswap pools --chain 8453 --token0 USDC --token1 WETH --fee 500 --rpc-url $RPC_URL --format table
grimoire venue uniswap pools --chain 8453 --token0 USDC --token1 WETH --fee 500 --graph-key $GRAPH_API_KEY --subgraph-id <id> --format tableSupported Adapters
支持的适配器
| Adapter | Router | Approval Flow |
|---|---|---|
| SwapRouter02 | Standard ERC20 approve |
| Universal Router | Permit2 |
| 适配器 | 路由 | 授权流程 |
|---|---|---|
| SwapRouter02 | 标准ERC20授权 |
| Universal Router | Permit2 |
Notes
注意事项
- CLI currently exposes V3 metadata. V4 adapter is available programmatically via .
createUniswapV4Adapter() - Outputs JSON plus a human-readable table.
- Only metadata is exposed (no on-chain quote endpoints).
- 当前CLI仅开放V3元数据。V4适配器可通过以编程方式调用。
createUniswapV4Adapter() - 输出格式包括JSON及易读的表格形式。
- 仅提供元数据(不包含链上报价端点)。