mirror of
https://github.com/luxfi/graph.git
synced 2026-09-24 00:26:07 +00:00
Token entities were seeded with placeholder metadata (symbol=addr[:8], name=full address, decimals=18) — no contract read happened, so the AMM graph returned every token as its own address. Add erc20.go: read symbol()/name()/decimals() via the existing eth_call RPC (canonical ABI string + legacy bytes32 fallback, garbage-decimals guard), memoised once per token (revert→placeholder cached too, never re-probed). Route all four seed sites through a cache-first seedToken with a cold-start no-downgrade guard. BackfillTokens (opt-in BACKFILL_TOKENS=1) enriches existing placeholder rows in place — ≤3 eth_calls per token, no re-sync.