deploy_safe_trading_strategy_module

Documentation for eth_defi.lagoon.deployment.deploy_safe_trading_strategy_module function.

deploy_safe_trading_strategy_module(web3, deployer, safe, use_forge=False, etherscan_api_key=None, verifier=None, verifier_url=None, enable_on_safe=True, uniswap_v2=None, uniswap_v3=None, cowswap=False, velora=False, gmx_deployment=None, lighter_deployment=None, lagoon=True)

Deploy TradingStrategyModuleV0 for Safe and Lagoon.

On HyperEVM chains, automatically enables big blocks only for the TradingStrategyModuleV0 deployment (~5.4M gas). Library deployments (CowSwapLib, GmxLib, HypercoreVaultLib, VeloraLib) fit in small blocks and are deployed without toggling.

This function only deploys and links the execution module. When lagoon is true it links LagoonLib, making settlement-safety calls available, but it does not know the vault, underlying asset, Silo or desired amount and therefore does not configure a limit. Use deploy_automated_lagoon_vault() for the public human-readable API, or call setup_guard() with raw token units in lower-level integrations.

Parameters
Returns

TradingStrategyModuleV0 instance

Return type

web3.contract.contract.Contract