28 eth_addr: Optional[str],
29 source_addr: Optional[str],
32 Fund an address. If no source address is given, the first hosted account on
33 the RPC host is used. This command should only be used in test environments
34 such as ganache or autonity-helloworld.
42 source_addr = web3.eth.accounts[0]
44 if eth_network.name ==
"autonity-helloworld":
48 from web3.middleware
import geth_poa_middleware
49 web3.middleware_onion.inject(geth_poa_middleware, layer=0)
50 web3.personal.unlockAccount(source_addr,
"test")
53 print(f
"eth_addr = {eth_addr}")
54 print(f
"source_addr = {source_addr}")
55 print(f
"amount = {amount}")
57 web3.eth.sendTransaction({
60 "value": EtherValue(amount).wei