Created
May 15, 2022 08:25
-
-
Save pantsarny/94020a3f8dd3d90591c8539570c6aed1 to your computer and use it in GitHub Desktop.
ironfish autodeposit
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 | |
BALANCE=$(yarn --cwd /root/ironfish/ironfish-cli/ start accounts:balance) | |
AMOUNT=$(echo $BALANCE | grep -Eo 'spend\: \$IRON ([0-9]+\.[0-9]+)' | cut -c 13-) | |
if (( $(echo "$AMOUNT >= 0.10000001" |bc -l) )); then | |
$(yarn --cwd /root/ironfish/ironfish-cli/ start deposit) | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment