Skip to main content

Query Transaction

Decodes transaction data including traces, logs, and balance changes.

Returns

  • Decoded calldata and function calls
  • Parsed event logs with parameters
  • Token/ETH balance changes
  • Internal transaction traces
  • All contracts and addresses involved

Example Queries

Parameters

Understanding Transaction Components

Balance Changes

Shows all token/ETH movements:
Balance amounts are already decimal-adjusted (human-readable). No need to divide by decimals.

Traces

Internal calls within the transaction:

Event Logs

Decoded events emitted:

Basic Decode

Returns: summary, function called, token transfers, gas cost, status

Filtered Results

Uses balanceQuery to filter balance changes.

DeFi Transactions

Shows: function called, input/output tokens, routing path, exchange rate, fees

Real-World Examples

Example 1: Simple Token Transfer

Example 2: Complex DeFi Transaction

Example 3: Failed Transaction

Filtering Options

Balance Query Examples

Trace/Log Query Examples

Full Data Mode

Set returnAllData: true for complete output:
  • All balance changes (unfiltered)
  • Complete trace tree
  • All decoded logs
  • Raw data (if includeRawData: true)

Tips

Start broad, then filter. Ask “what happened” first, then drill into specifics.
Ask “why” questions: “Why did this fail?” or “Why so many internal calls?”

Common Questions

Claude will explain why it failed, show what it tried to do, and how much gas was wasted.
No, only confirmed (mined) transactions can be analyzed.
Yes! The traces show all internal calls, even those not visible on basic block explorers.

Next Steps

Latest Transactions

Find recent transactions by function/event

Transaction Activity

Get transaction history for an address