tools

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Ethereum Development Tools

Ethereum开发工具

What You Probably Got Wrong

你可能误解的点

Blockscout MCP server exists: https://mcp.blockscout.com/mcp — gives AI agents structured blockchain data via Model Context Protocol. This is cutting-edge infra as of Feb 2026.
abi.ninja is essential: https://abi.ninja — paste any verified contract address, get a UI to call any function. Zero setup. Supports mainnet + all major L2s. Perfect for agent-driven contract exploration.
x402 has production SDKs:
@x402/fetch
(TS),
x402
(Python),
github.com/coinbase/x402/go
— production-ready libraries for HTTP payments.
Foundry is the default for new projects in 2026. Not Hardhat. 10-100x faster tests, Solidity-native testing, built-in fuzzing.
Blockscout MCP服务器已上线: https://mcp.blockscout.com/mcp —— 通过Model Context Protocol为AI Agent提供结构化的区块链数据。截至2026年2月,这是前沿的基础设施。
abi.ninja是必备工具: https://abi.ninja —— 粘贴任意已验证的合约地址,即可获得调用任意函数的UI界面。无需配置,支持主网及所有主流L2网络。非常适合由Agent驱动的合约探索。
x402拥有生产级SDK:
@x402/fetch
(TS)、
x402
(Python)、
github.com/coinbase/x402/go
—— 用于HTTP支付的生产就绪型库。
2026年新项目的默认选择是Foundry,而非Hardhat。 测试速度快10-100倍,支持Solidity原生测试,内置模糊测试功能。

Tool Discovery Pattern for AI Agents

面向AI Agent的工具发现模式

When an agent needs to interact with Ethereum:
  1. Read operations: Blockscout MCP or Etherscan API
  2. Write operations: Foundry
    cast send
    or ethers.js/viem
  3. Contract exploration: abi.ninja (browser) or
    cast interface
    (CLI)
  4. Testing: Fork mainnet with
    anvil
    , test locally
  5. Deployment:
    forge create
    or
    forge script
  6. Verification:
    forge verify-contract
    or Etherscan API
当Agent需要与以太坊交互时:
  1. 读取操作: Blockscout MCP或Etherscan API
  2. 写入操作: Foundry
    cast send
    或ethers.js/viem
  3. 合约探索: abi.ninja(浏览器端)或
    cast interface
    (CLI)
  4. 测试: 使用
    anvil
    分叉主网,在本地进行测试
  5. 部署:
    forge create
    forge script
  6. 验证:
    forge verify-contract
    或Etherscan API

Blockscout MCP Server

Blockscout MCP服务器

A Model Context Protocol server giving AI agents structured blockchain data:
  • Transaction, address, contract queries
  • Token info and balances
  • Smart contract interaction helpers
  • Multi-chain support
  • Standardized interface optimized for LLM consumption
Why this matters: Instead of scraping Etherscan or making raw API calls, agents get structured, type-safe blockchain data via MCP.
一款Model Context Protocol服务器,为AI Agent提供结构化的区块链数据:
  • 交易、地址、合约查询
  • 代币信息与余额
  • 智能合约交互辅助工具
  • 多链支持
  • 针对LLM使用优化的标准化接口
重要性: 无需抓取Etherscan数据或发起原始API调用,Agent可通过MCP获取结构化、类型安全的区块链数据。

abi.ninja

abi.ninja

URL: https://abi.ninja — Paste any contract address → interact with all functions. Multi-chain. Zero setup.
地址: https://abi.ninja —— 粘贴任意合约地址 → 与所有函数交互。支持多链,无需配置。

x402 SDKs (HTTP Payments)

x402 SDKs(HTTP支付)

TypeScript:
bash
npm install @x402/core @x402/evm @x402/fetch @x402/express
typescript
import { x402Fetch } from '@x402/fetch';
import { createWallet } from '@x402/evm';

const wallet = createWallet(privateKey);
const response = await x402Fetch('https://api.example.com/data', {
  wallet,
  preferredNetwork: 'eip155:8453' // Base
});
Python:
pip install x402
Go:
go get github.com/coinbase/x402/go
Docs: https://www.x402.org | https://github.com/coinbase/x402
TypeScript:
bash
npm install @x402/core @x402/evm @x402/fetch @x402/express
typescript
import { x402Fetch } from '@x402/fetch';
import { createWallet } from '@x402/evm';

const wallet = createWallet(privateKey);
const response = await x402Fetch('https://api.example.com/data', {
  wallet,
  preferredNetwork: 'eip155:8453' // Base
});
Python:
pip install x402
Go:
go get github.com/coinbase/x402/go
文档: https://www.x402.org | https://github.com/coinbase/x402

Scaffold-ETH 2

Scaffold-ETH 2

  • Setup:
    npx create-eth@latest
  • What: Full-stack Ethereum toolkit: Solidity + Next.js + Foundry
  • Key feature: Auto-generates TypeScript types from contracts. Scaffold hooks make contract interaction trivial.
  • Deploy to IPFS:
    yarn ipfs
    (BuidlGuidl IPFS)
  • UI Components: https://ui.scaffoldeth.io/
  • Docs: https://docs.scaffoldeth.io/
  • 搭建:
    npx create-eth@latest
  • 简介: 全栈以太坊工具包:Solidity + Next.js + Foundry
  • 核心特性: 从合约自动生成TypeScript类型。Scaffold钩子让合约交互变得极其简单。
  • 部署至IPFS:
    yarn ipfs
    (BuidlGuidl IPFS)
  • UI组件: https://ui.scaffoldeth.io/
  • 文档: https://docs.scaffoldeth.io/

Choosing Your Stack (2026)

2026年技术栈选择指南

NeedTool
Rapid prototyping / full dAppsScaffold-ETH 2
Contract-focused devFoundry (forge + cast + anvil)
Quick contract interactionabi.ninja (browser) or cast (CLI)
React frontendswagmi + viem (or SE2 which wraps these)
Agent blockchain readsBlockscout MCP
Agent paymentsx402 SDKs
需求工具
快速原型开发 / 完整dApp开发Scaffold-ETH 2
合约聚焦型开发Foundry(forge + cast + anvil)
快速合约交互abi.ninja(浏览器端)或cast(CLI)
React前端wagmi + viem(或封装了这些工具的SE2)
Agent区块链读取Blockscout MCP
Agent支付x402 SDKs

Essential Foundry cast Commands

Foundry cast核心命令

bash
undefined
bash
undefined

Read contract

读取合约

cast call 0xAddr "balanceOf(address)(uint256)" 0xWallet --rpc-url $RPC
cast call 0xAddr "balanceOf(address)(uint256)" 0xWallet --rpc-url $RPC

Send transaction

发送交易

cast send 0xAddr "transfer(address,uint256)" 0xTo 1000000 --private-key $KEY --rpc-url $RPC
cast send 0xAddr "transfer(address,uint256)" 0xTo 1000000 --private-key $KEY --rpc-url $RPC

Gas price

燃气价格

cast gas-price --rpc-url $RPC
cast gas-price --rpc-url $RPC

Decode calldata

解码调用数据

cast 4byte-decode 0xa9059cbb...
cast 4byte-decode 0xa9059cbb...

ENS resolution

ENS解析

cast resolve-name vitalik.eth --rpc-url $RPC
cast resolve-name vitalik.eth --rpc-url $RPC

Fork mainnet locally

本地分叉主网

anvil --fork-url $RPC
undefined
anvil --fork-url $RPC
undefined

RPC Providers

RPC服务提供商

Free (testing):
  • https://eth.llamarpc.com
    — LlamaNodes, no key
  • https://rpc.ankr.com/eth
    — Ankr, free tier
Paid (production):
  • Alchemy — most popular, generous free tier (300M CU/month)
  • Infura — established, MetaMask default
  • QuickNode — performance-focused
Community:
rpc.buidlguidl.com
免费(测试用):
  • https://eth.llamarpc.com
    —— LlamaNodes,无需密钥
  • https://rpc.ankr.com/eth
    —— Ankr,免费层级可用
付费(生产用):
  • Alchemy —— 最受欢迎,免费层级额度充足(每月3亿CU)
  • Infura —— 老牌服务商,MetaMask默认选项
  • QuickNode —— 性能优先
社区提供:
rpc.buidlguidl.com

Block Explorers

区块浏览器

NetworkExplorerAPI
Mainnethttps://etherscan.iohttps://api.etherscan.io
Arbitrumhttps://arbiscan.ioEtherscan-compatible
Basehttps://basescan.orgEtherscan-compatible
Optimismhttps://optimistic.etherscan.ioEtherscan-compatible
网络浏览器API
主网https://etherscan.iohttps://api.etherscan.io
Arbitrumhttps://arbiscan.io兼容Etherscan
Basehttps://basescan.org兼容Etherscan
Optimismhttps://optimistic.etherscan.io兼容Etherscan

MCP Servers for Agents

面向Agent的MCP服务器

Model Context Protocol — standard for giving AI agents structured access to external systems.
  1. Blockscout MCP — multi-chain blockchain data (primary)
  2. eth-mcp — community Ethereum RPC via MCP
  3. Custom MCP wrappers emerging for DeFi protocols, ENS, wallets
MCP servers are composable — agents can use multiple together.
Model Context Protocol —— 为AI Agent提供外部系统结构化访问权限的标准协议。
  1. Blockscout MCP —— 多链区块链数据(首选)
  2. eth-mcp —— 社区提供的以太坊RPC MCP服务
  3. 自定义MCP封装 —— 针对DeFi协议、ENS、钱包的封装正在兴起
MCP服务器支持组合使用——Agent可同时调用多个服务。

What Changed in 2025-2026

2025-2026年的变化

  • Foundry became default over Hardhat for new projects
  • Viem gaining on ethers.js (smaller, better TypeScript)
  • MCP servers emerged for agent-blockchain interaction
  • x402 SDKs went production-ready
  • ERC-8004 tooling emerging (agent registration/discovery)
  • Deprecated: Truffle (use Foundry/Hardhat), Goerli/Rinkeby (use Sepolia)
  • Foundry取代Hardhat成为新项目的默认选择
  • Viem的使用率逐渐超过ethers.js(体积更小,TypeScript支持更优)
  • MCP服务器兴起,用于Agent与区块链的交互
  • x402 SDKs达到生产就绪状态
  • ERC-8004工具开始涌现(Agent注册/发现)
  • 已废弃: Truffle(改用Foundry/Hardhat)、Goerli/Rinkeby(改用Sepolia)

Testing Essentials

测试核心要点

Fork mainnet locally:
bash
anvil --fork-url https://eth.llamarpc.com
本地分叉主网:
bash
anvil --fork-url https://eth.llamarpc.com

Now test against real contracts with fake ETH at http://localhost:8545


**Primary testnet:** Sepolia (Chain ID: 11155111). Goerli and Rinkeby are deprecated.

**主要测试网:** Sepolia(链ID:11155111)。Goerli和Rinkeby已被废弃。