Multi-File Config
One file per protocol instead of one giant sieve.toml.
How it works
Sieve finds every *.sieve.toml file in the same directory as the config passed to --config (default sieve.toml) and merges them into one config at startup. No imports, no include list.
project/
sieve.toml # globals + optional contracts
aave.sieve.toml # [[contracts]] / [[transfers]]
uniswap.sieve.toml # [[contracts]] / [[transfers]]
abis/
erc20.json
pool.jsonA protocol fragment
[[contracts]] name = "AavePool" address = "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2" abi = "abis/aave_pool.json" start_block = 16_291_127 [[contracts.events]] name = "Supply" table = "aave_supplies"
Rules
chain, [api], [p2p], [sync], and [[streams]] belong to the root config. A fragment may contain only [[contracts]] and [[transfers]]. Any global key in a fragment is a startup error.
A single-file config keeps working exactly as before. Fragments are purely additive, so the root can also be globals-only with every contract in a fragment.
A contract name defined in two files is a startup error naming both files. Duplicate table names are rejected the same way.
Fragments share the same abis/ directory as the root config, exactly as in a single file.
Which commands merge
Merging applies to the indexer and to the config-resolving commands: sieve schema, sieve inspect, and sieve reset. sieve peers and sieve add-contract read only the root config by design.
sieve add-contract appends to the root config file. Move the entry into a fragment by hand if you want it grouped with its protocol.