Etherlink 区块链 MCP 技能:Tezos L2 EVM 集成 - Openclaw Skills

作者:互联网

2026-03-25

AI快讯

什么是 Etherlink?

Etherlink 技能为 AI 智能体提供了一个强大的接口,用于参与 Etherlink 区块链。Etherlink 是一种高性能的 Layer 2 解决方案,为 Tezos 带来了 EVM 兼容性。通过 Openclaw Skills 框架集成此技能,开发者可以利用模型上下文协议 (MCP) 服务器执行复杂的 web3 操作,包括余额查询、交易执行和智能合约交互。

该技能对于构建去中心化应用或自动化金融智能体的开发者至关重要,这些应用需要可靠地访问 Etherlink 主网和 Shadownet。它简化了区块链通信的复杂性,允许通过自然语言指令触发精确的链上操作,同时保留了 Etherlink 协议的技术细微差别,例如其原生 XTZ 货币和传统 Gas 定价模型。

下载入口:https://github.com/openclaw/skills/tree/main/skills/efekucuk/etherlink-skill

安装与下载

1. ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install etherlink-skill

2. 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/ 工作区 /skills/

优先级:工作区 > 本地 > 内置

3. 提示词安装

将此提示词复制到 OpenClaw 即可自动安装。

请帮我使用 Clawhub 安装 etherlink-skill。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

Etherlink 应用场景

  • 检查 Etherlink 主网上钱包地址的实时 XTZ 余额。
  • 在 Tezos L2 网络中发送交易和转移原生资产。
  • 通过调用只读或改变状态的函数与已部署的智能合约进行交互。
  • 监控网络健康状况并检索最新的区块信息以进行数据索引。
  • 在 Etherlink Shadownet 测试网环境中原型化和测试 web3 工作流。
Etherlink 工作原理
  1. AI 智能体使用本地基于 Bun 的执行环境连接到 Etherlink MCP 服务器。
  2. 该技能使用存储在环境变量中的安全 EVM 私钥对交易进行身份验证。
  3. 根据用户提示,智能体选择合适的目标网络,例如主网的 Chain ID 42793。
  4. 该技能将自然语言请求映射到标准的 JSON-RPC 方法,如 eth_call、eth_getBalance 或 eth_sendRawTransaction。
  5. 解析区块链响应并呈现给用户,提供链上数据和交易状态的透明视图。

Etherlink 配置指南

要使用 Openclaw Skills 将此功能集成到您的智能体中,请使用以下服务器定义更新您的 MCP 配置文件:

{
  "mcpServers": {
    "etherlink": {
      "command": "bun",
      "args": ["run", "/path/to/etherlink-mcp-server/src/index.ts"],
      "env": {
        "EVM_PRIVATE_KEY": "your-private-key-here"
      }
    }
  }
}

请确保本地拥有 Etherlink MCP 服务器源文件并安装了 Bun 运行时。对于测试网操作,请使用 Shadownet 水龙头获取 XTZ。

Etherlink 数据架构与分类体系

Etherlink 技能根据以下架构组织区块链数据:

属性 描述
网络名称 目标链的主要标识符 etherlink, etherlink-shadownet
链 ID 数字 EVM 链标识符 42793 (主网), 127823 (Shadownet)
原生资产 用于 Gas 和价值的主要代币 XTZ (18 位小数)
RPC URL 用于链通信的端点 node.mainnet.etherlink.com
Gas 模型 支持的费用市场类型 传统 (不支持 EIP-1559)
name: etherlink
description: Etherlink blockchain interaction - EVM-compatible L2 on Tezos. Supports mainnet and shadownet testnet via MCP server. Use for balance checks, transactions, smart contracts, and token operations on Etherlink.
tags: [blockchain, evm, tezos, l2, web3, etherlink, mcp]
version: 1.0.0

Interact with Etherlink, an EVM-compatible L2 built on Tezos.

Quick Start

1. Configure MCP Server

Add to your Claude/MCP config:

{
  "mcpServers": {
    "etherlink": {
      "command": "bun",
      "args": ["run", "/path/to/etherlink-mcp-server/src/index.ts"],
      "env": {
        "EVM_PRIVATE_KEY": "your-private-key-here"
      }
    }
  }
}

2. Select Network

Use network name or chain ID:

  • Mainnet: etherlink or 42793
  • Testnet: etherlink-shadownet or 127823

Networks

Network Chain ID RPC Explorer
Etherlink Mainnet 42793 https://node.mainnet.etherlink.com https://explorer.etherlink.com
Etherlink Shadownet 127823 https://node.shadownet.etherlink.com https://shadownet.explorer.etherlink.com

Native Currency: XTZ (18 decimals)

Common Operations

Check Balance

Get balance for 0x... on etherlink

Send Transaction

Send 0.1 XTZ to 0x... on etherlink

Read Contract

Call balanceOf on contract 0x... for address 0x... on etherlink

Get Block Info

Get latest block on etherlink

Key Differences

  1. Native Currency: XTZ (Tez), not ETH
  2. No EIP-1559: Fee market not yet implemented - use legacy gas pricing
  3. Block Hashes: Computed differently (can't verify from header alone)
  4. Rate Limits: Public RPC limited to 1000 req/min

Supported Endpoints

  • ? eth_blockNumber, eth_chainId, eth_getBalance
  • ? eth_call, eth_estimateGas, eth_gasPrice
  • ? eth_sendRawTransaction, eth_getLogs
  • ? debug_traceTransaction
  • ? eth_subscribe (experimental only)
  • ? Filter endpoints (eth_newFilter, etc.)

Tezos L1 Bridge

Etherlink bridges to Tezos L1 for deposits/withdrawals. Bridge operations require Tezos tooling. See Etherlink Docs for details.

Testnet Faucet

Get testnet XTZ: https://shadownet.faucet.etherlink.com

Troubleshooting

"Unsupported network": Use correct network name (etherlink, etherlink-shadownet) or chain ID.

Rate limited: Public RPC has 1000 req/min limit. For production, run your own node.

Transaction failing: No EIP-1559 - don't set maxFeePerGas/maxPriorityFeePerGas.

Resources

  • Etherlink Docs
  • Block Explorer
  • Shadownet Explorer
  • Faucet