erc_4626.vault_protocol.lagoon.testing
Documentation for eth_defi.erc_4626.vault_protocol.lagoon.testing Python module.
Lagoon unit test helpers.
Functions
|
Force settling of the Lagoon vault. |
|
Make sure vault has some starting balance in the unit testing. |
- fund_lagoon_vault(web3, vault_address, asset_manager, test_account_with_balance, trading_strategy_module_address, amount=Decimal('500'), nav=Decimal('0'))
Make sure vault has some starting balance in the unit testing.
Used in unit testing to prepare the vault for a test trade to have some capital
- Parameters
web3 (web3.main.Web3) –
vault_address (eth_typing.evm.HexAddress) –
asset_manager (eth_typing.evm.HexAddress) –
test_account_with_balance (eth_typing.evm.HexAddress) –
trading_strategy_module_address (eth_typing.evm.HexAddress) –
- force_lagoon_settle(vault, asset_manager, raw_nav=None, gas_limit=15000000)
Force settling of the Lagoon vault.
Used in the testing to move the vault to the next epoch
- Parameters
asset_manager (eth_typing.evm.HexAddress) – Spoofed account in Anvil
vault (eth_defi.erc_4626.vault_protocol.lagoon.vault.LagoonVault) –
raw_nav (int) –
gas_limit (int) –