web3-datalisted
Install: claude install-skill internet-court/internet-court-skill
# Web3 Data Explorer (Chainbase)
Query on-chain data via the [Chainbase CLI](https://github.com/chainbase-labs/cli).
## Quick Reference
**Install**: `npm install -g chainbase-cli` (or use `npx chainbase-cli`)
**Auth**: Set API key via `chainbase config set api-key YOUR_KEY`, or env `CHAINBASE_API_KEY`. Falls back to `demo` key. If rate-limited, direct user to https://platform.chainbase.com to get a key.
**x402 Payment**: Supports pay-per-call micropayments via `--x402` flag. Setup: `chainbase config set private-key 0x...`
```bash
# Top token holders
chainbase token top-holders 0xdAC17F958D2ee523a2206206994597C13D831ec7 --chain 1 --limit 10
# Token price
chainbase token price 0xdAC17F958D2ee523a2206206994597C13D831ec7
# ENS resolve
chainbase domain ens-resolve vitalik.eth
# SQL query
chainbase sql execute "SELECT * FROM ethereum.blocks ORDER BY number DESC LIMIT 5"
```
Use `--json` for machine-parseable output. Use `--chain <id>` to target a specific chain.
## Chain IDs
| Chain | ID | Chain | ID |
|---|---|---|---|
| Ethereum | 1 | Optimism | 10 |
| BSC | 56 | Base | 8453 |
| Polygon | 137 | zkSync | 324 |
| Avalanche | 43114 | Arbitrum | 42161 |
Default to Ethereum (chain 1) unless user specifies otherwise.
## Routing Logic
Match user intent to the right CLI command:
| User wants | CLI command |
|---|---|
| Latest block number | `chainbase block latest` |
| Block details | `chainbase block detail <number>` |
| Transaction detail | `chainbase tx detail <hash>`