GanacheLaunch
Documentation for eth_defi.provider.ganache.GanacheLaunch Python class.
- class GanacheLaunch
Bases:
objectControl ganache-cli processes launched on background.
Comes with a helpful
close()method when it is time to put Ganache rest.Attributes summary
Which port was bound by the ganache
Used command-line to spin up ganache-cli
Where does Ganache listen to JSON-RPC
UNIX process that we opened
Methods summary
__init__(port, cmd, json_rpc_url, process)close([verbose, block, block_timeout])Kill the ganache-cli process.
- port: int
Which port was bound by the ganache
- cmd: List[str]
Used command-line to spin up ganache-cli
- json_rpc_url: str
Where does Ganache listen to JSON-RPC
- process: psutil.Popen
UNIX process that we opened
- close(verbose=False, block=True, block_timeout=30)
Kill the ganache-cli process.
Ganache is pretty hard to kill, so keep killing it until it dies and the port is free again.
- Parameters
block – Block the execution until Ganache has terminated
block_timeout – How long we give for Ganache to clean up after itself
verbose – If set, dump anything in Ganache stdout to the Python logging using level INFO.