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

bug: decodeEventLog does partial decode when ABI parameter has no name #2081

Closed
1 task done
0xOlias opened this issue Apr 5, 2024 · 1 comment
Closed
1 task done
Labels
Good First Issue Misc: Good First Issue

Comments

@0xOlias
Copy link
Contributor

0xOlias commented Apr 5, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Package Version

Confirmed on 1.21.4 and 2.9.9 (stackblitz)

Current Behavior

If an ABI event parameter name is undefined or is the empty string (""), decodeEventLog seems to partially decode it. This happens even if the number of indexed/non-indexed parameters in the ABI item match the log data/topics, and regardless of the strict option.

Expected Behavior

I expected decodeEventLog to return the arguments as an array, ordered the same way as the ABI parameters, omitting all argument names but still decoding all arguments properly.

Steps To Reproduce

See stackblitz

Link to Minimal Reproducible Example (StackBlitz, CodeSandbox, GitHub repo etc.)

https://stackblitz.com/edit/viem-getting-started-jv9nkz?file=index.ts

Anything else?

No response

Copy link
Contributor

This issue has been locked since it has been closed for more than 14 days.

If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Viem version. If you have any questions or comments you can create a new discussion thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Good First Issue Misc: Good First Issue
Projects
None yet
Development

No branches or pull requests

3 participants