-
Notifications
You must be signed in to change notification settings - Fork 372
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
feat: filter contract logs for events #300
feat: filter contract logs for events #300
Conversation
🦋 Changeset detectedLatest commit: f5408d3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
22b46e1
to
5257014
Compare
5257014
to
a7e613f
Compare
Just stumbled across this as having the same error. Nice one. |
For anyone else arriving here, this error was introduced in the most recent relase (0.4.4), so if you fix to version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should pass the filtering function as argument to useContractFunction
useContractFunction(..., filteringFunction?: (e:any) => boolean)
So that developers can have more control and as default it can be left filtering address of contract
More than a filtering function I would say it's a parse function, where manually they read the logs and parse the event with the corresponding contract Abi, this could be an empty function to get the raw logs |
I still have this issue even after updating to [email protected], it only throws error when calling smart contract function that has |
Description of changes
Avoid
No Matching event
by only callingparseLog
on the logs that correspond to the current contract called.Notes:
I'm not sure if this is the best solution for the problem, ideally we should return the logs unparsed but that can be found in the transaction itself