ethereum-lists / 4bytes

List of 4byte identifiers for EVM smart contract functions
MIT License
468 stars 103 forks source link

Topics #60

Open tjayrush opened 1 year ago

tjayrush commented 1 year ago

I understand this is for four-bytes, and I think that's wonderful, but is there something similar for event topics? It would think that it wouldn't be very much more difficult to add that, and it would be just as useful.

One thing to keep in mind, though, is the 'index' keyword. An event can have an identical topic given its name and list of parameter types, but in one case some of the topics are index and in another they are not. Same 32-byte topic, but you have to decode the data differently. The only way I've figured out to handle this case is if the decoding fails without topics, insert them and try again.

Not really an issue, but I wanted to share this. You can close this if you wish.