Hi there,
In solidity, as far as I know, I can emit events to log something, and the topic[0] in the transaction receipt is Keccak-256(event name(with args)) hash.
If I use opcode “LOG0”, it will not records any topics in the transaction receipt. I can’t recongnize what event is happened.
I think the opcode must have a reason to exist, but I can’t figure out the scenario.
What scenario will use the opcode “LOG0”, and for what?
Just like what you said,
LOG0 is Keccak-256(event name(with args)) hash, it does not record any topics.
Events log contains topics and data, but if you want to find topics, you should add the key word indexed
in the event(IIRC, there are only 4 topics at most), and topics are searchable, data is not.
For more details, maybe you can look at here: https://ethervm.io/#A0
2 Likes
Oh!!!
Not only the log data, I can put the hash of event name into data too.
What you say has cleared up my confusions!!!
1 Like