tools
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseEthereum 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: (TS), (Python), — production-ready libraries for HTTP payments.
@x402/fetchx402github.com/coinbase/x402/goFoundry 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: (TS)、(Python)、 —— 用于HTTP支付的生产就绪型库。
@x402/fetchx402github.com/coinbase/x402/go2026年新项目的默认选择是Foundry,而非Hardhat。 测试速度快10-100倍,支持Solidity原生测试,内置模糊测试功能。
Tool Discovery Pattern for AI Agents
面向AI Agent的工具发现模式
When an agent needs to interact with Ethereum:
- Read operations: Blockscout MCP or Etherscan API
- Write operations: Foundry or ethers.js/viem
cast send - Contract exploration: abi.ninja (browser) or (CLI)
cast interface - Testing: Fork mainnet with , test locally
anvil - Deployment: or
forge createforge script - Verification: or Etherscan API
forge verify-contract
当Agent需要与以太坊交互时:
- 读取操作: Blockscout MCP或Etherscan API
- 写入操作: Foundry 或ethers.js/viem
cast send - 合约探索: abi.ninja(浏览器端)或(CLI)
cast interface - 测试: 使用分叉主网,在本地进行测试
anvil - 部署: 或
forge createforge script - 验证: 或Etherscan API
forge verify-contract
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/expresstypescript
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:
Go:
Docs: https://www.x402.org | https://github.com/coinbase/x402
pip install x402go get github.com/coinbase/x402/goTypeScript:
bash
npm install @x402/core @x402/evm @x402/fetch @x402/expresstypescript
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:
Go:
文档: https://www.x402.org | https://github.com/coinbase/x402
pip install x402go get github.com/coinbase/x402/goScaffold-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: (BuidlGuidl IPFS)
yarn ipfs - UI Components: https://ui.scaffoldeth.io/
- Docs: https://docs.scaffoldeth.io/
- 搭建:
npx create-eth@latest - 简介: 全栈以太坊工具包:Solidity + Next.js + Foundry
- 核心特性: 从合约自动生成TypeScript类型。Scaffold钩子让合约交互变得极其简单。
- 部署至IPFS: (BuidlGuidl IPFS)
yarn ipfs - UI组件: https://ui.scaffoldeth.io/
- 文档: https://docs.scaffoldeth.io/
Choosing Your Stack (2026)
2026年技术栈选择指南
| Need | Tool |
|---|---|
| Rapid prototyping / full dApps | Scaffold-ETH 2 |
| Contract-focused dev | Foundry (forge + cast + anvil) |
| Quick contract interaction | abi.ninja (browser) or cast (CLI) |
| React frontends | wagmi + viem (or SE2 which wraps these) |
| Agent blockchain reads | Blockscout MCP |
| Agent payments | x402 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
undefinedbash
undefinedRead 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
undefinedanvil --fork-url $RPC
undefinedRPC Providers
RPC服务提供商
Free (testing):
- — LlamaNodes, no key
https://eth.llamarpc.com - — Ankr, free tier
https://rpc.ankr.com/eth
Paid (production):
- Alchemy — most popular, generous free tier (300M CU/month)
- Infura — established, MetaMask default
- QuickNode — performance-focused
Community:
rpc.buidlguidl.com免费(测试用):
- —— LlamaNodes,无需密钥
https://eth.llamarpc.com - —— Ankr,免费层级可用
https://rpc.ankr.com/eth
付费(生产用):
- Alchemy —— 最受欢迎,免费层级额度充足(每月3亿CU)
- Infura —— 老牌服务商,MetaMask默认选项
- QuickNode —— 性能优先
社区提供:
rpc.buidlguidl.comBlock Explorers
区块浏览器
| Network | Explorer | API |
|---|---|---|
| Mainnet | https://etherscan.io | https://api.etherscan.io |
| Arbitrum | https://arbiscan.io | Etherscan-compatible |
| Base | https://basescan.org | Etherscan-compatible |
| Optimism | https://optimistic.etherscan.io | Etherscan-compatible |
| 网络 | 浏览器 | API |
|---|---|---|
| 主网 | https://etherscan.io | https://api.etherscan.io |
| Arbitrum | https://arbiscan.io | 兼容Etherscan |
| Base | https://basescan.org | 兼容Etherscan |
| Optimism | https://optimistic.etherscan.io | 兼容Etherscan |
MCP Servers for Agents
面向Agent的MCP服务器
Model Context Protocol — standard for giving AI agents structured access to external systems.
- Blockscout MCP — multi-chain blockchain data (primary)
- eth-mcp — community Ethereum RPC via MCP
- Custom MCP wrappers emerging for DeFi protocols, ENS, wallets
MCP servers are composable — agents can use multiple together.
Model Context Protocol —— 为AI Agent提供外部系统结构化访问权限的标准协议。
- Blockscout MCP —— 多链区块链数据(首选)
- eth-mcp —— 社区提供的以太坊RPC MCP服务
- 自定义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.comNow 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已被废弃。