Blockchain Treasure Hunt
A decentralized treasure hunt game built on Base (Ethereum L2). Players dig on a 3x3 grid to find hidden treasure and win ETH prizes. Demonstrates full-stack blockchain development with smart contracts and Web3 frontend.
Web3 / BlockchainWeekend Project
💎 Treasure Hunt
?
?
?
?
💎
?
?
?
?
0.001 ETH per dig • Win 0.005 ETH
⚠️ Connect to Base Sepolia network
Technologies & Tools
Solidity
Hardhat
Next.js
TypeScript
Wagmi/Viem
Base L2
Built a complete decentralized application (dApp) from scratch, learning blockchain fundamentals, smart contract development, and Web3 frontend integration. The game features a trustless prize pool mechanism where all logic runs on-chain.
Blockchain Skills Gained
- •Smart Contracts: Wrote Solidity contracts with state management and events
- •Web3 Integration: Connected frontend using Wagmi/Viem and MetaMask
- •JSON-RPC: Frontend to blockchain node communication
- •ABI Encoding: Function call encoding/decoding
Technical Stack
- •Solidity for smart contract development
- •Hardhat for testing, compilation, and deployment
- •Next.js & TypeScript for the frontend
- •Wagmi/Viem for blockchain interactions
- •Base Sepolia testnet for deployment
Key Learnings
- •Blockchain data storage: Contract state variables act as a decentralized database replicated across all nodes
- •Transaction flow: From wallet signing to node validation to on-chain execution
- •Gas economics: Understanding costs for reads (free) vs writes (costs gas)
- •Layer 2 benefits: Using Base for faster and cheaper transactions while inheriting Ethereum security
Decentralized Architecture: No backend server needed! The smart contract IS the backend - it stores code, data, and handles all game logic. The frontend communicates directly with blockchain nodes via JSON-RPC.