From 1f6f87db48c013d1d87a85ab6c107cb2943ade59 Mon Sep 17 00:00:00 2001
From: Robert Martin-Legene <robert@nic.ar>
Date: Tue, 11 Sep 2018 17:09:11 -0300
Subject: [PATCH] getbalance shows the balance of a list of addresses.

---
 bin/getbalance.sh | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100755 bin/getbalance.sh

diff --git a/bin/getbalance.sh b/bin/getbalance.sh
new file mode 100755
index 0000000..823cdf0
--- /dev/null
+++ b/bin/getbalance.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+if [ -z "${BFAHOME}" ]; then echo "\$BFAHOME not set. Did you source bfa/bin/env ?" >&2; exit 1; fi
+source ${BFAHOME}/bin/libbfa.sh || exit 1
+
+function usage
+{
+    fatal "Usage: $0 <addr> [...<addr>]"
+}
+
+prereq curl
+test $# -ge 1 || usage
+
+(
+while [ -n "$1" ]
+do
+    echo "'$1'+' '+web3.fromWei(eth.getBalance('$1'), 'Ether');"
+    shift
+done
+) | geth_attach
-- 
GitLab