flow-cli
flow-cli copied to clipboard
Flags issue on flow event get command
Problem
A CLI issue has been discovered with the "flow event get" command, specifically when using the "start" and "end" flags. It's worth noting that the error occurs regardless of whether the start or end value is greater or smaller than the other.
❌ Invalid argument: invalid query: start block must be <= end block
Steps to Reproduce
Just use the "flow event get" command with the start and end flags.
Context
I want to get the Tokenmint events associate with Flow.
I can't seem to reproduce the issue. Can you share which version of the Flow CLI you use?
Can you validate this works for you flow events get A.1e3c78c6d580273b.LNVCT.Deposit --start 51856180 --end 51856183 -n mainnet (a command that works with the latest version of Flow CLI).
@WHYTEWYLL you are sending command to emulator ( you need to send to mainnet like in @sideninja example), but block range and contract address doesn't seem to make sense.
As end height probably too big to emulator, emulator is cutting range to latest block height of emulator. Then you end up with something like ( 2829155 - 100 etc ) range, then API giving error start height is too big.
The current range seems nonsensical, as every input triggers the same error message. It's perplexing that the error persists regardless of whether the range is appropriate or not. If the range is too large, the system should indicate this as well. Assuming your statement is accurate, this seems to be the case.
We will look into conveying a more meaningful message when the range is too big, however, given a normal range it should work. cc @chasefleming