AnvilLaunch
Documentation for eth_defi.provider.anvil.AnvilLaunch Python class.
- class AnvilLaunch
Bases:
objectControl Anvil processes launched on background.
Comes with a helpful
close()method when it is time to put Anvil rest.The
chain_id,upstream_rpc_urls,fork_block_numberandeffective_fork_urlfields are the canonical launch metadata exposed to callers. The module-level metadata registry mirrors these values only so that latercreate_multi_provider_web3(launch.json_rpc_url)calls can attach the same context to retry diagnostics.Attributes summary
chain_ideffective_fork_urlfork_block_numberproxyupstream_rpc_urlsMethods summary
__init__(port, cmd, json_rpc_url, process[, ...])close([log_level, block, block_timeout])Close the background Anvil process.
- __init__(port, cmd, json_rpc_url, process, chain_id=None, upstream_rpc_urls=(), fork_block_number=None, effective_fork_url=None, proxy=None, _proxy_managed=True)
- close(log_level=None, block=True, block_timeout=30)
Close the background Anvil process.
If this instance owns the
RPCProxy(i.e. it was auto-created, not passed in by the caller), the proxy is shut down after Anvil exits and its per-provider statistics are logged.