exploring-blockchain-data

Process query and analyze blockchain data including blocks, transactions, and smart contracts. Use when querying blockchain data and transactions. Trigger with phrases like "explore blockchain", "query transactions", or "check on-chain data".

1,868 stars

Best use case

exploring-blockchain-data is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Process query and analyze blockchain data including blocks, transactions, and smart contracts. Use when querying blockchain data and transactions. Trigger with phrases like "explore blockchain", "query transactions", or "check on-chain data".

Teams using exploring-blockchain-data should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/exploring-blockchain-data/SKILL.md --create-dirs "https://raw.githubusercontent.com/jeremylongshore/claude-code-plugins-plus-skills/main/plugins/crypto/blockchain-explorer-cli/skills/exploring-blockchain-data/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/exploring-blockchain-data/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How exploring-blockchain-data Compares

Feature / Agentexploring-blockchain-dataStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Process query and analyze blockchain data including blocks, transactions, and smart contracts. Use when querying blockchain data and transactions. Trigger with phrases like "explore blockchain", "query transactions", or "check on-chain data".

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Exploring Blockchain Data

## Overview

Query and analyze blockchain data across multiple EVM-compatible networks including Ethereum, Polygon, Arbitrum, Optimism, and BSC. Supports transaction lookups, address balance checks, block inspection, token balance queries, transaction history retrieval, and whale wallet tracking via a unified CLI.

## Prerequisites

- Python 3.8+ with `requests` and `web3` libraries installed (`pip install requests web3`)
- Etherscan API key (free tier provides 5 requests/second; set via `ETHERSCAN_API_KEY` environment variable)
- Optional: API keys for Polygonscan, Arbiscan, and other chain-specific explorers for higher rate limits
- `blockchain_explorer.py` CLI script, `chain_client.py`, and `token_resolver.py` modules available in the plugin directory
- RPC endpoint access (public endpoints work; dedicated providers like Alchemy, Infura, Chainstack, or QuickNode recommended for reliability)

## Instructions

1. Set the Etherscan API key as an environment variable: `export ETHERSCAN_API_KEY=<key>` to unlock higher rate limits beyond the default 5 requests/second.
2. Run `python blockchain_explorer.py tx <hash>` to look up a transaction by hash, returning status, block number, from/to addresses, value transferred, and gas details.
3. Append `--detailed` to the transaction query to decode the function call, identify the interacting protocol, and display input parameters.
4. Specify `--chain polygon`, `--chain arbitrum`, or `--chain bsc` to query transactions on alternative EVM chains when the hash is not found on Ethereum.
5. Run `python blockchain_explorer.py address <address>` to check the native token balance and total transaction count for a wallet.
6. Add `--history --limit 50` to the address query to retrieve the most recent 50 transactions with timestamps, values, and counterparties.
7. Add `--tokens` to the address query to list all ERC-20 token holdings with balances, symbols, and USD values via CoinGecko price resolution.
8. Run `python blockchain_explorer.py block latest` to inspect the most recent block, or `python blockchain_explorer.py block <number>` for a specific block.
9. Run `python blockchain_explorer.py token <wallet> <contract>` to check the balance of a specific ERC-20 token at a wallet address, with automatic decimal and symbol resolution.
10. Export any query result in JSON or CSV format using `--format json` or `--format csv` and redirect to a file for downstream processing.
11. Enable verbose mode with `--verbose` to display API request URLs, response times, cache hit/miss status, and rate limit counters for debugging.

See `${CLAUDE_SKILL_DIR}/references/implementation.md` for the full four-step implementation workflow.

## Output

- Transaction detail tables showing hash, chain, status, block number, from/to addresses, value, gas price (Gwei), gas limit, gas used, and gas cost
- Decoded transaction data with function name, protocol identification, and parsed input parameters (when `--detailed` is used)
- Address summary with native balance, transaction count, and explorer link
- Transaction history tables with timestamp, hash, from/to, value, and direction (in/out)
- Token balance listings with contract address, token name, symbol, raw balance, human-readable balance, and USD value
- Block details with block number, timestamp, transaction count, gas used, and miner/validator
- JSON (`output.json`) or CSV (`transactions.csv`) export files for programmatic consumption

## Error Handling

| Error | Cause | Solution |
|-------|-------|----------|
| `Transaction not found` | Transaction pending in mempool, wrong chain selected, or invalid hash | Wait and retry for pending transactions; try `--chain polygon`, `--chain arbitrum`, `--chain bsc`; verify hash is 66 characters starting with `0x` |
| `Explorer API error: Max rate limit reached` | Too many requests; no API key or quota exhausted | Wait 1-5 seconds and retry; set `ETHERSCAN_API_KEY` for higher limits; upgrade to paid tier for production use |
| `RPC error: execution timeout` | RPC endpoint overloaded or complex query timed out | Retry with a different RPC endpoint; use a dedicated provider (Alchemy, Infura, QuickNode); simplify the query |
| `Invalid address: 0xinvalid` | Address has wrong length, invalid checksum, or non-hex characters | Verify 42 characters with `0x` prefix; use the checksummed version from a block explorer; convert to lowercase if checksum fails |
| `Contract source code not verified` | Contract source not published on the explorer | Use known function signature databases for decoding; check if the contract is a proxy and look up the implementation address |
| `Token: ??? (Unknown Token)` | Token too new, too obscure, or not tracked by CoinGecko | Check the token contract directly on the explorer; look up on a DEX (Uniswap, SushiSwap); manually specify decimals if known |
| `Price: N/A` | Token not listed on CoinGecko, API rate limited, or very low liquidity | Check the DEX for on-chain price; use an alternative price feed; calculate from LP reserves |
| `ImportError: No module named 'requests'` | Missing Python dependencies | Run `pip install requests web3` to install required packages |

## Examples

### Look Up a Transaction Across Chains
```bash
# Try Ethereum first, then Polygon if not found
python blockchain_explorer.py tx 0x1234...abcdef --chain ethereum
python blockchain_explorer.py tx 0x1234...abcdef --chain polygon
```
Returns a formatted table with transaction status, block number, value transferred, gas details, and a link to the block explorer. Adding `--detailed` decodes the function call (e.g., `swapExactTokensForTokens` on Uniswap).

### Full Wallet Analysis
```bash
python blockchain_explorer.py address 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --history --tokens --limit 50
```
Produces a wallet summary (ETH balance, total transaction count), the 50 most recent transactions with timestamps and counterparties, and a complete ERC-20 token holdings list with USD values. Useful for whale watching or due diligence on a wallet.

### Check USDC Balance and Export to JSON
```bash
python blockchain_explorer.py token 0xYourWallet 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 --format json > usdc_balance.json
```
Resolves the USDC contract, fetches the wallet balance with proper decimal handling (6 decimals for USDC), includes the current USD price, and writes the result to `usdc_balance.json` for integration with dashboards or alerting pipelines.

## Resources

- [Etherscan API Documentation](https://docs.etherscan.io/) -- primary explorer API for Ethereum; free tier available with registration
- [CoinGecko API](https://www.coingecko.com/en/api/documentation) -- token price resolution and metadata lookup
- [web3.py Documentation](https://web3py.readthedocs.io/) -- Python library for direct RPC interaction with EVM chains
- [Alchemy](https://docs.alchemy.com/) / [Infura](https://docs.infura.io/) / [QuickNode](https://www.quicknode.com/docs) -- dedicated RPC providers for reliable node access
- [4byte.directory](https://www.4byte.directory/) -- function signature database for decoding unverified contract interactions

Related Skills

generating-test-data

1868
from jeremylongshore/claude-code-plugins-plus-skills

Generate realistic test data including edge cases and boundary conditions. Use when creating realistic fixtures or edge case test data. Trigger with phrases like "generate test data", "create fixtures", or "setup test database".

managing-database-tests

1868
from jeremylongshore/claude-code-plugins-plus-skills

Test database testing including fixtures, transactions, and rollback management. Use when performing specialized testing. Trigger with phrases like "test the database", "run database tests", or "validate data integrity".

encrypting-and-decrypting-data

1868
from jeremylongshore/claude-code-plugins-plus-skills

Validate encryption implementations and cryptographic practices. Use when reviewing data security measures. Trigger with 'check encryption', 'validate crypto', or 'review security keys'.

scanning-for-data-privacy-issues

1868
from jeremylongshore/claude-code-plugins-plus-skills

Scan for data privacy issues and sensitive information exposure. Use when reviewing data handling practices. Trigger with 'scan privacy issues', 'check sensitive data', or 'validate data protection'.

windsurf-data-handling

1868
from jeremylongshore/claude-code-plugins-plus-skills

Control what code and data Windsurf AI can access and process in your workspace. Use when handling sensitive data, implementing data exclusion patterns, or ensuring compliance with privacy regulations in Windsurf environments. Trigger with phrases like "windsurf data privacy", "windsurf PII", "windsurf GDPR", "windsurf compliance", "codeium data", "windsurf telemetry".

webflow-data-handling

1868
from jeremylongshore/claude-code-plugins-plus-skills

Implement Webflow data handling — CMS content delivery patterns, PII redaction in form submissions, GDPR/CCPA compliance for ecommerce data, and data retention policies. Trigger with phrases like "webflow data", "webflow PII", "webflow GDPR", "webflow data retention", "webflow privacy", "webflow CCPA", "webflow forms data".

vercel-data-handling

1868
from jeremylongshore/claude-code-plugins-plus-skills

Implement data handling, PII protection, and GDPR/CCPA compliance for Vercel deployments. Use when handling sensitive data in serverless functions, implementing data redaction, or ensuring privacy compliance on Vercel. Trigger with phrases like "vercel data", "vercel PII", "vercel GDPR", "vercel data retention", "vercel privacy", "vercel compliance".

veeva-data-handling

1868
from jeremylongshore/claude-code-plugins-plus-skills

Veeva Vault data handling for enterprise operations. Use when implementing advanced Veeva Vault patterns. Trigger: "veeva data handling".

vastai-data-handling

1868
from jeremylongshore/claude-code-plugins-plus-skills

Manage training data and model artifacts securely on Vast.ai GPU instances. Use when transferring data to instances, managing checkpoints, or implementing secure data lifecycle on rented hardware. Trigger with phrases like "vastai data", "vastai upload data", "vastai checkpoints", "vastai data security", "vastai artifacts".

twinmind-data-handling

1868
from jeremylongshore/claude-code-plugins-plus-skills

Handle TwinMind meeting data with GDPR compliance: transcript storage, memory vault management, data export, and deletion policies. Use when implementing data handling, or managing TwinMind meeting AI operations. Trigger with phrases like "twinmind data handling", "twinmind data handling".

supabase-data-handling

1868
from jeremylongshore/claude-code-plugins-plus-skills

Implement GDPR/CCPA compliance with Supabase: RLS for data isolation, user deletion via auth.admin.deleteUser(), data export via SQL, PII column management, backup/restore workflows, and retention policies. Use when handling sensitive data, implementing right-to-deletion, configuring data retention, or auditing PII in Supabase database columns. Trigger: "supabase GDPR", "supabase data handling", "supabase PII", "supabase compliance", "supabase data retention", "supabase delete user", "supabase data export".

speak-data-handling

1868
from jeremylongshore/claude-code-plugins-plus-skills

Handle student audio data, assessment records, and learning progress with GDPR/COPPA compliance. Use when implementing data handling, or managing Speak language learning platform operations. Trigger with phrases like "speak data handling", "speak data handling".