query-onchain-data

Query decoded Base on-chain events, transactions, and blocks via the CDP SQL API.

Updated May 10, 2026
One-click install
npx skills add https://github.com/Tsin418/crypto-research-agent --skill query-onchain-data-tsin418
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: query-onchain-data
Source: https://github.com/Tsin418/crypto-research-agent/tree/main/.agents/skills/query-onchain-data
Command: npx skills add https://github.com/Tsin418/crypto-research-agent --skill query-onchain-data-tsin418

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you retrieve on-chain information about decoded blocks, transactions, and events on Base using an SQL interface, without manually parsing raw chain data.

Core Features & Use Cases

  • Base on-chain querying: Run CoinbaseQL queries against base.events, base.transactions, and base.blocks to fetch the exact data you need.
  • Operational safety guardrails: Enforce address validation, safe command construction, required LIMITs, and time-bounded filters to reduce errors and unnecessary cost.
  • Performance-focused filtering: Require indexed-field filtering in base.events (e.g., event_signature, address, block_timestamp) to avoid costly full scans.

Quick Start

Use the query-onchain-data skill to fetch recent decoded Transfer events for USDC on Base from the last 7 days.

Frequently Asked Questions about query-onchain-data

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query decoded on-chain events for a contract on Base?

You query Base on-chain events by executing CoinbaseQL statements against `base.events` using indexed-field WHERE filters like `address` and `event_signature`, combined with a bounded LIMIT to safely retrieve specific contract activity.

What is the safest way to query Base transactions without triggering a full scan?

The safest way to query Base transactions involves applying time-bounded filters on indexed fields and enforcing a required LIMIT in your CoinbaseQL statement to prevent costly full scans and unnecessary data retrieval.

Can I use SQL to inspect Base block metadata for a specific timeframe?

Yes, you can use SQL to inspect Base block metadata by querying `base.blocks` through the CDP SQL API, allowing you to summarize block-level data within specific timeframes without parsing raw chain data manually.

Do I need wallet authentication to retrieve Base on-chain data via CoinbaseQL?

Yes, wallet authentication is required to retrieve Base on-chain data via CoinbaseQL, ensuring secure access to the CDP SQL API while validating addresses and inputs to prevent shell injection risks.

What are the limitations when querying decoded events on Base?

Limitations when querying decoded Base events include mandatory indexed-field filtering on columns like `event_signature` or `block_timestamp`, alongside strict input validation to prevent shell injection, ensuring safe and performant data retrieval.