protocolmon / on-chain-battles

Smart contracts + CLI for fully on-chain monster battles
https://polychainmonsters.com
Apache License 2.0
3 stars 0 forks source link

Integrate new leaderboards into frontend (data fetching only) #17

Open onchainguy-btc opened 7 months ago

onchainguy-btc commented 7 months ago

First step to get the new leaderboards into the frontend is to provide the hooks we need to make that possible. The frontend should not only display the currently active leaderboard in the next version but also should allow the user to check e.g. past event leaderboards. That's why I suggest the following:

  1. For testing purposes deploy the whole contract suite with the new leaderboards.
  2. Play a few battles that should appear in different leaderboards (a battle will always only be counted in the active leaderboard)

Then I suggest we actually switch from reading the leaderboard data thought RPCs directly (see src/hooks/chain/battle/leaderboard/useLeaderboard.ts). Instead we should switch to using the graph for that. Here it might make sense to work on #16 in the same step.