BR Academy
0%
Events, Indexing & Data·Lesson 8 of 25·50 min

Reading Historical Events with viem

This lesson is for enrolled learners

The concept Every state change a contract emits (a Transfer, a Mint) is written as a log entry on-chain, with indexed fields called topics that let you filter efficiently — for example, "every Transfer where to equals this address." getLogs (or wagmi/viem's getContractEvents, which decodes the raw log using the ABI) fetches these historical logs over a block range without……

Enroll to continue Already enrolled? Sign in