Priority: Low
Estimated Time: 2 hours
Description:
There is no index mapping a player address to their match IDs. Frontends must scan all match IDs to find a player's matches, which is impractical at scale.
Tasks:
- Add
DataKey::PlayerMatches(Address) storing a Vec<u64> of match IDs
- Update
create_match to append the new match ID to both players' index entries
- Add
get_player_matches(env: Env, player: Address) -> Vec<u64> read function
- Add test asserting the index is populated correctly after match creation
Priority: Low
Estimated Time: 2 hours
Description:
There is no index mapping a player address to their match IDs. Frontends must scan all match IDs to find a player's matches, which is impractical at scale.
Tasks:
DataKey::PlayerMatches(Address)storing aVec<u64>of match IDscreate_matchto append the new match ID to both players' index entriesget_player_matches(env: Env, player: Address) -> Vec<u64>read function