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. Now supports multiple networks including Sepolia, Telos Testnet, and Avalanche Fuji, with unique NFT designs stored on IPFS.
- 🎮 Classic 2048 gameplay
- 🎨 Game achievement NFT minting system with unique designs
- 💰 NFT marketplace for trading
- 🌐 Multi-network support: Sepolia, Telos Testnet, Avalanche Fuji
- 🖼️ NFT images stored on IPFS
- 🎁 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
- GameToken:
0x09421D4e8594D3B19ABFc9c1C44096fa3BaAB6e1
- GameNFT:
0x459287afB0daf7e7FDCcA4bda08C8a5bd0BfE230
- Marketplace:
0x60cda54041199A7Fa74738053F6D78527A9120c6
- GameToken:
0x4A3Ec63705BB4BCcBaFcabfD8D7B6e9986082489
- GameNFT:
0x63F6082C3B8193d43EE146d790DF30925442B645
- Marketplace:
0x459287afB0daf7e7FDCcA4bda08C8a5bd0BfE230
- Legendary:
https://ipfs.io/ipfs/bafybeicc4xossvnz3acndhqw4zcs4xa2xgiyotpvb3ptishm75qtyeszwq
- Epic:
https://ipfs.io/ipfs/bafybeifh6ifdof7mee7rqkw355tnxh2qrlu2nudze7dhbbxeqcvpuele7q
- Rare:
https://ipfs.io/ipfs/bafybeiaf3fy7r2evvqlhqqpbwla3lsurie2h6cwanalp7fzpxn3cq7pwgy
- Common:
https://ipfs.io/ipfs/bafybeighwgusfefm23avzsxpaqbkacrqmywfunx3lx3nywmf23uwxvb45i
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 [lsruirui@163.com]
- Thanks to all contributors
- Thanks to OpenZeppelin for secure smart contract libraries
- Inspired by the original 2048 game