Team DiceParty #6
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dice Party Demo Project for Monad Blitz Hackathon.
It's smart contract project use in Dice Party Game on WebGL.
GameReward is a Solidity smart contract designed for distributing native MON rewards directly to players, without relying on an external vault or GameBank.
It can be funded with MON (the native token on Monad) and allows players to claim rewards based on their rank after a game session.
Key Features
• Native MON Rewards – Rewards are distributed directly from the contract’s balance.
• Configurable Reward Table – Owner can set or update reward amounts for each rank.
• Multiple Funding Options – Fund the contract by sending MON directly or calling the fund() function with msg.value.
• Secure Claims – Players call claim(rank) to receive rewards; protected by ReentrancyGuard.
• Admin Tools – Owner can update rewards, set max rank, or withdraw excess MON (rescue).
• Events – Transparent logging for all claims, funding, and configuration changes.
Default Reward Table
• Rank 1 → 150 MON
• Rank 2 → 50 MON
• Rank 3 → 25 MON
Example Flow
1. Owner deploys the contract and funds it with MON.
2. Players call claim(rank) after a game ends, receiving their reward directly.
3. The contract emits RewardClaimed events for on-chain transparency.