BlockDare is a decentralized application (dApp) that lets users create, track, and complete personal or public challenges directly on the blockchain β ensuring transparency, immutability, and fair play.
Built with Solidity, Ethereum, and a focus on simplicity for beginner developers.
- π Immutable Records: All challenges are stored permanently on-chain.
- π§βπ€βπ§ Fair & Transparent: Every challenge is tied to its creatorβs wallet.
- β Completion Tracking: Only the creator can mark a challenge as completed.
- π Event Logging: Creation and completion events are emitted for off-chain tracking.
- π‘ Beginner-Friendly: Clean Solidity code with helpful comments.
-
Create a Challenge
Submit a short title and description.
The contract records your challenge with a timestamp and creator address. -
View Challenges
Anyone can view all challenges on-chain or query by ID. -
Complete a Challenge
Only the challenge creator can mark it as completed.
π Deploy Smart Contract Network:Celo Sepolia Testnet Verified Source : https://celo-sepolia.blockscout.com/address/0x7b0D9575Cfa6bc88249103c2c40Ee34B9B038d6F Contact Address : 0x7b0D9575Cfa6bc88249103c2c40Ee34B9B038d6F
Language: Solidity ^0.8.0
License: MIT
File: BlockDare.sol
| Function | Description |
|---|---|
createChallenge(string _title, string _description) |
Create a new challenge and store it permanently. |
completeChallenge(uint256 _id) |
Mark a challenge as completed (only creator can call). |
getChallenge(uint256 _id) |
Fetch challenge details by ID. |
getTotalChallenges() |
Returns total number of challenges created. |
# Clone the repository
git clone https://github.com/yourusername/blockdare.git
# Enter the project directory
cd blockdare
# Install dependencies (if using Hardhat)
npm install