setup_guard
Documentation for eth_defi.lagoon.deployment.setup_guard function.
- setup_guard(*, web3, safe, deployer, owner, asset_managers, vault, module, broadcast_func, any_asset=False, uniswap_v2=None, uniswap_v3=None, aave_v3=None, erc_4626_vaults=None, cowswap=False, velora=False, gmx_deployment=None, cctp_deployment=None, hypercore_vaults=None, hack_sleep=20.0, assets=None, multicall_chunk_size=40, underlying_token_address=None)
Setups up TradingStrategyModuleV0 guard on the Lagoon vault.
Creates the guard smart contract (TradingStrategyModuleV0) and enables it on the Safe multisig as a module.
Runs through various whitelisting rules as transactions against this contract
- Parameters
vault (web3.contract.contract.Contract | None) – The deployed Lagoon vault contract.
Noneon satellite chains.underlying_token_address (Optional[eth_typing.evm.HexAddress]) – Underlying token address for Hypercore whitelisting when vault is None.
web3 (web3.main.Web3) –
safe (safe_eth.safe.safe.Safe) –
deployer (eth_defi.hotwallet.HotWallet) –
owner (eth_typing.evm.HexAddress) –
asset_managers (list[eth_typing.evm.HexAddress] | tuple[eth_typing.evm.HexAddress, ...]) –
module (web3.contract.contract.Contract) –
broadcast_func (Callable[[web3.contract.contract.ContractFunction], hexbytes.main.HexBytes]) –
any_asset (bool) –
uniswap_v2 (eth_defi.uniswap_v2.deployment.UniswapV2Deployment | None) –
uniswap_v3 (eth_defi.uniswap_v3.deployment.UniswapV3Deployment | None) –
aave_v3 (eth_defi.aave_v3.deployment.AaveV3Deployment | None) –
erc_4626_vaults (list[eth_defi.erc_4626.vault.ERC4626Vault] | None) –
cowswap (bool) –
velora (bool) –
gmx_deployment (eth_defi.gmx.whitelist.GMXDeployment | None) –
cctp_deployment (eth_defi.cctp.whitelist.CCTPDeployment | None) –
hypercore_vaults (list[Union[eth_typing.evm.HexAddress, str]] | None) –
assets (list[Union[eth_typing.evm.HexAddress, str]] | None) –
- Returns
List of
WhitelistEntryrecording everything that was whitelisted.- Return type
list[eth_defi.erc_4626.vault_protocol.lagoon.deployment.WhitelistEntry]