File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,7 +30,8 @@ def eth_fund(
3030 amount : int ) -> None :
3131 """
3232 Fund an address. If no source address is given, the first hosted account on
33- the RPC host is used.
33+ the RPC host is used. This command should only be used in test environments
34+ such as ganache or autonity-helloworld.
3435 """
3536 eth_addr = load_eth_address (eth_addr )
3637 eth_network = get_eth_network (ctx .obj ["eth_network" ])
@@ -45,9 +46,10 @@ def eth_fund(
4546 # with the password 'test'. Attempt to unlock it.
4647 # pylint: disable=import-outside-toplevel, no-member
4748 from web3 .middleware import geth_poa_middleware # type: ignore
48- web3 .middleware_stack .inject (geth_poa_middleware , layer = 0 )
49+ web3 .middleware_onion .inject (geth_poa_middleware , layer = 0 )
4950 web3 .personal .unlockAccount (source_addr , "test" )
5051
52+ source_addr = load_eth_address (source_addr )
5153 print (f"eth_addr = { eth_addr } " )
5254 print (f"source_addr = { source_addr } " )
5355 print (f"amount = { amount } " )
You can’t perform that action at this time.
0 commit comments