Created
July 5, 2022 18:29
-
-
Save peterargue/ba79eeb21ae0fc690f051f4868203f82 to your computer and use it in GitHub Desktop.
Search for events from start height to latest using flow-cli
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
EVENT=flow.AccountContractAdded | |
START=32795233 | |
END=$(flow blocks get latest -n mainnet -o json | jq '.height') | |
echo "Start: ${START}" | |
echo "End: ${END}" | |
echo "Event: ${EVENT}" | |
for (( i=${START}; i<=${END}; i += 251 )); do | |
let endrange=$i+250 | |
flow events get ${EVENT} -n mainnet --start $i --end $endrange | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment