fund_lagoon_vault
Documentation for eth_defi.erc_4626.vault_protocol.lagoon.funding.fund_lagoon_vault function.
- fund_lagoon_vault(web3, vault_address, asset_manager, test_account_with_balance, trading_strategy_module_address, amount=Decimal('500'), nav=Decimal('0'), hot_wallet=None, token_cache=None)
Fund a Lagoon Safe through the complete ERC-7540 subscription lifecycle.
The asset manager posts the valuations and settles the subscription. The depositor approves and requests the deposit, then claims its Lagoon shares after settlement.
HotWalletmode signs all calls for mainnet deployment; the unlocked-account fallback is retained for Anvil tests. A zeronavidentifies initial funding and causes the required first zero valuation to be posted; a non-zeronavassumes the vault has already been activated.- Parameters
web3 (web3.main.Web3) – Web3 connection to the vault chain.
vault_address (eth_typing.evm.HexAddress) – Onchain Lagoon vault address.
asset_manager (eth_typing.evm.HexAddress) – Address allowed to post valuation and settle the vault.
test_account_with_balance (eth_typing.evm.HexAddress) – Depositor holding the underlying token.
trading_strategy_module_address (eth_typing.evm.HexAddress) – TradingStrategyModuleV0 address used for settlement.
amount (decimal.Decimal) – Human-readable underlying-token subscription amount.
nav (decimal.Decimal) – Human-readable NAV posted for settlement.
hot_wallet (Optional[eth_defi.hotwallet.HotWallet]) – Optional signer for a real deployment.
token_cache (Optional[eth_defi.token.TokenDiskCache]) – Optional ERC-20 metadata cache.
- Returns
Noneafter settlement and share claim complete.- Return type
None