You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Filter applies specifying a from_block and to_block with dedicated setters for each. This follows the literal Ethereum JSON-RPC specification.
With regards to Rust, it's be more expressive to use RangeBounds. This would let the caller write filter.blocks(0 .. 32), filter.blocks(0 ..= 32), filter.blocks(.. 32), etc., ensuring clarity on the range and promoting greater expression. For reference, the current methods are inclusive yet not immediately obvious as inclusive (unlike how .. and ..= would be).
Additional context
No response
The text was updated successfully, but these errors were encountered:
I looked for this a few days ago and didn't see it. I just double-checked after opening the issue and noticed select covers this exact behavior. I'm sorry for the mistake there and the noise here, my bad.
I will note FilterBlockOption doesn't implement From<RangeBounds>, solely Frominclusive/open-ended standard library implementers of RangeBounds (as documented), but I don't see that as worth an issue. I can still get the explicit inclusive bound I wanted.
Component
rpc
Describe the feature you would like
Currently,
Filter
applies specifying afrom_block
andto_block
with dedicated setters for each. This follows the literal Ethereum JSON-RPC specification.With regards to Rust, it's be more expressive to use
RangeBounds
. This would let the caller writefilter.blocks(0 .. 32)
,filter.blocks(0 ..= 32)
,filter.blocks(.. 32)
, etc., ensuring clarity on the range and promoting greater expression. For reference, the current methods are inclusive yet not immediately obvious as inclusive (unlike how..
and..=
would be).Additional context
No response
The text was updated successfully, but these errors were encountered: