AgentSkillsCN

tools

当前以太坊的开发工具、框架、库、RPC与区块浏览器。了解如今真正适用于以太坊开发的工具。为AI智能体提供工具发现指南——MCP、abi.ninja、Foundry、Scaffold-ETH 2、Hardhat,以及更多。在搭建开发环境、选择工具,或当智能体需要探索可用资源时使用。

SKILL.md
--- frontmatter
name: tools
description: Current Ethereum development tools, frameworks, libraries, RPCs, and block explorers. What actually works today for building on Ethereum. Includes tool discovery for AI agents — MCPs, abi.ninja, Foundry, Scaffold-ETH 2, Hardhat, and more. Use when setting up a dev environment, choosing tools, or when an agent needs to discover what's available.

Ethereum Development Tools

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.

Tool Discovery Pattern for AI Agents

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

Blockscout MCP Server

URL: https://mcp.blockscout.com/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.

abi.ninja

URL: https://abi.ninja — Paste any contract address → interact with all functions. Multi-chain. Zero setup.

x402 SDKs (HTTP Payments)

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

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/

Choosing Your Stack (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

Essential Foundry cast Commands

cast is available inside OpenClaw pods via the Foundry init container. The local eRPC gateway is the default RPC:

bash
RPC="http://erpc.erpc.svc.cluster.local:4000/rpc/mainnet"

# Read contract (with ABI decoding)
cast call 0xAddr "balanceOf(address)(uint256)" 0xWallet --rpc-url $RPC

# Send transaction (signing wallet support coming soon)

# Gas price / base fee
cast gas-price --rpc-url $RPC
cast base-fee --rpc-url $RPC

# Decode calldata
cast 4byte-decode 0xa9059cbb...

# ENS resolution
cast resolve-name vitalik.eth --rpc-url $RPC

# Encode calldata for contract interaction
cast calldata "transfer(address,uint256)" 0xRecipient 1000000

# Unit conversion
cast to-wei 1.5 ether        # → 1500000000000000000
cast from-wei 1000000 gwei    # → 0.001

# Fetch contract interface
cast interface 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 --rpc-url $RPC

# Fork mainnet locally
anvil --fork-url $RPC

For a full cast-based query tool, see the ethereum-networks skill (scripts/rpc.sh).

RPC Providers

Obol Stack (local, preferred):

  • http://erpc.erpc.svc.cluster.local:4000/rpc/mainnet — local eRPC gateway, routes to installed networks
  • Supports /rpc/{network} (mainnet, hoodi, sepolia) and /rpc/evm/{chainId} routing

Free (testing/fallback):

  • 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

Block Explorers

NetworkExplorerAPI
Mainnethttps://etherscan.iohttps://api.etherscan.io
Arbitrumhttps://arbiscan.ioEtherscan-compatible
Basehttps://basescan.orgEtherscan-compatible
Optimismhttps://optimistic.etherscan.ioEtherscan-compatible

MCP Servers for Agents

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.

What Changed in 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)

Testing Essentials

Fork mainnet locally:

bash
anvil --fork-url http://erpc.erpc.svc.cluster.local:4000/rpc/mainnet
# Now test against real contracts with fake ETH at http://localhost:8545
# Fallback public RPC: https://eth.llamarpc.com

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

Related Skills

  • ethereum-networks — cast-based blockchain queries (scripts/rpc.sh)
  • testing — Foundry test patterns (forge test, fuzz, fork, invariant)
  • gas — current gas costs and live estimation commands
  • addresses — verified contract addresses across chains