Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pantsarny/94020a3f8dd3d90591c8539570c6aed1 to your computer and use it in GitHub Desktop.
Save pantsarny/94020a3f8dd3d90591c8539570c6aed1 to your computer and use it in GitHub Desktop.
ironfish autodeposit
#!/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