We need contributors to design and implement from scratch the ScavengerHuntFactory contract in Cairo for StarkNet.
This contract will act as the central orchestrator for the NFT Scavenger Hunt Game — managing initialization, game creation, puzzle assignments, player registration, rewards distribution, and administrative controls (pause, maintenance, upgrades, etc.).
You will be responsible for writing all the code for the structs, interfaces, storage, events, and functions defined in the provided specification.
The current code snippet is purely a reference specification — it does not exist in the codebase yet. You will be implementing it from scratch.
Key Features to Implement
-
Structs & Storage
ContractAddresses to store addresses of dependent contracts (NFT rewards, game management, puzzle system, etc.).
SystemConfiguration for system status, pause/maintenance flags, version, and timestamps.
- Persistent storage for statistics, owner/admin roles, and emergency contacts.
-
Interface IScavengerHuntFactory
- System Initialization: Deploy & configure all related contracts.
- Game Flow: Create games, assign puzzles, allow players to join, submit answers, and claim rewards.
- Player Management: Register new players, retrieve dashboards, and list owned NFTs.
- System Queries: Fetch active games, available puzzles, leaderboard, and global stats.
- Admin Functions: Pause/unpause, enable/disable maintenance, upgrade system, emergency shutdown.
-
Events
- Must include detailed game lifecycle events (
SystemInitialized, GameCreated, PuzzleSolved, RewardsClaimed, etc.).
- All events must be fully typed according to StarkNet Cairo best practices.
-
Internal Logic
- Helper functions for cross-contract calls (game creation, puzzle retrieval, reward minting, player stats updates, etc.).
- Placeholder logic for deployment and inter-contract configuration (to be integrated later).
- Operational checks for system readiness and maintenance states.
Acceptance Criteria
✅ Full contract implementation in Cairo, following the given structure.
✅ All specified storage, structs, and events must be present.
✅ All IScavengerHuntFactory methods must be implemented.
✅ Placeholder addresses and mocked return values can be used for now — real integrations will be added later.
✅ Code should compile successfully with scarb and pass basic syntax/lint checks.
✅ Include docstrings explaining each public function’s purpose.
We need contributors to design and implement from scratch the
ScavengerHuntFactorycontract in Cairo for StarkNet.This contract will act as the central orchestrator for the NFT Scavenger Hunt Game — managing initialization, game creation, puzzle assignments, player registration, rewards distribution, and administrative controls (pause, maintenance, upgrades, etc.).
You will be responsible for writing all the code for the structs, interfaces, storage, events, and functions defined in the provided specification.
The current code snippet is purely a reference specification — it does not exist in the codebase yet. You will be implementing it from scratch.
Key Features to Implement
Structs & Storage
ContractAddressesto store addresses of dependent contracts (NFT rewards, game management, puzzle system, etc.).SystemConfigurationfor system status, pause/maintenance flags, version, and timestamps.Interface
IScavengerHuntFactoryEvents
SystemInitialized,GameCreated,PuzzleSolved,RewardsClaimed, etc.).Internal Logic
Acceptance Criteria
✅ Full contract implementation in Cairo, following the given structure.
✅ All specified storage, structs, and events must be present.
✅ All
IScavengerHuntFactorymethods must be implemented.✅ Placeholder addresses and mocked return values can be used for now — real integrations will be added later.
✅ Code should compile successfully with
scarband pass basic syntax/lint checks.✅ Include docstrings explaining each public function’s purpose.