Call RouteMesh's unified JSON-RPC endpoint (lb.routeme.sh) for any EVM chainId using a helper script. Use when you need to fetch onchain data (eth_* methods), debug RPC responses, or demo RouteMesh routing for a chain/method.
该技能标准化了调用RouteMesh统一RPC端点的方式:
设置您的API密钥(推荐):
bash
export ROUTEMESHAPIKEY=rm...yourkey...
发起请求(示例:以太坊主网,eth_blockNumber):
bash
python3 {baseDir}/scripts/routemesh_rpc.py \
--chain-id 1 \
--method eth_blockNumber \
--params []
建议通过辅助脚本调用,以确保输出格式一致,并避免意外破坏JSON编码。
获取最新区块(Polygon):
bash
python3 {baseDir}/scripts/routemesh_rpc.py \
--chain-id 137 \
--method eth_getBlockByNumber \
--params [latest, false]
获取链ID(任意EVM链):
bash
python3 {baseDir}/scripts/routemesh_rpc.py \
--chain-id 8453 \
--method eth_chainId \
--params []
eth_call(Base)。data必须是十六进制编码的调用数据:
bash
python3 {baseDir}/scripts/routemesh_rpc.py \
--chain-id 8453 \
--method eth_call \
--params [{to:0x0000000000000000000000000000000000000000,data:0x}, latest]
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 routemesh-crypto-rpc-1776364771 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 routemesh-crypto-rpc-1776364771 技能
skillhub install routemesh-crypto-rpc-1776364771
文件大小: 1.74 KB | 发布时间: 2026-4-17 15:22