Skip to content
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

Getting txHash along with the contract logs #650

Open
r0wdy1 opened this issue Jun 24, 2022 · 0 comments
Open

Getting txHash along with the contract logs #650

r0wdy1 opened this issue Jun 24, 2022 · 0 comments

Comments

@r0wdy1
Copy link

r0wdy1 commented Jun 24, 2022

As of now (0.18.0) there are some flaws with Contract.events method :

  • there seems to be no way to get the hash of transaction associated wit a specific event ( although the original spec and the log struct model has a field and the data itself is actually retrieved from the node), which makes it impossible to get CallData for a specific emitted event instance
  • blockFrom, blockTo, blockHash and address filled are hardcoded as blank, so from my experience such a query wouldn't be executed by Infura at all
  • Corresponding builder functions for blockFrom, blockTo, blockHash fields receive values, not options, so there is additional complexity when creating filter

I tried my best ( please be patient, this is my first PR) to address aforementioned issues, may be not in a best way. I'm not really excited about making a new type for events with meta, the current idea with tuples, that matches event signature, seems really elegant, but unfortunately the txHash is actually necessary is lot's of cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant