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

add getter to BlockTag to access the block number #101

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

marcinczenko
Copy link
Contributor

@marcinczenko marcinczenko commented Dec 10, 2024

Adds a getter to access the block number for BlockTag with number. Returns Option[BlockTag]:

let blockTag = BlockTag.init(42.u256)
if blockNumber =? blockTag.number:
  # use block number
else:
  # it was not a BlockTag with number
  # but one of the predefined tags 
  # (earliest, latest, or pending)

@marcinczenko marcinczenko self-assigned this Dec 10, 2024
@marcinczenko marcinczenko marked this pull request as draft December 10, 2024 15:10
@marcinczenko marcinczenko force-pushed the feat/blocktag-number-getter branch from 28d027d to 85935d1 Compare December 10, 2024 15:54
@marcinczenko marcinczenko marked this pull request as ready for review December 10, 2024 15:57
Copy link
Member

@AuHau AuHau left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! 👍

@marcinczenko marcinczenko merged commit 0f98528 into main Dec 10, 2024
3 checks passed
@marcinczenko marcinczenko deleted the feat/blocktag-number-getter branch December 10, 2024 16:41
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