Configuration Schema Reference
Static, deep-linkable reference for the V3 config.yaml schema.
Tip: Use the Table of Contents to jump to a field or definition.
Top-level Properties
- name (required)
- description
- schema
- handlers
- full_batch_size
- storage
- ecosystem
- contracts
- chains (required)
- rollback_on_reorg
- save_full_history
- field_selection
- raw_events
- address_format
name
Name of the project
- type:
string
Example (config.yaml):
name: MyIndexer
description
Description of the project
- type:
string | null
Example (config.yaml):
description: Greeter indexer
schema
Custom path to schema.graphql file
- type:
string | null
Example (config.yaml):
schema: ./schema.graphql
handlers
Optional relative path to handlers directory for auto-loading. Defaults to 'src/handlers' if not specified.
- type:
string | null
full_batch_size
Target number of events to be processed per batch. Set it to smaller number if you have many Effect API calls which are slow to resolve and can't be batched. (Default: 5000)
- type:
integer | null - bounds: min: 0, format:
uint64
Example (config.yaml):
full_batch_size: 5000
storage
Storage backends the indexer writes data to. Defaults to Postgres when omitted. Set clickhouse: true to additionally sync the indexed data to ClickHouse. Mark a backend with default: true to store entities that don't have an @storage directive in the schema, e.g. clickhouse: {default: true}.
- type:
anyOf(object<StorageConfig> | null)
Variants:
1: StorageConfig2:null
Example (config.yaml):
storage:
postgres:
default: true
column_name_format: snake_case
clickhouse: true
ecosystem
Ecosystem of the project.
- type:
anyOf(enum (1 values) | null)
Variants:
1: EcosystemTag2:null
Example (config.yaml):
ecosystem: evm
contracts
Global contract definitions that must contain all definitions except addresses. You can share a single handler/abi/event definitions for contracts across multiple chains.
- type:
array | null
Example (config.yaml):
contracts:
- name: Greeter
events:
- event: "NewGreeting(address user, string greeting)"
chains
Configuration of the blockchain chains that the project is deployed on.
- type:
array<object<Chain>> - items:
object<Chain> - items ref: Chain
Example (config.yaml):
chains:
- id: 1
start_block: 0
contracts:
- name: Greeter
address: "0x9D02A17dE4E68545d3a58D3a20BbBE0399E05c9c"
rollback_on_reorg
A flag to indicate if the indexer should rollback to the last known valid block on a reorg. This currently incurs a performance hit on historical sync and is recommended to turn this off while developing (default: true)
- type:
boolean | null
Example (config.yaml):
rollback_on_reorg: true
save_full_history
A flag to indicate if the indexer should save the full history of events. This is useful for debugging but will increase the size of the database (default: false)
- type:
boolean | null
Example (config.yaml):
save_full_history: false
field_selection
Select the block and transaction fields to include in all events globally
- type:
anyOf(object<FieldSelection> | null)
Variants:
1: FieldSelection2:null
Example (config.yaml):
field_selection:
transaction_fields:
- hash
block_fields:
- miner
raw_events
If true, the indexer will store the raw event data in the database. This is useful for debugging, but will increase the size of the database and the amount of time it takes to process events (default: false)
- type:
boolean | null
Example (config.yaml):
raw_events: true
address_format
Address format for Ethereum addresses: 'checksum' or 'lowercase' (default: checksum)
- type:
anyOf(enum (2 values) | null)
Variants:
1: AddressFormat2:null
Definitions
StorageConfig
- type:
object
Properties:
postgres:anyOf(boolean | null | object)– Whether to use Postgres as a storage backend (default: true). Accepts a boolean or an options object (the object form implies the backend is enabled).clickhouse:anyOf(boolean | null | object)– Whether to additionally sync the indexed data to ClickHouse. Requires Postgres to be enabled (default: false). Accepts a boolean or an options object (the object form implies the backend is enabled).
Example (config.yaml):
storage:
postgres:
# Entities without an @storage directive land here
default: true
# Columns become snake_case in the database, while GraphQL and
# handler types keep the schema.graphql casing
column_name_format: snake_case
clickhouse:
default: false
EcosystemTag
- type:
enum (1 values) - allowed:
evm
Example (config.yaml):
ecosystem: evm
GlobalContract
- type:
object - required:
name,events
Properties:
name:string– A unique project-wide name for this contract (no spaces)abi_file_path:string | null– Relative path (from config) to a json abi. If this is used then each configured event should simply be referenced by its namehandler:string | null– Optional relative path to a file where handlers are registered for the given contract. If not provided, handlers can be auto-loaded from src directory.events:array<object<EventConfig>>– A list of events that should be indexed on this contract
Example (config.yaml):
contracts:
- name: Greeter
events:
- event: "NewGreeting(address user, string greeting)"
EventConfig
- type:
object - required:
event
Properties:
event:string– The human readable signature of an event 'eg. Transfer(address indexed from, address indexed to, uint256 value)' OR a reference to the name of an event in a json ABI file defined in your contract config. A provided signature will take precedence over what is defined in the json ABIname:string | null– Name of the event in the HyperIndex generated code. When ommitted, the event field will be used. Should be unique per contractfield_selection:anyOf(object<FieldSelection> | null)– Select the block and transaction fields to include in the specific event
Example (config.yaml):
contracts:
- name: Greeter
events:
- event: "Assigned(address indexed recipientId, uint256 amount, address token)"
name: Assigned
field_selection:
transaction_fields:
- transactionIndex
FieldSelection
- type:
object
Properties:
transaction_fields:array | null– The transaction fields to include in the event, or in all events if applied globally- Available values:
transactionIndex,hash,from,to,gas,gasPrice,maxPriorityFeePerGas,maxFeePerGas,cumulativeGasUsed,effectiveGasPrice,gasUsed,input,nonce,value,v,r,s,contractAddress,logsBloom,root,status,yParity,accessList,maxFeePerBlobGas,blobVersionedHashes,type,l1Fee,l1GasPrice,l1GasUsed,l1FeeScalar,gasUsedForL1,authorizationList
- Available values:
block_fields:array | null– The block fields to include in the event, or in all events if applied globally- Available values:
parentHash,nonce,sha3Uncles,logsBloom,transactionsRoot,stateRoot,receiptsRoot,miner,difficulty,totalDifficulty,extraData,size,gasLimit,gasUsed,uncles,baseFeePerGas,blobGasUsed,excessBlobGas,parentBeaconBlockRoot,withdrawalsRoot,l1BlockNumber,sendCount,sendRoot,mixHash
- Available values:
Example (config.yaml):
events:
- event: "Assigned(address indexed user, uint256 amount)"
# can be within an event as shown here, or globally for all events
field_selection:
transaction_fields:
- transactionIndex
block_fields:
- miner