Skip to content

LadderMine/scavenger-hunt-contract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scavenger Hunt — Smart Contracts

Smart contracts powering the on-chain game logic for the scavenger hunt. This includes puzzle management, player progress, NFT rewards, challenge management, referral rewards, zero-knowledge proof verification, and real-time event emission.

Contracts

Contract Description
PuzzleNFT ERC-721 NFT minting and management for puzzle rewards
PuzzleSystem Core puzzle mechanics — solving, scoring, state management
SystemIntegration Coordinates interactions between all contracts
challenge_manager Creates, manages, and tracks on-chain challenges
game_management Top-level game state, seasons, and configuration
nft_rewards NFT reward distribution logic for completed challenges
player_progress Tracks per-player puzzle completions and scores
puzzle_event_emitter Emits events for puzzle and challenge actions
referral_rewarder Manages referral codes and distributes referral rewards
social_metadata Stores social/profile metadata linked to players
zk_verifier Verifies zero-knowledge proofs for solution submissions

Getting Started

Prerequisites

  • Scarb (Cairo package manager)

Build

scarb build

Running Tests

snforge test

Project Structure

src/
├── lib.cairo                   # Module declarations
├── PuzzleNFT.cairo             # NFT contract
├── PuzzleSystem.cairo          # Core puzzle logic
├── SystemIntegration.cairo     # Cross-contract coordinator
├── challenge_manager.cairo     # Challenge lifecycle
├── game_management.cairo       # Game state & seasons
├── nft_rewards.cairo           # Reward distribution
├── player_progress.cairo       # Player on-chain progress
├── puzzle_event_emitter.cairo  # Event emission
├── referral_rewarder.cairo     # Referral rewards
├── social_metadata.cairo       # Player social data
└── zk_verifier.cairo           # ZK proof verification

tests/
├── test_challenge_manager.cairo
├── test_game_management.cairo
├── test_nft_rewards.cairo
├── test_player_progress.cairo
├── test_puzzle_system.cairo
├── test_referral_rewarder.cairo
├── test_system_integration.cairo
└── test_zk_proof.cairo

Related Repositories

License

MIT

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages