Build Log

Building ChainForge in public.

#0042026-05-03

Parsing ERC-20 Transfers

What I builttoken.transfers: a canonical ERC-20 Transfer table with scaled amounts, sourced from arc.logs.
Why it mattersIt is the first derived dataset and the template for every later canonical table — lineage keys, no mutation of raw, rebuildable by block range.
ArchitectureDecoder matches Transfer(topic0), reads decimals from a token registry, writes amount_raw and amount.
ImplementationTokens with missing decimals stay as amount_raw only; we do not guess 18.
Problems encounteredA handful of non-standard Transfer events (indexed value, missing to) failed ABI decode and were dropped until we added a fallback path.
What I learnedCanonical tables should degrade to raw fields rather than invent values. Null is better than 18.
What's nextThe first protocol decoder, starting with Uniswap V3 (#006), after a canonical-dataset write-up (#005).
Permalink →