Joystream / joystream

Joystream Monorepo
http://www.joystream.org
GNU General Public License v3.0
1.42k stars 115 forks source link

QN: Show DAO channel payout events for individual channels #4929

Open mochet opened 11 months ago

mochet commented 11 months ago

Background: https://github.com/Joystream/pioneer/issues/4560

Problem

Currently, it is not possible to see all the "channel payout" proposal events. The only information available is a very limited look at each proposal (via channelRewardClaimedEvents) which currently looks like this: data.channelPayoutsUpdatedEvents.id data.channelPayoutsUpdatedEvents.inBlock data.channelPayoutsUpdatedEvents.maxCashoutAllowed data.channelPayoutsUpdatedEvents.minCashoutAllowed data.channelPayoutsUpdatedEvents.payloadDataObject.id data.channelPayoutsUpdatedEvents.payloadSize data.channelPayoutsUpdatedEvents.payloadDataObjectId data.channelPayoutsUpdatedEvents.channelCashoutsEnabled
OLYMPIA-1793375-4 1793375 1.66667E+16 1666700000000 5667 687 5667 TRUE
OLYMPIA-2623137-8 2623137 30000000000000 1666700000000 22613 5279 22613 TRUE
OLYMPIA-3485580-8 3485580 40000000000000 1666700000000 140699 3284 140699 TRUE
The other option available is to show claimed rewards--the problem with this is that it doesn't show outstanding/unclaimed rewards or a total overview of rewards the DAO has made to channels. This is done via channelRewardClaimedEvents and currently looks like this: data.channelRewardClaimedEvents.amount data.channelRewardClaimedEvents.channel.title data.channelRewardClaimedEvents.channel.cumulativeRewardClaimed data.channelRewardClaimedEvents.channelId data.channelRewardClaimedEvents.inBlock
30000000000000 Cryptoria 30000000000000 21904 2708334
30000000000000 ZEFIRIUM 30000000000000 26053 2768361
30000000000000 CryptoNick 30000000000000 26057 2843053
30000000000000 LiteLiger 30000000000000 26072 2846925

Solution

Have the query node be able to show every channel that gets paid out by the DAO via channel payout proposals. Using this, someone should be able to discern the following:

  1. The total amount of channel rewards that the DAO has rewarded, whether they are claimed or unclaimed
  2. The total amount of claimed and unclaimed rewards that are outstanding
  3. A list of channels that have been rewarded and claimed rewards
  4. A list of channels that have been rewarded and unclaimed rewards