Skip to content

Instantly share code, notes, and snippets.

@pantsarny
Created May 15, 2022 09:20
Show Gist options
  • Save pantsarny/65938fc9583d7fe925bfe8548620216b to your computer and use it in GitHub Desktop.
Save pantsarny/65938fc9583d7fe925bfe8548620216b to your computer and use it in GitHub Desktop.
#!/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 --confirm)
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment