Zeth - Zerocash on Ethereum  0.8
Reference implementation of the Zeth protocol by Clearmatics
Functions | Variables
zeth.helper.eth_get_balance Namespace Reference

Functions

None eth_get_balance (Any ctx, Optional[str] eth_addr, bool wei)
 

Variables

 help
 
 is_flag
 
 default
 

Function Documentation

◆ eth_get_balance()

None zeth.helper.eth_get_balance.eth_get_balance ( Any  ctx,
Optional[str]  eth_addr,
bool  wei 
)
Command to get the balance of specific addresses. Support multiple queries
per invocation (outputs one per line), for efficiency.

Definition at line 23 of file eth_get_balance.py.

23 def eth_get_balance(ctx: Any, eth_addr: Optional[str], wei: bool) -> None:
24  """
25  Command to get the balance of specific addresses. Support multiple queries
26  per invocation (outputs one per line), for efficiency.
27  """
28  eth_addr = load_eth_address(eth_addr)
29  web3 = open_web3_from_network(get_eth_network(ctx.obj["eth_network"]))
30  balance_wei = web3.eth.getBalance(eth_addr) # pylint: disable=no-member
31  if wei:
32  print(balance_wei)
33  else:
34  print(EtherValue(balance_wei, "wei").ether())
Here is the call graph for this function:

Variable Documentation

◆ default

zeth.helper.eth_get_balance.default

Definition at line 20 of file eth_get_balance.py.

◆ help

zeth.helper.eth_get_balance.help

Definition at line 16 of file eth_get_balance.py.

◆ is_flag

zeth.helper.eth_get_balance.is_flag

Definition at line 19 of file eth_get_balance.py.

zeth.cli.utils.get_eth_network
NetworkConfig get_eth_network(Optional[str] eth_network)
Definition: utils.py:84
zeth.cli.utils.load_eth_address
str load_eth_address(Optional[str] eth_addr)
Definition: utils.py:444
zeth.helper.eth_get_balance.eth_get_balance
None eth_get_balance(Any ctx, Optional[str] eth_addr, bool wei)
Definition: eth_get_balance.py:23
zeth.cli.utils.open_web3_from_network
Any open_web3_from_network(NetworkConfig eth_net)
Definition: utils.py:114