Custom Tables
Define your own tables in
~/.mevlog/config.toml, populated from indexed logs matching atopic0. Query them alongside the built-in tables.
What they are
- TODO: config-defined tables in the local txs DB, built from matching logs.
- TODO: tracked in the
custom_tablesmeta table by name + fingerprint.
Defining a table
- TODO:
[tables.<name>]block,topic0, optionalchains, optionaladdressesemitter filter. - TODO: example TOML (Uniswap V2
Swap).
Column mapping
- TODO:
source=topic1..topic3ordata[start:end](0-based, end-exclusive; ABI word n isdata[n*32:(n+1)*32]). - TODO: types -
address(20-byte BLOB),uint256(32-byte BE BLOB, works withu256_sum/format_ether),bytes(verbatim slice). - TODO: caveat - dynamic ABI params (string/bytes) store the offset word, not the value.
Rebuilding after edits
- TODO:
mevlog update-db --rebuild-tables --chain-id <id>. - TODO: fingerprint change triggers rebuild; name validation rejects reserved names.
Querying custom tables
- TODO: custom table names are allowlisted for
--sqlreads alongsidetransactions/blocks/logs.