Doodle Trivia is a blockchain-based quiz application that leverages the immutability and transparency of smart contracts to create a fair and permanent trivia game. Built with Solidity, this dApp ensures that all quiz questions and player scores are stored on-chain, making them tamper-proof and verifiable by anyone.
Perfect for developers learning Web3, educators creating decentralized learning platforms, or anyone interested in blockchain gaming!
Github Link-https://github.com/Ayush2004codex/workshop-doodle-trivia
Project Link-Network: Celo Sepolia Testnet
Contract Address: 0x545663B9F0E06F0c0fBCf77A69675dd1F4283353
https://celo-sepolia.blockscout.com/address/0x545663B9F0E06F0c0fBCf77A69675dd1F4283353
Quiz Creators to add multiple-choice questions with correct answers stored securely on-chain
Players to participate in quizzes and have their scores permanently recorded on the blockchain
Everyone to view leaderboards and verify scores transparently without any central authority
Immutable quiz question and scoring record
🎯 What It Does
Doodle Trivia allows:
Quiz Creators to add multiple-choice questions with correct answers stored securely on-chain
Players to participate in quizzes and have their scores permanently recorded on the blockchain
Everyone to view leaderboards and verify scores transparently without any central authority
All interactions happen through smart contract functions, making the entire system trustless and decentralized.
✨ Features
🔐 Immutable Question Storage
Questions are stored permanently on the blockchain
Once added, they cannot be modified or deleted
Ensures fairness and prevents cheating
📝 Multiple Choice Questions
Support for any number of answer options
Flexible question format
Owner-controlled question management
🏆 Automated Scoring System
Instant score calculation upon quiz submission
Scores automatically recorded on-chain
Timestamp tracking for each submission
📊 Public Leaderboard
View all players and their scores
Transparent and verifiable rankings
Community-driven competition
👤 Player Score History
Each player's performance is permanently recorded
Includes score, total questions answered, and timestamp
Retrievable by anyone at any time
🔒 Owner-Only Question Management
Only the contract deployer can add questions
Prevents unauthorized modifications
Maintains quiz integrity
🚀 Deployed Smart Contract
Network: Celo Sepolia Testnet
Contract Address: 0x545663B9F0E06F0c0fBCf77A69675dd1F4283353
🔗 View on BlockScout
📋 Smart Contract Functions
For Quiz Owners:
addQuestion(string _questionText, string[] _options, uint256 _correctAnswerIndex)
Add a new question to the quiz with multiple choice options.
For Players:
submitQuiz(uint256[] _answers)
Submit your answers and get your score recorded on-chain.
View Functions:
getQuestion(uint256 _questionId) // View question and options
getPlayerScore(address _player) // Check a player's score
getLeaderboard(uint256 _limit) // View top players
getPlayerCount() // Total number of players
India