Created
August 24, 2023 21:06
-
-
Save david-bakin-sl/22518a39a5388777f8e2c6009cff86d9 to your computer and use it in GitHub Desktop.
Get all file create transactions from Hedera mirror node
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
OUT=fileCreateTransactions.json | |
MNODE=https://mainnet-public.mirrornode.hedera.com | |
echo '[' > $OUT | |
R=$(curl -S -s "${MNODE}/api/v1/transactions?transactionType=FILECREATE&result=success&order=asc") | |
echo ${R} , >> $OUT | |
while NEXT=$(echo $R | jq --exit-status --raw-output ' .links.next') | |
do | |
echo ${NEXT} | |
R=$(curl -S -s "${MNODE}${NEXT}") | |
echo ${R}, >> $OUT | |
done | |
echo '{}]' >> $OUT | |
echo "$(grep -o FILECREATE ${OUT}) file create transactions found" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment