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

Contract Events Sorted by ContractEvent.logIndex and ContractEvent.blockNumber #3228

Merged
merged 5 commits into from Feb 12, 2024

Conversation

reedsa
Copy link
Contributor

@reedsa reedsa commented Feb 8, 2024

What was wrong?

Closes #961

How was it fixed?

Pass log entries list through sorted to return a list sorted by all event's blockNumber and logIndexes

Todo:

Cute Animal Picture

Screen Shot 2024-02-08 at 3 09 27 PM

reedsa added a commit to reedsa/web3.py that referenced this pull request Feb 9, 2024
Copy link
Collaborator

@kclowes kclowes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Do we need to update any docs?

reedsa added a commit to reedsa/web3.py that referenced this pull request Feb 9, 2024
@reedsa
Copy link
Contributor Author

reedsa commented Feb 9, 2024

Committed a change to also sort the events by blockNumber, I think that makes more sense than just sorting by logIndex.

@reedsa reedsa changed the title Contract Events Sorted by logIndex Contract Events Sorted by ContractEvent.logIndex and ContractEvent.blockNumber Feb 9, 2024
@reedsa reedsa requested a review from kclowes February 12, 2024 22:33
Copy link
Collaborator

@kclowes kclowes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sweet!

@reedsa reedsa merged commit 3443604 into ethereum:main Feb 12, 2024
81 checks passed
@reedsa reedsa deleted the 961-sort-contract-events branch March 19, 2024 17:03
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

Successfully merging this pull request may close these issues.

Add API to iterate through all events in a contract
2 participants