create_cached_lagoon_gmx_fork_env
Documentation for eth_defi.testing.gmx_lagoon.create_cached_lagoon_gmx_fork_env function.
- create_cached_lagoon_gmx_fork_env(anvil_launch, baselines)
Reuse a deployed baseline only for the exact live fork generation.
Check deployed code on hits in case another snapshot removed the baseline. A recycled fork can reuse its URL and eventually even its PID. Include the process creation time so stale contract addresses cannot survive a restart. Callers must snapshot EVM state and reset Python-side state for each test.
- Parameters
anvil_launch (eth_defi.provider.anvil.AnvilLaunch) – Liveness-checked pooled fork process.
baselines (dict[tuple[int, float], eth_defi.testing.gmx_lagoon.LagoonGMXForkEnv]) – Per-worker deployment cache, retaining only the current generation.
- Returns
Existing or newly deployed baseline for this fork.
- Return type