Config File Reference – Absinthe Docs
Skip to content

Config File Reference

Top-Level Fields

kind

  • Type: "evm" (string literal)
  • Purpose: Determines the chain architecture. Currently only "evm" is supported.
  • Example: "evm"

indexerId

  • Type: string
  • Purpose: A unique ID used to namespace Redis keys and sink outputs.
  • Example: "univ2-indexer"

flushMs

  • Type: number (milliseconds)
  • Purpose: The time window size for Time-Weighted Balance (TWB) calculations.
  • Constraints: Must be at least 3600000 (1 hour).
  • Example: 259200000 (3 days)

redisUrl

  • Type: string (URL)
  • Purpose: Connection string for Redis.
  • Must start with: redis:// or rediss://
  • Example: "redis://localhost:6379"

Network Configuration (network)

FieldTypeDescriptionExample
chainIdnumberEVM chain ID (validated)43111
gatewayUrlstringSubsquid archive gateway URL"https://v2.archive.subsquid.io/network/hemi-mainnet"
rpcUrlstringRPC endpoint used for live calls"https://rpc.hemi.network/rpc"
finalitynumberOptional confirmations before block is final75 (default if omitted)

Block Range (range)

FieldTypeDescriptionExample
fromBlocknumberStarting block (inclusive)1451314
toBlocknumberEnding block (inclusive, optional)2481775

Pricing Range (pricingRange)

Block-based Configuration

Block-Based
{
  "type": "block",
  "fromBlock": 30000000
}

Timestamp-based Configuration

Timestamp-Based
{
  "type": "timestamp",
  "fromTimestamp": 1700000000000
}

Sink Configuration (sinkConfig)

Supported Sink Types

📤 stdout

Console Output
{ "sinkType": "stdout", "json": false }

Prints output to console (JSON if json: true).

📊 csv

CSV Export
{ "sinkType": "csv", "path": "output.csv" }

Writes rows to a CSV file.

🌐 absinthe

Multiple Sinks Example

Multiple Outputs
{
  "sinks": [
    { "sinkType": "stdout" },
    { "sinkType": "csv", "path": "univ2swaps.csv" }
  ]
}

Adapter Configuration (adapterConfig)

FieldTypeDescription
adapterIdstringAdapter name (must be registered)
paramsobjectAdapter-specific parameters

Example Configuration

Adapter Setup
{
  "adapterId": "uniswap-v2",
  "params": {
    "poolAddress": "0x0621bae969de9c153835680f158f481424c0720a",
    "trackSwaps": true
  }
}

Asset Feed Configuration (assetFeedConfig)

Understanding Match Rules

Each rule contains:

  • match: Which assets it applies to (by key or labels)
  • config: How to price those assets

Match Criteria

🔑 By Asset Key

Exact Match
"match": { "key": "0xAA40c0c7644e0b2B224509571e10ad20d9C4ef28" }

🏷️ By Labels

Label Matching
"match": {
  "matchLabels": {
    "protocol": "uniswap",
    "version": "v2"
  }
}

🔍 Advanced Expressions

Complex Matching
"match": {
  "matchExpressions": [
    {
      "key": "chain",
      "operator": "In",
      "values": ["ethereum", "polygon"]
    }
  ]
}

Asset Configuration

FieldTypeDescription
assetType"erc20" | "erc721" | "spl"Asset type
priceFeedFeedSelectorHow to price this asset

Price Feed Types

Coingecko Feed
{
  "kind": "coingecko",
  "id": "bitcoin"
}

Complete Asset Configuration Example

Asset Feed Example
{
  "match": {
    "key": "0xad11a8BEb98bbf61dbb1aa0F6d6F2ECD87b35afA"
  },
  "config": {
    "assetType": "erc20",
    "priceFeed": {
      "kind": "pegged",
      "usdPegValue": 1
    }
  }
}