hicommonwealth / commonwealth

A platform for decentralized communities
https://commonwealth.im
GNU General Public License v3.0
65 stars 38 forks source link

Resolve contest projection/query new UI requirements #7551

Closed Rotorsoft closed 2 weeks ago

Rotorsoft commented 2 weeks ago

Description

After conducting the initial round of testing, we have identified the following issues:

  1. Change payout_structure and prize_percentage types from double to integer from 0 to 100, to avoid rounding issues in UI
  2. Change prize in winners event to integer as defined in contracts
  3. When projecting contest manager creation events, we'll call a new helper in "protocol services" to get contract ticker and decimals using the token address. We'll store these new attributes in the contest manager projection (ticker string, decimals int)
  4. Query results will convert prizes to the token denomination by dividing prize by decimals. Will also include the new attributes in the query results.

Project Owner

@Rotorsoft

@ianrowan can you suggest a good descriptive name for decimals? ... it sounds too generic