# AUTOGENERATED! DO NOT EDIT! File to edit: ../src/price.ipynb.

# %% auto 0
__all__ = ['Price']

# %% ../src/price.ipynb 3
from dataclasses import dataclass
from .token import Token

# %% ../src/price.ipynb 4
@dataclass(frozen=True)
class Price:
    """Data class for Token Price

    based on:
    https://github.com/velodrome-finance/oracle/blob/main/contracts/VeloOracle.sol
    """

    token: Token
    price: float

    @property
    def pretty_price(self) -> float: return round(self.price, 5)
