Events

ABI & calldata

event log decoder

Decode EVM event logs from topics and data, a log object, or a whole transaction receipt. The event is found automatically from topic0, indexed parameters are worked out from the topics, and tuples, indexed strings and ERC-721 vs ERC-20 Transfer are handled.

try

good to know

what are topics?

topic0 is the keccak256 of the event signature; topics 1–3 are the indexed parameters, each padded to 32 bytes. everything not indexed is abi-encoded in data.

why can’t i read an indexed string?

indexed dynamic values (string, bytes, arrays, structs) are stored as their keccak256 in the topic. the original value isn’t in the log at all.

erc-20 and erc-721 Transfer have the same topic0?

yes: Transfer(address,address,uint256). erc-721 indexes the token id (4 topics), erc-20 puts the amount in data (3 topics). the decoder uses the topic count to tell them apart.