Replies: 1 comment
-
If fromBlock is not passed, ethers does not pass it as well to the node, and it seems the node assumes it as "latest". I agree this is a behaviour that is unexpected from a common dev perspective, even I was once stuck with getLogs giving me an empty array. I wish it would add the fromBlock: 0 if dev doesn't provide a value. But honestly I don't think this change would be made for v5 since it would probably be breaking some code. cc: @ricmoo, do you think changing getLogs behaviour would make sense in v6? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It seems incongruent that these two functions don't have the same api. For eg.,
returns
In order to get the logs, we need to change
fromBlock
inside theLiquidationCall
:and then we get the logs.
Is there a good reason for this? If yes, then might I suggest adding the possibility to specify
toBlock
andfromBlock
in the call tofilters.LiquidationCall()
? Perhaps as optional parameters, something likefilters.Liquidation({fromBlock: 0})
.Beta Was this translation helpful? Give feedback.
All reactions