Description
The README describes a winner claim flow, but the current contract exposes distribute_prize() and sends the prize directly once the giveaway becomes claimable. Add an explicit winner-driven claim flow with clearer lifecycle semantics.
User Story
As a Winner,
I want to claim my prize explicitly,
so that giveaway completion matches the product flow and supports future claim windows or proof steps.
Requirements and Context
- Files / refs:
contracts/geev-core/src/giveaway.rs, contracts/geev-core/src/test.rs, contracts/README.md
- Add
claim_prize behavior that requires winner authentication
- Distinguish winner selection from prize claiming in status transitions
- Migrate or replace the current
distribute_prize() path with explicit claim semantics
- Preserve fee accounting and reputation updates
Suggested Implementation
1. Keep pick_winner focused on selecting the winner and setting Claimable state
2. Add claim_prize(winner, giveaway_id)
3. Require winner auth before transferring net prize
4. Mark giveaway Completed only after successful claim
Acceptance Criteria
Submission Guidelines
- Branch:
feat/giveaway-claim-flow
- Depends on: None
- PR:
feat(giveaway): add explicit winner claim lifecycle
Description
The README describes a winner claim flow, but the current contract exposes
distribute_prize()and sends the prize directly once the giveaway becomes claimable. Add an explicit winner-driven claim flow with clearer lifecycle semantics.User Story
As a Winner,
I want to claim my prize explicitly,
so that giveaway completion matches the product flow and supports future claim windows or proof steps.
Requirements and Context
contracts/geev-core/src/giveaway.rs,contracts/geev-core/src/test.rs,contracts/README.mdclaim_prizebehavior that requires winner authenticationdistribute_prize()path with explicit claim semanticsSuggested Implementation
Acceptance Criteria
Submission Guidelines
feat/giveaway-claim-flowfeat(giveaway): add explicit winner claim lifecycle