fetch_lagoon_vault_metadata
Documentation for eth_defi.erc_4626.vault_protocol.lagoon.offchain_metadata.fetch_lagoon_vault_metadata function.
- fetch_lagoon_vault_metadata(web3, vault_address, now_=None, cache_path=PosixPath('/home/runner/.tradingstrategy/cache/lagoon'))
Fetch vault metadata from Lagoon’s offchain web app API.
Use both expiring in-process and disk caches to avoid repeated fetches
- Parameters
web3 (web3.main.Web3) – Web3 instance (used to get chain_id and checksum address)
vault_address (eth_typing.evm.HexAddress) – Vault contract address
now – Override the current naive UTC time for testing.
cache_path (pathlib.Path) – Directory containing Lagoon metadata cache files.
now_ (Optional[datetime.datetime]) –
- Returns
Metadata dict or None if the vault is not in Lagoon’s app database
- Return type
Optional[eth_defi.erc_4626.vault_protocol.lagoon.offchain_metadata.LagoonVaultMetadata]