📜 Table of Contents / 目录
A Web3-powered BlackJack game built with React, Next.js, Wagmi, Viem, RainbowKit, and TailwindCSS.
Players connect their wallet on the Sepolia testnet, play BlackJack, and mint an NFT when reaching 1000 points.
- 🎮 Play BlackJack directly in the browser
- 🔗 Wallet connection via RainbowKit
- ⚡ Built with modern Web3 stack: React + Next.js + Wagmi + Viem
- 🎨 Styled with TailwindCSS
- 🌐 Runs on the Sepolia test network
- 🏆 Mint an NFT after reaching 1000 points
- React
- Next.js
- Wagmi
- Viem
- RainbowKit
- TailwindCSS
| Home Page | Gameplay | NFT Minting |
|---|---|---|
![]() |
![]() |
![]() |
git clone https://github.com/iruochen/web3-blackjack.git
cd blackjack-web3
pnpm install
pnpm devCreate .env.local in the project root and set:
NEXT_PUBLIC_WC_PROJECT_ID=
NEXT_TELEMETRY_DISABLED=1
AWS_USER_ACCESS_KEY_ID=
AWS_USER_ACCESS_KEY=
JWT_SECRET=
ETHEREUM_PROVIDER_SEPOLIA=
AWS_API_KEY=
EVM_PRIVATE_KEY=
NEXT_PUBLIC_CONTRACT_ADDRESS=
NEXT_PUBLIC_CONTRACT_ABI=
- Connect wallet (MetaMask or RainbowKit)
- Switch to Sepolia network
- Play BlackJack to earn points
- Mint NFT when reaching 1000 points
- Minted via Sepolia smart contract
- Requires 1000 game points
- Executed through connected wallet transaction
MIT License
基于 React、Next.js、Wagmi、Viem、RainbowKit 和 TailwindCSS 的 Web3 二十一点游戏。
玩家可连接钱包到 Sepolia 测试网,玩二十一点并在达到 1000 分后铸造 NFT。
- 🎮 浏览器中直接玩二十一点
- 🔗 使用 RainbowKit 连接钱包
- ⚡ 采用现代 Web3 技术栈:React + Next.js + Wagmi + Viem
- 🎨 使用 TailwindCSS 美化界面
- 🌐 运行于 Sepolia 测试网络
- 🏆 达到 1000 分后可铸造 NFT
- React
- Next.js
- Wagmi
- Viem
- RainbowKit
- TailwindCSS
| 首页 | 游戏中 | NFT 铸造 |
|---|---|---|
![]() |
![]() |
![]() |
git clone https://github.com/iruochen/web3-blackjack.git
cd blackjack-web3
pnpm install
pnpm dev在项目根目录新建 .env.local 并设置:
NEXT_PUBLIC_WC_PROJECT_ID=
NEXT_TELEMETRY_DISABLED=1
AWS_USER_ACCESS_KEY_ID=
AWS_USER_ACCESS_KEY=
JWT_SECRET=
ETHEREUM_PROVIDER_SEPOLIA=
AWS_API_KEY=
EVM_PRIVATE_KEY=
NEXT_PUBLIC_CONTRACT_ADDRESS=
NEXT_PUBLIC_CONTRACT_ABI=
- 连接钱包(MetaMask 或 RainbowKit)
- 切换到 Sepolia 网络
- 玩二十一点累积分数
- 达到 1000 分点击铸造 NFT
- 通过 Sepolia 智能合约铸造
- 需要 1000 分游戏积分
- 交易通过连接的钱包发起
MIT 许可证



