-
-
Notifications
You must be signed in to change notification settings - Fork 838
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: Slice starting at offset "32" is out-of-bounds (size: 32). #323
Comments
Looks like the third log in that list does not honor the event ABI passed (it consists of 2 indexed parameters instead of 1, and also consists of 1 non-indexed parameter instead of 2) – so when we come to decode the topics, an error is thrown.
We could probably do some smarts internally to predict what the indexed/non-indexed args are based off the |
@jxom how about we prevent something like |
That is also a good idea! |
tysm @jxom! <3 |
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. |
Is there an existing issue for this?
Package Version
0.2.9
Current Behavior
Given the following events:
The following
getLogs
will raise an exception:Expected Behavior
viem should not raise an exception and returns the first two logs
Steps To Reproduce
To get the content of the logs:
to get the exception:
Link to Minimal Reproducible Example (StackBlitz, CodeSandbox, GitHub repo etc.)
https://stackblitz.com/edit/viem-getting-started-fpo973?file=index.ts
Anything else?
No response
The text was updated successfully, but these errors were encountered: