create_lagoon_gmx_fork_env

Documentation for eth_defi.testing.gmx_lagoon.create_lagoon_gmx_fork_env function.

create_lagoon_gmx_fork_env(anvil_launch, *, forward_eth=False)

Initialise a Lagoon GMX test environment on a fixed-block fork.

Configure the mock oracle before deployment, then fund the Safe and create fresh Python adapters. Deployment installs the GMX collateral approvals. Fee-forwarding variants leave the Safe without native ETH so the manager must fund execution fees.

Parameters
  • anvil_launch (eth_defi.provider.anvil.AnvilLaunch) – Live fixed-block Anvil process with the token whales unlocked.

  • forward_eth (bool) – Enable manager-funded execution fees and leave the Safe at zero ETH.

Returns

Deployed environment. Caller must restore EVM state between sharers.

Return type

eth_defi.testing.gmx_lagoon.LagoonGMXForkEnv

See Anvil fork documentation.