-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Event filters do not ignore null non-indexed parameters #305
Comments
I think I have a clue for why this happens. Let's look at these two filters with console.log. { "address": "0x175f3477dfccc5a1e44c486bf9f26a963bdd2b74",
"topics":
[ "0xf6b983969813047dce97b9ff8a48cfb0a13306eb2caae2ef186b280bc27491c8",
null,
"0x0000000000000000000000000000000000000000000000000000000000000002" ] } Any: { "address": "0x175f3477dfccc5a1e44c486bf9f26a963bdd2b74",
"topics":
[ "0xf6b983969813047dce97b9ff8a48cfb0a13306eb2caae2ef186b280bc27491c8" ] } This It seems like it puts arguments into topics, regardless of whether they're |
Oh! That is quite possible! I though I fixed this, but maybe not. Can you verify you are on the latest version with console.log(ethers.version)? I’ll fix this today. |
I think I was initially on 4.0.4, and now I'm on 4.0.5, and the error seems to be there. |
Ok, I’ll fix it ASAP and publish the new version to npm. |
Travis CI is running right now, once it is finished I will publish to npm. I've added your example as a test case, as well as a few others, but in the future I will add procedurally generated tests to be more thorough. |
Published! Please let me know if you still have any problems, and feel free to re-open this issue. Thanks! :) |
It works for me! Thanks for such quick fix. |
I am having the same issue
https://kovan-optimistic.etherscan.io/tx/0xc5acefbf957871a1f8f67dd37d1647ec5c613ddb76e5e8fa93d2b1f5f09ba967#eventlog |
@jahanzaibrashid Your |
Yes i fixed it now am be able to get all 4 transactions those are done by my wallet address thanks. |
Suppose I have following contract:
I want to catch events, but only those which has
two
equal to, say,2
. I try to accomplish that with code:But that doesn't show any event that is emitted, regardless of
two
value.The events themselves seems to work ok, as this filter
Shows all relevant emits.
The text was updated successfully, but these errors were encountered: