merge_into_vault_database
Documentation for eth_defi.hibachi.vault_data_export.merge_into_vault_database function.
- merge_into_vault_database(db, vault_db_path)
Merge Hibachi vault metadata into an existing VaultDatabase pickle.
Reads the existing pickle, upserts Hibachi VaultRow entries (keyed by VaultSpec), and writes back. Idempotent: running twice produces the same result.
If the pickle file does not exist, creates a new VaultDatabase.
- Parameters
db (eth_defi.hibachi.daily_metrics.HibachiDailyMetricsDatabase) – The Hibachi daily metrics database.
vault_db_path (pathlib.Path) – Path to the VaultDatabase pickle file.
- Returns
The updated VaultDatabase.
- Return type