Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple signature of the same events (with and without index) not processed correctly #43

Open
efiShtain opened this issue Sep 26, 2019 · 1 comment

Comments

@efiShtain
Copy link

efiShtain commented Sep 26, 2019

In case an event (log) has a signature of eventName(address arg1) and eventName(indexed address arg1) - the normalised signature is the same (lets say X)

loading multiple ABIs does not help as the latest ABI is saved for handling the X form

Need to save an array of ABIs for each method/log
try handle them in series until one succeed or all of them failed

https://etherscan.io/tx/0xe9dc240d688fb3aa78f2d18bc73812f613f564dcd1768e4e4b96e5ea85c7c6e1

This is an example of a transaction that fails to process
Log 2 and Log 10 are the same, but one has indexed args and the other not
the library tries to handle both of them as indexed so it throws on this line(168)

decodedP.value = decodedP.value.toLowerCase();

since value is undefined

** Relevant probably only for address type

@efiShtain
Copy link
Author

I've opened a pull request which fixes the issue
#45

It's an opinionated fix. it returns the first valid decode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant