-
-
Notifications
You must be signed in to change notification settings - Fork 146
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: adds ContractLog.topics
property for calculating the topics from a log
#2505
feat: adds ContractLog.topics
property for calculating the topics from a log
#2505
Conversation
@@ -256,6 +219,16 @@ def abi(self) -> EventABI: | |||
self._abi = abi | |||
return abi | |||
|
|||
@cached_property | |||
def topics(self) -> list[HexStr]: |
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.
If we are worried about name clashing here, we could make this a method, e.g.:
def get_topics()`
or
@property
def encoded_topics
or whatever else
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.
Wonder if this could actually move a bit upstream into ethpm_types.EventABI
, would be useful here: https://github.com/ApeWorX/silverback/blob/main/silverback/runner.py#L355 (used for creating streaming subscriptions)
Done! ApeWorX/ethpm-types#148 |
f7578e7
to
685c13f
Compare
685c13f
to
f4204a6
Compare
OK so now we have 1 basic implementation ethpm-types, as you saw, and one in Ape which is richer because it handles conversions as well. |
This will allow us to actually get |
Now ApeWorX/ape-titanoboa#17 is unblocked |
What I did
I need this for implementing
get_contract_logs()
inape-titanoboa
How I did it
How to verify it
Checklist