deploy_automated_lagoon_vault
Documentation for eth_defi.erc_4626.vault_protocol.lagoon.deployment.deploy_automated_lagoon_vault function.
- deploy_automated_lagoon_vault(*, web3, deployer, asset_manager, parameters, safe_owners, safe_threshold, uniswap_v2, uniswap_v3, orderly_vault=None, aave_v3=None, cowswap=False, any_asset=False, etherscan_api_key=None, verifier=None, verifier_url=None, use_forge=False, between_contracts_delay_seconds=45.0, erc_4626_vaults=None, guard_only=False, existing_vault_address=None, existing_safe_address=None, vault_abi='lagoon/v0.5.0/Vault.json', factory_contract=True, from_the_scratch=False, assets=None)
Deploy a full Lagoon setup with a guard.
Lagoon automatised vault consists of
Safe multisig - we use 1.4.1 here
Vault module
Lagoon protocol smart contracts
TradingStrategyModuleV0 module enabling guarded automated trade executor for the Safe
For roles - Asset manager (Trading Straegy) and Valuation Manager (Lagoon) are the same role - Any Safe must be deployed as 1-of-1 deployer address multisig and multisig holders changed after the deployment.
Warning
Because we need to mix Forge, Safe lib and Web3.py transaction nonce management becomes a madness.
Note
Deployer account must be manually removed from the Safe by new owners.
- Parameters
guard_only (bool) – Deploy a new version of the guard smart contract and skip deploying the actual vault.
from_the_scratch (bool) –
Need to deloy a fee registry contract as well.
A new chain deployment.
web3 (web3.main.Web3) –
deployer (eth_account.signers.local.LocalAccount | eth_defi.hotwallet.HotWallet) –
asset_manager (eth_typing.evm.HexAddress) –
parameters (eth_defi.erc_4626.vault_protocol.lagoon.deployment.LagoonDeploymentParameters) –
safe_owners (list[Union[eth_typing.evm.HexAddress, str]]) –
safe_threshold (int) –
uniswap_v2 (eth_defi.uniswap_v2.deployment.UniswapV2Deployment | None) –
uniswap_v3 (eth_defi.uniswap_v3.deployment.UniswapV3Deployment | None) –
orderly_vault (eth_defi.orderly.vault.OrderlyVault | None) –
aave_v3 (eth_defi.aave_v3.deployment.AaveV3Deployment | None) –
cowswap (bool) –
any_asset (bool) –
etherscan_api_key (str) –
verifier (Optional[Literal['etherscan', 'blockscout', 'sourcify', 'oklink']]) –
verifier_url (str | None) –
erc_4626_vaults (list[eth_defi.erc_4626.vault.ERC4626Vault] | None) –
existing_vault_address (Optional[Union[eth_typing.evm.HexAddress, str]]) –
existing_safe_address (Optional[Union[eth_typing.evm.HexAddress, str]]) –
assets (list[Union[eth_typing.evm.HexAddress, str]] | None) –
- Return type
eth_defi.erc_4626.vault_protocol.lagoon.deployment.LagoonAutomatedDeployment