-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
ContractEvent.processLog (and others?) break when used as classmethod #1648
Comments
Poking around this and your other couple issues now 👀 |
Was able to reproduce this, but I'm unclear on expected behavior. Should |
So, there seems to be some kind of half-baked feature to filter events by argument name. I don't really understand that use case, and it doesn't seem tested at the contract API level. Maybe it's worth looking a little deeper about what how the But yeah, my naive expectation was for |
Hey there, @carver ! Is this issue still open? I would love to contribute to this. Please let me know. |
I believe so. A contribution would be great! I would ask Marc, but he's out right now. Maybe @kclowes knows for sure. |
@smishy05 Yep, it's still open! Feel free to open a PR and tag me if you need any direction! Thanks! |
Thanks @carver and @kclowes! I am new to open source and I have been looking at other issues as well in web3py! Will open a PR in one which seems more reachable now.
@carver - Are the three steps mentioned by you a good start for this? |
I have gone through the This is the code that I used for getting the error.
I have migrated the contract using Truffle and used Ganache for deployment (I think this information is superfluous, however I have mentioned it if it has any significance). Hence, I wanted to ask if this code is fine? What should be the parameter that would indicate if I have resolved the issue? That is, what should be expected from my side? Should the output of As suggested by @carver , do I have to simply add the It would be great if you could clarify these doubts. Also, sorry for multiple questions! Waiting for your response and many thanks! |
What was wrong?
When
ContractEvent.processLog()
is called (instead ofContractEvent().processLog()
), you get this:How can it be fixed?
The event ABI is only set on initialization, which doesn't make sense to me.
Maybe:
.abi
a@property
that caches the result of_get_event_abi()
.abi
altogether and use_get_event_abi()
everywhere internally.abi
whenContractEvents
builds all its event attrsI think my preference is # 1
Most importantly: add a test showing that this is broken, and make sure the test works by seeing it fail before implementing the fix.
The text was updated successfully, but these errors were encountered: