Etherscan API V2 for Openclaw

A unified interface for querying Etherscan-compatible explorers to retrieve blockchain transactions, contract ABIs, and event logs across multiple EVM chains.

davidtaikocha
v1.0.0
Feb 23, 2026
0
1.1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install etherscan-api

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install etherscan-api using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Etherscan API V2?

The Etherscan API V2 skill provides a standardized way for AI agents to interact with EVM-compatible blockchains through a unified endpoint. By leveraging a single API key and switching between networks via chain IDs, this skill simplifies onchain data retrieval for developers using Openclaw Skills. It allows for deep inspection of smart contracts, transaction histories, and logs without needing to manage multiple explorer-specific configurations.

This skill is particularly valuable for building automated auditing tools, portfolio trackers, or blockchain monitoring systems. It handles the complexity of switching between mainnets and testnets, such as Ethereum and Taiko, while providing a consistent data structure for AI processing.

Etherscan API V2 Use Cases

  • Retrieving comprehensive transaction histories including normal, internal, and ERC20 token transfers.
  • Auditing smart contract integrity by fetching source code, ABIs, and deployment metadata.
  • Monitoring specific event logs within block ranges for real-time dapp activity analysis.
  • Discovering proxy implementation addresses to ensure accurate contract interaction and analysis.
  • Verifying transaction execution and receipt status across various EVM networks.

How Etherscan API V2 Works

  1. Identify the target network chainid from the supported network map.
  2. Determine the required API module (e.g., account, contract, logs) and the specific action needed.
  3. Construct a request to the unified V2 API endpoint using the provided API key and parameters.
  4. Execute the query and parse the response for status, messages, and the primary result payload.
  5. If a contract is identified as a proxy, the skill follows the implementation address to retrieve the underlying logic and ABI.
  6. For large datasets, the skill manages pagination using page and offset parameters to ensure complete data retrieval.

Etherscan API V2 Setup

To begin using this skill within Openclaw Skills, set your API key as an environment variable:

export ETHERSCAN_API_KEY="your_etherscan_api_key_here"

You can then query the API using standard curl commands, specifying the chainid for the desired network:

# Example: Fetch ABI for a contract on Ethereum Mainnet
curl -s "https://api.etherscan.io/v2/api?chainid=1&module=contract&action=getabi&address=<contract_address>&apikey=$ETHERSCAN_API_KEY"

Etherscan API V2 Data Schema & Taxonomy

The skill returns structured data based on the Etherscan V2 specification. Key fields include:

Field Description
status Success or failure indicator (1 for success, 0 for error)
message API response message (e.g., OK or No transactions found)
result The primary data payload (list of transactions, ABI string, or source code object)
chainid The ID of the network being queried
Proxy String "1" if the address is a proxy contract
Implementation The address of the logic contract if Proxy is detected

Etherscan API V2 Advanced Features

  • Unified V2 Architecture: Switch between dozens of EVM chains using a single base URL and API key through Openclaw Skills.
  • Proxy-Aware Discovery: Automatically identifies proxy contracts and provides the path to implementation source code and ABIs.
  • Granular Log Filtering: Supports complex event log queries with block-range locking and maximum offset management.
  • Idempotent Scanning: Designed to support cursor-based scanning for robust, resumable data ingestion pipelines.
  • Deterministic Error Handling: Treats non-success statuses as failures even on HTTP 200 responses to ensure data integrity.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*