build_metadata_json
Documentation for eth_defi.vault.protocol_metadata.build_metadata_json function.
- build_metadata_json(yaml_path, public_url)
Build a VaultProtocolMetadata dict from a YAML file.
Reads the YAML metadata, adds logo URLs based on available formatted logos, and ensures all fields are present (with None for missing values).
- Parameters
yaml_path (pathlib.Path) – Path to the protocol metadata YAML file
public_url (str) – Public base URL for constructing logo URLs (e.g., “https://pub-xyz.r2.dev”)
- Returns
Complete VaultProtocolMetadata dict ready for JSON export
- Return type