deploy_safe_trading_strategy_module
Documentation for eth_defi.erc_4626.vault_protocol.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
lagoonis true it linksLagoonLib, 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. Usedeploy_automated_lagoon_vault()for the public human-readable API, or callsetup_guard()with raw token units in lower-level integrations.- Parameters
deployer (Union[eth_account.signers.local.LocalAccount, eth_defi.hotwallet.HotWallet]) – Deployer account. When a
HotWalletis passed, nonces are managed internally (avoids stale RPC nonce reads on load-balanced public endpoints).use_forge – Deploy Etherscan verified build with Forge
enable_on_safe – Automatically enable this module on the Safe multisig. Must be 1-of-1 deployer address multisig.
lagoon (bool) – Deploy and link
LagoonLib. Satellite modules without a Lagoon vault link the zero address and fail closed on Lagoon calls.safe (safe_eth.safe.safe.Safe) –
etherscan_api_key (str) –
verifier (Optional[Literal['etherscan', 'blockscout', 'sourcify', 'oklink']]) –
uniswap_v2 (Optional[eth_defi.uniswap_v2.deployment.UniswapV2Deployment]) –
uniswap_v3 (Optional[eth_defi.uniswap_v3.deployment.UniswapV3Deployment]) –
cowswap (bool) –
velora (bool) –
gmx_deployment (Optional[eth_defi.gmx.whitelist.GMXDeployment]) –
lighter_deployment (Optional[eth_defi.lighter.deployment.LighterDeployment]) –
- Returns
TradingStrategyModuleV0 instance
- Return type
web3.contract.contract.Contract