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

fix: negative block number support in ContractLog.range queries #2388

Merged
merged 3 commits into from
Dec 12, 2024

Conversation

antazoey
Copy link
Member

@antazoey antazoey commented Nov 25, 2024

What I did

Allows queries like

logs = list(c.MyEvent.range(-100, 0))

to get all events in the last 100 blocks.

How I did it

Lots of thinking, getting it wrong, and tests... Really the test.

How to verify it

Look for some recent events, play with values

Checklist

  • All changes are completed
  • New test cases have been added
  • Documentation has been updated

@antazoey antazoey force-pushed the fix/range-negative-numbers branch from c6072e0 to 0f16fdc Compare November 25, 2024 11:11
@antazoey antazoey enabled auto-merge (squash) December 12, 2024 16:13
@antazoey antazoey merged commit e92446f into ApeWorX:main Dec 12, 2024
18 checks passed
@antazoey antazoey deleted the fix/range-negative-numbers branch December 12, 2024 18:06
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.

2 participants