Skip to content

How to decode an event without knowing indexed parameters? #2748

Answered by zemse
mds1 asked this question in Q&A
Discussion options

You must be logged in to vote

I don't think there is a straightforward way to do this. From the topics array, we can know the number of indexed parameters. E.g. in your case, it's two. So possible permutations would be three. The fact that types like address or uintx have upper bounds as well as the topics are in order of parameters, multiple permutations can be ruled out to make the complexity of the algorithm better. But yeah param types like (bytes32,string,string) will yield the worst-case complexity with this kind of algorithm.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ricmoo
Comment options

@mds1
Comment options

@ricmoo
Comment options

Answer selected by mds1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants