Skip to content

feat(progress): fix #93 reset player level#190

Merged
Petah1 merged 1 commit into
scout-off:mainfrom
Vicky08100:feature/issue-93-reset-player-level
Jun 1, 2026
Merged

feat(progress): fix #93 reset player level#190
Petah1 merged 1 commit into
scout-off:mainfrom
Vicky08100:feature/issue-93-reset-player-level

Conversation

@Vicky08100
Copy link
Copy Markdown

Closes #93

Fixes #93 by adding an admin-only dispute resolution flow for resetting a player's progress level. The progress contract can now set a player to any target tier, preserve the existing progress history, append a new reset history entry, and emit a player_level_reset event so off-chain indexers can track the dispute action. This matters because fraudulent or mistaken milestone approvals can now be corrected without deleting audit history.

Changed

  • Added reset_player_level(env, player_id, target_level) to the progress contract.
  • Appended a new ProgressEntry for resets instead of deleting existing history.
  • Added player_level_reset event with player_id, old_level, and target_level.
  • Reused shared history-write logic for level advancement and admin resets.
  • Added unit coverage for successful admin reset, emitted event, preserved history, and unauthorized reset.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 31, 2026

@Vicky08100 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Petah1 Petah1 merged commit c34f3da into scout-off:main Jun 1, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add reset_player_level admin function for dispute resolution

2 participants