← 返回
数据分析 Key 中文

Etherscan

Use when you need to query Etherscan API V2 for onchain activity, contract metadata, ABI/source retrieval, proxy implementation discovery, and transaction/lo...
用于查询 Etherscan API V2,获取链上活动、合约元数据、ABI/源码、代理实现地址以及交易日志等信息。
davidtaikocha
数据分析 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 705
下载
💾 4
安装
1
版本
#latest

概述

Etherscan API V2

Overview

Use this skill to fetch onchain data from Etherscan-compatible explorers using the unified V2 API.

Core model:

  • One base URL: https://api.etherscan.io/v2/api
  • One API key
  • Switch chains via chainid

Explorer URLs relevant to this workspace:

  • Ethereum mainnet: https://etherscan.io/
  • Ethereum hoodi: https://hoodi.etherscan.io/
  • Taiko mainnet: https://taikoscan.io/
  • Taiko hoodi: https://hoodi.taikoscan.io/

Read first:

  • references/network-map.md
  • references/endpoint-cheatsheet.md
  • references/rate-limits.md
  • references/explorer-url-patterns.md

Required Inputs

Collect these before querying:

  • ETHERSCAN_API_KEY
  • Target chainid
  • Address / tx hash / block range
  • Endpoint intent (activity, logs, source, ABI, status)

Deterministic Workflow

  1. Pick chainid from references/network-map.md.
  2. Choose endpoint by intent from references/endpoint-cheatsheet.md.
  3. Build request on https://api.etherscan.io/v2/api with required params.
  4. Parse status, message, result.
  5. If contract endpoint returns proxy metadata (Proxy == "1"), follow Implementation.
  6. For large history, paginate (page, offset) and/or narrow block ranges.

Method Selection

GoalModule / Action
------
Address normal tx historyaccount / txlist
Address internal tx historyaccount / txlistinternal
ERC20 transfer historyaccount / tokentx
Event logslogs / getLogs
Contract ABIcontract / getabi
Contract source + proxy fieldscontract / getsourcecode
Contract deployer + creation txcontract / getcontractcreation
Tx execution statustransaction / getstatus
Tx receipt statustransaction / gettxreceiptstatus

Quick Commands

Set key once:

export ETHERSCAN_API_KEY="<your_key>"

Get ABI (Taiko mainnet example):

curl -s "https://api.etherscan.io/v2/api?chainid=167000&module=contract&action=getabi&address=<contract>&apikey=$ETHERSCAN_API_KEY"

Get source + proxy metadata (Taiko hoodi example):

curl -s "https://api.etherscan.io/v2/api?chainid=167013&module=contract&action=getsourcecode&address=<contract>&apikey=$ETHERSCAN_API_KEY"

Get address activity in block window:

curl -s "https://api.etherscan.io/v2/api?chainid=1&module=account&action=txlist&address=<address>&startblock=<from>&endblock=<to>&page=1&offset=100&sort=desc&apikey=$ETHERSCAN_API_KEY"

Get logs for a contract in block window:

curl -s "https://api.etherscan.io/v2/api?chainid=560048&module=logs&action=getLogs&address=<contract>&fromBlock=<from>&toBlock=<to>&page=1&offset=1000&apikey=$ETHERSCAN_API_KEY"

Proxy-Aware Contract Handling

When getsourcecode returns:

  • Proxy: "1"
  • non-empty Implementation

then:

  1. Keep runtime call target as proxy address.
  2. Fetch ABI/source from implementation address.
  3. Decode selectors against implementation ABI.
  4. Re-check implementation before privileged write analysis.

Safety Rails

Never skip these checks:

  • Always set correct chainid; wrong chain silently yields wrong context.
  • Respect plan limits and add client-side throttling/retries.
  • Treat status: "0" as non-success even with HTTP 200.
  • For analytics windows, lock startblock/endblock explicitly.
  • For logs, remember offset max is 1000 per query and paginate.
  • Keep retries idempotent and resume scans from stored cursors/block checkpoints.

Expected Output

Return:

  • exact URL/query used (without exposing secret key)
  • chain (chainid + explorer)
  • endpoint (module/action)
  • parsed status/result summary
  • proxy follow-up decisions (Proxy, Implementation) when contract-related

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 13:58 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 367 📥 140,240

Taiko Native Bridge

davidtaikocha
当代理需要在 Taiko L1/L2 之间桥接或认领 ETH/ERC20/ERC721/ERC1155,并执行发送/等待就绪/认领工作流时使用。
★ 0 📥 255
data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 198 📥 65,005