mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-25 10:28:36 +00:00
wei to ether comment
This commit is contained in:
parent
311888d3b8
commit
73d11530ae
1 changed files with 8 additions and 0 deletions
|
@ -103,5 +103,13 @@ except:
|
|||
print("JSON result error!", file=sys.stderr)
|
||||
sys.exit(9)
|
||||
|
||||
"""
|
||||
API result is in Wei. Convert Wei to Ether (ETH).
|
||||
1 : Wei
|
||||
10^12 : Szabo
|
||||
10^15 : Finney
|
||||
10^18 : Ether
|
||||
233874700000000000000000 Wei = 233,874.7 Ether
|
||||
"""
|
||||
eth = float(etherscan_balance['result']) / 1000000000000000000
|
||||
print("{}.value {:.2f}".format(eth_address, eth));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue