Skip to content

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 reedsa force-pushed the 961-sort-contract-events branch from 61de8ba to f94b8ec Compare February 9, 2024 17:59
reedsa pushed a commit to reedsa/web3.py that referenced this pull request Feb 9, 2024
@reedsa reedsa force-pushed the 961-sort-contract-events branch from f94b8ec to 0212931 Compare February 9, 2024 18:11
@reedsa reedsa requested review from fselmo, kclowes and pacrob February 9, 2024 18:21
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 pushed a commit to reedsa/web3.py that referenced this pull request Feb 9, 2024
@reedsa reedsa force-pushed the 961-sort-contract-events branch from 0212931 to 7a4cef1 Compare February 9, 2024 22:04
@reedsa reedsa force-pushed the 961-sort-contract-events branch from 7a4cef1 to 531fb30 Compare February 9, 2024 22:34
@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
@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