I have a txt file with around 1300 ethereum addreses (1 each line) that I have saved during the years. Now I am running a node since some time and would like to utilize it to automatically check the balance of each address quickly. Of course I can manually import or manually check it but it got to be a way to automate it :D
How can I utilize my ethereum node to use the check balance function, one by one, from wallet.txt, and I guess inform somehow about if the address balance is above 0.
Manually via the geth javascript console I could use
web3.fromWei(web3.eth.getBalance('0xbd3Afb0bB76683eCb4225F9DBc91f998713C3b01'));
Result:
0.483296293327556759
OR via terminal
curl -X POST localhost:8545 \
-H "Content-Type: application/json" \
--data \
'
{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": ["0xbd3Afb0bB76683eCb4225F9DBc91f998713C3b01", "latest"],
"id": 1
}
'
Result:
{"jsonrpc":"2.0","result":"0x728d934e8054bc7","id":1}
(a hex number which is ok i can convert it manually - if 0 then its 0x0)
But! Is there any way to automate this :D?
Thanks in advance!!