Skip to main content
Function decoding transforms raw transaction calldata into structured, typed rows. When configured, the pipeline matches each transaction’s input data against ABI function signatures and produces decoded rows in {chain_name}_fn_{function_name} tables.

How It Works

  1. The normalizer produces rows for the transactions table, each containing an input_data field (hex-encoded calldata)
  2. The decoder matches the first 4 bytes of input_data (the function selector) against ABI function entries
  3. Parameters are decoded from input_data[4:] using ABI type definitions
  4. Each decoded call is emitted to a {chain_name}_fn_{function_name_snake_case} table
Only function ABI entries with stateMutability of nonpayable or payable are used. View and pure functions are excluded since they do not appear in transaction calldata.

Output Schema

Each decoded function table includes envelope columns from the source transaction plus the ABI-defined parameters:

Example

For an ERC-20 transfer function call on Base:
The output table base_fn_transfer would contain:

Configuration

Function decoding is activated by setting the abi section in your pipeline config and using a transactions topic entity:
Contract address filtering matches against the to_address field (the contract being called).

When to Use Function Decoding vs Event Decoding

Most use cases are better served by event decoding. Use function decoding when you specifically need to analyze calldata - for example, tracking MEV bot calls, analyzing governance proposals, or monitoring specific function invocations regardless of success.