VaultProperty
Documentation for eth_defi.vault_report.charts.VaultProperty Python class.
- class VaultProperty
Bases:
objectA vault property shown under the vault name: its curator, protocol or chain.
Properties are drawn in the order curator, protocol, chain, each with its own icon, see
add_property_rows(). They are made byeth_defi.vault_report.report.make_vault_properties(), which leaves out a curator or chain that repeats the protocol, and their logos are then replaced with trimmed ones bytrim_logos(). Used in the performance chart legends, the inflows and outflows chart and, rasterised, the hero image.Attributes summary
Label text, e.g.
Logo data URI, see
eth_defi.vault_report.logos, orNoneto draw the text onlyLogo width divided by its height, after
trim_logos()removes its marginsDrawn icon width and height in pixels.
Methods summary
__init__(text[, logo_uri, logo_aspect])- text: str
Label text, e.g.
Steakhouse Financial,MorphoorBase
- logo_uri: Optional[str]
Logo data URI, see
eth_defi.vault_report.logos, orNoneto draw the text only
- logo_aspect: float
Logo width divided by its height, after
trim_logos()removes its margins
- property icon_size: tuple[float, float]
Drawn icon width and height in pixels.
Icons are
PROPERTY_ICON_SIZEtall; wide logos are scaled down to at mostPROPERTY_MAX_ICON_ASPECTtimes that width. Sizing the box to the trimmed logo’s own shape, rather than drawing every logo in a square, puts every icon the same distance from its text. Wordmark-like logos are capped, so they do not dominate the row.