networks
Networks YAML config describes the networks you wish to enable.
Fields
name
The name of the network it should be unique to the YAML so you can not have 2 networks with the same name in the same YAML file.
name: rETHIndexer
description: My first rindexer project
repository: https://github.com/joshstevens19/rindexer
project_type: no-code
networks:
- name: ethereum
chain_id
The chainId of the network.
name: rETHIndexer
description: My first rindexer project
repository: https://github.com/joshstevens19/rindexer
project_type: no-code
networks:
- name: ethereum
chain_id: 1
rpc
The rpc url for the network.
name: rETHIndexer
description: My first rindexer project
repository: https://github.com/joshstevens19/rindexer
project_type: no-code
networks:
- name: ethereum
chain_id: 1
rpc: https://mainnet.gateway.tenderly.co
You can use erpc for load-balancing between multiple rpc endpoints (with failover, re-org aware caching, auto-batching, rate-limiters, auto-discovery of node providers, etc.)
name: rETHIndexer
description: My first rindexer project
repository: https://github.com/joshstevens19/rindexer
project_type: no-code
networks:
- name: ethereum
chain_id: 1
rpc: http://erpc:4000/main/evm/1
We advise using environment variables for the rpc url to avoid checking in sensitive information.
name: rETHIndexer
description: My first rindexer project
repository: https://github.com/joshstevens19/rindexer
project_type: no-code
networks:
- name: ethereum
chain_id: 1
rpc: ${ETHEREUM_RPC}
You can read more about environment variables in the Environment Variables section.
max_block_range
Set the max block range for the network, this means when rindexer is fetching logs it will not fetch more than the max block range per request.
name: rETHIndexer
description: My first rindexer project
repository: https://github.com/joshstevens19/rindexer
project_type: no-code
networks:
- name: ethereum
chain_id: 1
rpc: https://mainnet.gateway.tenderly.co
max_block_range: 10000
block_poll_frequency
Set the block poll frequency for the network, this allows making a trade-off between RPC use and live indexing speed. The default setting will aggressively poll new blocks to ensure that we index as quickly as possible.
This is not always wanted, and you can choose configure to use an rpc "optimized" version, or manually define the millisecond polling rate per network, or alternatively, manually define a factor of the polling rate.
name: rETHIndexer
description: My first rindexer project
repository: https://github.com/joshstevens19/rindexer
project_type: no-code
networks:
- name: ethereum
chain_id: 1
rpc: https://mainnet.gateway.tenderly.co
block_poll_frequency: rapid # This will rapid-poll, roughly every ~50ms.
compute_units_per_second
The compute units per second for the network.
name: rETHIndexer
description: My first rindexer project
repository: https://github.com/joshstevens19/rindexer
project_type: no-code
networks:
- name: ethereum
chain_id: 1
rpc: https://mainnet.gateway.tenderly.co
compute_units_per_second: 660
get_logs_settings
Advanced configuration options that allow fine-grained control of event fetching logic.
address_filtering
Specifies how events that require address filtering (one that use either address filter or factory filter) are fetched from the network.
Can be one of:
- with
max_address_per_get_logs_request
configuration (default behaviour) - events are fetched with addresses filter, log fetching happens in batches that consist of addresses chunks up to the specified value. Useful when events are often happening, but there is no huge number of addresses that are being watched for. The default value is 5000 addresses, which fits most of the RPC provider limits. in-memory
- all matching events are fetched and then filtered in memory by addresses. Useful when events are not happening often, but there are a huge number of addresses that are being watched for.
name: rETHIndexer
description: My first rindexer project
repository: https://github.com/joshstevens19/rindexer
project_type: no-code
networks:
- name: ethereum
chain_id: 1
rpc: https://mainnet.gateway.tenderly.co
get_logs_settings:
address_filtering:
max_address_per_get_logs_request: 100000
disable_logs_bloom_checks
name: rETHIndexer
description: My first rindexer project
repository: https://github.com/joshstevens19/rindexer
project_type: no-code
networks:
- name: ethereum
chain_id: 1
rpc: https://mainnet.gateway.tenderly.co
disable_logs_bloom_checks: true
Multiple Networks
You can have as many networks as you want in the YAML file.
name: rETHIndexer
description: My first rindexer project
repository: https://github.com/joshstevens19/rindexer
project_type: no-code
networks:
- name: ethereum
chain_id: 1
rpc: https://mainnet.gateway.tenderly.co
- name: base
chain_id: 8453
rpc: https://mainnet.base.org