def serialize(self) -> Dict[str, Any]: return { 'address': self.address, 'pool_address': self.pool_address, 'token0': serialize_ethereum_token(self.token0), 'token1': serialize_ethereum_token(self.token1), 'events': [event.serialize() for event in self.events], 'profit_loss0': str(self.profit_loss0), 'profit_loss1': str(self.profit_loss1), 'usd_profit_loss': str(self.usd_profit_loss), }
def serialize(self) -> Dict[str, Any]: return { 'asset': serialize_ethereum_token(self.asset), 'total_amount': self.total_amount, 'user_balance': self.user_balance.serialize(), 'usd_price': self.usd_price, }
def serialize(self) -> Dict: return { 'token': serialize_ethereum_token(self.token), 'total_amount': self.total_amount, 'user_balance': self.user_balance.serialize(), 'usd_price': self.usd_price, 'weight': self.weight, }
def serialize(self) -> Dict: return { 'token': serialize_ethereum_token(self.token), 'weight': str(self.weight), }