LagoonGMXForkEnv

Documentation for eth_defi.testing.gmx_lagoon.LagoonGMXForkEnv Python class.

class LagoonGMXForkEnv

Bases: object

Components for real Lagoon/Safe and GMX fork integration checks.

Hold deployed addresses and fresh Python adapters together. Callers own process lifetime and must isolate EVM mutations between trading checks.

Attributes summary

web3

Fresh chain connection.

vault

Deployed Lagoon vault adapter.

lagoon_wallet

Wallet wrapping Safe transactions.

asset_manager_wallet

Signer with a synchronised nonce.

gmx_config

Configuration pointing at the Safe.

trading

Order construction and execution adapter.

positions

Position reader.

anvil_launch

Fork process owned by the caller.

deploy_info

Result of the underlying deployment.

Methods summary

__init__(web3, vault, lagoon_wallet, ...)

web3: web3.main.Web3

Fresh chain connection.

vault: eth_defi.erc_4626.vault_protocol.lagoon.vault.LagoonVault

Deployed Lagoon vault adapter.

lagoon_wallet: eth_defi.gmx.lagoon.wallet.LagoonGMXTradingWallet

Wallet wrapping Safe transactions.

asset_manager_wallet: eth_defi.hotwallet.HotWallet

Signer with a synchronised nonce.

gmx_config: eth_defi.gmx.config.GMXConfig

Configuration pointing at the Safe.

trading: eth_defi.gmx.trading.GMXTrading

Order construction and execution adapter.

positions: eth_defi.gmx.core.open_positions.GetOpenPositions

Position reader.

anvil_launch: eth_defi.provider.anvil.AnvilLaunch

Fork process owned by the caller.

deploy_info: eth_defi.erc_4626.vault_protocol.lagoon.deployment.LagoonAutomatedDeployment

Result of the underlying deployment.

__init__(web3, vault, lagoon_wallet, asset_manager_wallet, gmx_config, trading, positions, anvil_launch, deploy_info)
Parameters
Return type

None