Skip to main content

ABI File Format

The pipeline accepts standard Solidity ABI JSON files. Only event and function entries are used - all other entry types (constructor, fallback, receive) are ignored.
[
  {
    "type": "event",
    "name": "Transfer",
    "inputs": [
      { "name": "from", "type": "address", "indexed": true },
      { "name": "to", "type": "address", "indexed": true },
      { "name": "value", "type": "uint256", "indexed": false }
    ]
  },
  {
    "type": "function",
    "name": "transfer",
    "stateMutability": "nonpayable",
    "inputs": [
      { "name": "to", "type": "address" },
      { "name": "amount", "type": "uint256" }
    ]
  }
]
You can obtain ABI files from:
  • Block explorers (Etherscan, Basescan) under the “Contract” tab
  • Solidity compiler output (artifacts/ directory)
  • The cast interface command from Foundry
You can combine multiple contract ABIs into a single file. The decoder uses event signature hashes and function selectors for matching, so entries from different contracts do not conflict as long as names are unique.

Solidity Type Mapping

Solidity TypeColumn TypeNotes
addressSTRINGHex-encoded, checksummed
uint8 through uint256STRINGFull precision as decimal strings
int8 through int256STRINGFull precision as decimal strings
boolBOOLEAN
bytesSTRINGHex-encoded with 0x prefix
bytes1 through bytes32STRINGHex-encoded with 0x prefix
stringSTRING
tupleJSONJSON-serialized object
Arrays (e.g., uint256[])JSONJSON-serialized array
All integer types are stored as decimal strings to preserve full precision. Solidity uint256 values can exceed the range of 64-bit integers, so string representation avoids truncation.

Contract Address Filtering

When contract_addresses is specified in the ABI config, only matching records are decoded:
Decoding ModeFilter FieldDescription
Event decodingcontract_addressThe contract that emitted the event
Function decodingto_addressThe contract that was called
When the list is empty or omitted, all records are decoded regardless of contract address. Records from contracts not in the filter list are subject to the unmatched strategy.

Unmatched Records

When a log or transaction does not match any ABI signature (either because it’s from a non-matching contract or because the signature is not in the ABI file):
unmatched SettingBehavior
skip (default)Drop the record silently
raw_tableWrite to raw_logs or raw_transactions table with original columns intact
Use raw_table when you want to capture all records and handle unmatched ones separately in your downstream processing.

Configuration Reference

abi:
  path: "/etc/pipeline-api/abi.json"
  contract_addresses:
    - "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45"
    - "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
  unmatched: "skip"
FieldTypeRequiredDefaultDescription
pathstringyes-Path to ABI JSON file
contract_addresseslistnoallContract address whitelist. Decodes all contracts when empty.
unmatchedstringnoskipHow to handle records that don’t match any ABI signature

Validation

The pipeline validates ABI configuration at startup:
  • ABI file must exist and be valid JSON
  • ABI file must contain at least one event or function entry relevant to the topic entity
  • ABI decoding is only compatible with logs and transactions topic entities
  • ABI decoding is incompatible with the Kafka (raw) destination type
  • Output table names from ABI entries must not collide with each other or with normalizer output tables
If validation fails, the pipeline will not start. Check the error message in the GoldRush Platform dashboard for details on which validation check failed.