Expand description
EVM event fingerprint computation.
The fingerprint of an EVM event is the keccak256 hash of its canonical signature string, e.g.: keccak256(“Swap(address,address,int256,int256,uint160,uint128,int24)”) → 0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67
For raw events, topics[0] IS the fingerprint — we do not need to recompute it.
Functions§
- from_
topics - Extract the fingerprint directly from a raw EVM event (topics[0]).
Returns
Noneif topics is empty or the first topic is malformed. - keccak256_
signature - Compute the keccak256 fingerprint of an event signature string.
Input:
"EventName(type1,type2,...)"— the canonical ABI signature.