jeremylongshore/tons-of-skills-marketplace / plugins/crypto/blockchain-explorer-cli/skills/exploring-blockchain-data
exploring-blockchain-data
VerifiedProcess 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".
| File | Kind | Size |
|---|---|---|
| ARD.md | markdown | 8.0 KB |
| PRD.md | markdown | 2.4 KB |
| SKILL.md | skill md | 7.6 KB |
| config/settings.yaml | config | 2.1 KB |
| references/errors.md | markdown | 4.5 KB |
| references/examples.md | markdown | 8.2 KB |
| references/implementation.md | markdown | 1.5 KB |
| scripts/blockchain_explorer.py | script | 10.1 KB |
| scripts/chain_client.py | script | 14.6 KB |
| scripts/formatters.py | script | 15.7 KB |
| scripts/token_resolver.py | script | 12.7 KB |
| scripts/tx_decoder.py | script | 11.3 KB |
references/errors.md
View on GitHub# Error Handling Reference
## API Errors
### Transaction Not Found
```
Error: Transaction not found
Hash: 0x1234...
```
**Causes:**
- Transaction not yet mined (pending in mempool)
- Wrong chain selected
- Invalid transaction hash
**Solutions:**
1. Wait and retry - transaction may be pending
2. Try other chains: `--chain polygon`, `--chain arbitrum`
3. Verify hash format (66 characters, starts with 0x)
4. Check mempool explorers for pending transactions
### Rate Limit Exceeded
```
Error: Explorer API error: Max rate limit reached
```
**Causes:**
- Too many requests in short period
- No API key configured (5/sec limit)
- API key quota exhausted
**Solutions:**
1. Wait 1-5 seconds and retry
2. Add API key for higher limits:
```bash
export ETHERSCAN_API_KEY=your_key_here
```
3. Use caching to reduce requests
4. Upgrade to paid API tier
### RPC Connection Failed
```
Error: RPC error: {'code': -32000, 'message': 'execution timeout'}
```
**Causes:**
- RPC endpoint overloaded
- Network connectivity issues
- Complex query timeout
**Solutions:**
1. Retry with different RPC endpoint
2. Check internet connection
3. Use dedicated RPC (Alchemy, Chainstack, Infura, or QuickNode)
4. Simplify query or add timeout
### Invalid Address Format
```
Error: Invalid address: 0xinvalid
```
**Causes:**
- Missing or extra characters
- Invalid checksum (mixed case)
- Non-hex characters
**Solutions:**
1. Verify 42 characters (with 0x prefix)
2. Use checksummed address from explorer
3. Convert to lowercase if checksum fails
## Chain-Specific Errors
### Wrong Chain
```
Error: Transaction not found
```
When transaction exists on different chain.
**Solutions:**
1. Try common chains in order:
```bash
python blockchain_explorer.py tx 0x... --chain ethereum
python blockchain_explorer.py tx 0x... --chain polygon
python blockchain_explorer.py tx 0x... --chain arbitrum
```
2. Check original source for chain info
3. Use multi-chain search tools
### Contract Not Verified
```
Error: Contract source code not verified
```
**Causes:**
- Contract source not published to explorer
- Proxy contract (implementation elsewhere)
**Solutions:**
1. Use known function signatures database
2. Check if proxy - find implementation address
3. Decode manually using known ABIs
## Token Resolution Errors
### Unknown Token
```
Token: ??? (Unknown Token)
```
**Causes:**
- New or obscure token
- CoinGecko doesn't track it
- Wrong contract address
**Solutions:**
1. Check token contract on explorer
2. Look up on DEX (Uniswap, SushiSwap)
3. Manually specify decimals if known
### Price Unavailable
```
Price: N/A
```
**Causes:**
- Token not on CoinGecko
- API rate limited
- Very low liquidity token
**Solutions:**
1. Check DEX for on-chain price
2. Use alternative price feed
3. Calculate from LP reserves
## Output Errors
### Encoding Issues
```
UnicodeEncodeError: 'ascii' codec can't encode character
```
**Solutions:**
1. Use `--format json` for safe output
2. Set terminal encoding: `export LANG=en_US.UTF-8`
3. Pipe to file: `> output.txt`
### Large Output Truncated
```
[Output truncated - use --format json for full data]
```
**Solutions:**
1. Use `--format json` and redirect to file
2. Reduce `--limit` parameter
3. Process in batches
## Environment Setup Errors
### Missing Dependencies
```
ImportError: No module named 'requests'
```
**Solutions:**
```bash
pip install requests
# Or for full setup:
pip install requests web3
```
### API Key Not Found
```
Warning: No API key found for ETHERSCAN_API_KEY
Using free tier (5 req/sec limit)
```
**Solutions:**
1. Get free API key from etherscan.io
2. Set environment variable:
```bash
export ETHERSCAN_API_KEY=your_key
```
3. Add to shell profile for persistence
## Recovery Strategies
### Automatic Retry
The CLI implements exponential backoff:
- 1st retry: 1 second delay
- 2nd retry: 2 second delay
- 3rd retry: 4 second delay
- Max retries: 3
### Fallback Chain
When transaction not found, try:
1. ethereum
2. polygon
3. arbitrum
4. optimism
5. bsc
### Cache Recovery
Clear corrupted cache:
```bash
rm ~/.blockchain_explorer_cache.json
```
## Debug Mode
Enable verbose output for troubleshooting:
```bash
python blockchain_explorer.py tx 0x... --verbose
```
Shows:
- API requests being made
- Response times
- Cache hits/misses
- Rate limit status
---
*[Tons of Skills](https://tonsofskills.com) by [Intent Solutions](https://intentsolutions.io) | [jeremylongshore.com](https://jeremylongshore.com)*
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |