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
Returns

Existing or newly deployed baseline for this fork.

Return type

eth_defi.testing.gmx_lagoon.LagoonGMXForkEnv