A blockchain-based 2048 game that integrates NFT minting and marketplace functionality, allowing players to mint their game achievements as NFTs and trade them in the marketplace.
- 🎮 Classic 2048 gameplay
- 🎨 Game achievement NFT minting system
- 💰 NFT marketplace for trading
- 🎁 Daily token airdrop rewards
- 📱 Responsive design for mobile devices
- 🔗 Ethereum-based smart contracts
-
Frontend:
- Next.js
- React
- TypeScript
- CSS Modules
- Ethers.js
-
Smart Contracts:
- Solidity
- ERC20 Token
- ERC721 NFT
- Marketplace Contract
- Clone the repository
git clone https://github.com/SuruiLiu/Gamefi-2048.git
cd Gamefi-2048
- Install dependencies
npm install
- Start development server
npm run dev
- Open http://localhost:3000 in your browser
Gamefi-2048/
├── components/ # React components
├── contracts/ # Smart contract files
├── styles/ # CSS style files
├── utils/ # Utility functions
├── pages/ # Next.js pages
└── public/ # Static assets
- Connect your MetaMask wallet
- Use arrow keys or swipe to move tiles
- Merge tiles with the same number
- Mint NFT when reaching target score
- Trade your NFTs in the marketplace
Note: All contracts are deployed on Sepolia testnet. Please make sure you have some Sepolia ETH in your wallet to receive daily airdrops and interact with the contracts.
- GameToken:
0x5d768b72b6a41cB84B021A169E0B77a7b6b06f49
- GameNFT:
0x37eAD756497bBc8e69a16DC260FaB698309b0067
- Marketplace:
0x3045e820CcF4059cE1747F033e8D6246F43850dB
You can get Sepolia testnet ETH from these faucets:
We welcome all forms of contributions, including but not limited to:
- Bug reports and feature requests
- Documentation improvements
- Bug fixes
- New features
- Performance optimizations
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- Follow Conventional Commits specification
- Write code in TypeScript
- Maintain consistent formatting (using Prettier)
- Ensure all tests pass
- Add necessary comments and documentation
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions or suggestions, feel free to reach out through:
- Opening an Issue
- Submitting a Pull Request
- Sending an email to [[email protected]]
- Thanks to all contributors
- Thanks to OpenZeppelin for secure smart contract libraries
- Inspired by the original 2048 game