deploy_lagoon
Documentation for eth_defi.erc_4626.vault_protocol.lagoon.deployment.deploy_lagoon function.
- deploy_lagoon(web3, deployer, safe, asset_manager, parameters, owner, gas=2000000, etherscan_api_key=None, use_forge=False, beacon_proxy=False, factory_contract=True, beacon_address='0x652716FaD571f04D26a3c8fFd9E593F17123Ab20', beacon_proxy_factory_address=None, beacon_proxy_factory_abi='lagoon/BeaconProxyFactory.json', vault_abi='lagoon/v0.5.0/Vault.json', deploy_fee_registry=True, fee_registry_address=None, legacy=False, salt=b'\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01', optin_proxy_delay=259200)
Deploy a new Lagoon vault.
Create a new Safe
Create a new Lagoon vault
Set guard policies
Set owership
For Foundry recipe see https://github.com/hopperlabsxyz/lagoon-v0/blob/main/script/deploy_vault.s.sol
- Parameters
deployer (eth_account.signers.local.LocalAccount | eth_defi.hotwallet.HotWallet) – The initial account used to deploy smart contracts
owner (Optional[eth_typing.evm.HexAddress]) –
All transfership is transferred to this user after.
Usually defaults to newly deployed Safe the vault is associated with.
asset_manager (eth_typing.evm.HexAddress) – Able to perform trades, valuations
beacon_address – Vault beacon on base.
use_forge – Deploy a new vault contract from source with Forge and Etherscan verification.
etherscan_api_key (str) – For Forge.
vault_abi –
Which Lagoon vault version we deploy.
Use “lagoon/Vault.json” for the legacy version. Warning: unsafe.
beacon_proxy – TODO
deploy_fee_registry (bool) –
Deploy a fee registry contract needed for deployment.
Set the fee receiver as the owner.
web3 (web3.main.Web3) –
safe (safe_eth.safe.safe.Safe) –
parameters (eth_defi.erc_4626.vault_protocol.lagoon.deployment.LagoonDeploymentParameters) –
fee_registry_address (Optional[eth_typing.evm.HexAddress]) –
legacy (bool) –
- Returns
Vault contract.
Is a proxy contract.
- Return type
web3.contract.contract.Contract