Skip to content

Instantly share code, notes, and snippets.

@pantsarny
Created May 15, 2022 09:24
Show Gist options
  • Save pantsarny/fd26ed06a7bc67423e40aa07cd714a73 to your computer and use it in GitHub Desktop.
Save pantsarny/fd26ed06a7bc67423e40aa07cd714a73 to your computer and use it in GitHub Desktop.
#!/bin/bash
BALANCE=$(yarn --cwd ~/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 ~/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