To get the balance of ether in an address, I am using the code below. (1 line)
sudo geth --exec \
"web3.eth.getBalance('0xf6e5911696a3729a7740cbdcd64c05bc2eec60e7')" attach
I get: 165060000000000000
I need to get balance of token (e.g. Golem) in one line like above. Can not interact with console. Return can be anything, 1 line or JSON.
Also looking for 1 line to send token like below:
sudo geth --exec \
"eth.sendTransaction({from: '0xxxxxxxxxxxxxxxxxxxxxxxxxxx', \
to: '0xxxxxxxxxxxxxxxxxxxxxxxxxx', value: '10000000000000000', \
gas: '0x76D0', gasPrice: '0x4A817C800'})" attach
Is this possible?