A fast-paced Web3 card-based autobattler built on the Ronin blockchain with trustless battle computation powered by Oasis ROFL (Runtime OFf-chain Logic).
- Type: 2-6 player competitive autobattler
- Match Duration: 10-15 minutes
- Platform: Ronin Chain (Web3)
- Target: ETHGlobal Buenos Aires Hackathon
- Status: ✅ Ready for ROFL Deployment & Testing
- Frontend: Next.js 15 (App Router), React 19, TypeScript
- Web3: RainbowKit 2.2, Wagmi 2.17, Viem
- Styling: Tailwind CSS 3.4
- State: Zustand + Immer
- Realtime: Socket.io
- Animations: Framer Motion
- Drag & Drop: react-dnd
- Smart Contracts: Solidity (Hardhat)
- Trustless Compute: Oasis ROFL (TEE-based battle resolution)
- Backend: Node.js + Express + Socket.io
- Node.js 20+
- npm or yarn
- WalletConnect Project ID (Get one here)
# Install dependencies
npm install
# Create environment file
cp .env.example .env.local
# Add your WalletConnect Project ID to .env.local
# NEXT_PUBLIC_WALLET_CONNECT_ID=your_project_id_here# Run both client and server
npm run dev:all
# Or run separately:
npm run dev # Frontend only (http://localhost:3000)
npm run server # Backend only (http://localhost:3001)Open http://localhost:3000 to see the app.
ronin-rumble/
├── app/ # Next.js App Router
│ ├── lobby/page.tsx # Matchmaking lobby
│ ├── match/[id]/page.tsx # Game match view
│ ├── page.tsx # Landing page
│ └── providers.tsx # Web3 providers
├── components/ # React components
│ ├── game/ # Game UI components
│ └── ui/ # Reusable UI components
├── contracts/ # Smart contracts
│ ├── RoninRumble1v1.sol # 1v1 match contract
│ ├── RoninRumbleMain.sol # Main match contract
│ └── test/ # Contract tests
├── server/ # Game server
│ ├── game/ # Game logic
│ │ ├── GameRoom.ts # Room management + ROFL routing
│ │ ├── MatchMaking.ts # Player matchmaking
│ │ └── CombatSimulator.ts # Battle simulation
│ └── services/ # Backend services
│ ├── ContractService.ts # Blockchain integration
│ └── ROFLClient.ts # ROFL service client
├── rofl-service/ # ROFL TEE service
│ ├── src/
│ │ ├── main.ts # HTTP server
│ │ ├── combat-service.ts # Battle + TEE signing
│ │ └── engine/ # Deterministic combat
│ ├── Dockerfile # Container definition
│ └── rofl.yaml # Oasis deployment config
├── lib/combat/ # Combat engine
│ ├── engine.ts # Core battle logic
│ ├── abilities.ts # Unit abilities
│ └── rng.ts # Deterministic RNG
├── hooks/ # React hooks
│ ├── useSocket.ts # WebSocket connection
│ └── useContract.ts # Smart contract interaction
└── docs/ # Documentation
├── ROFL_DEPLOYMENT_GUIDE.md # ROFL deployment
├── BLOCKCHAIN_INTEGRATION.md # Contract integration
└── ARCHITECTURE_REBUILD.md # Architecture overview
- Game Design Document - Complete game mechanics
- Unit Collection - All 30 units across 5 tiers
- ROFL Deployment Guide - Deploy to Oasis testnet
- ROFL Status - Current ROFL integration status
- Blockchain Integration - Smart contract integration
- Architecture Overview - System architecture
- Wallet Architecture - Wallet integration blueprint
- Quick Start: Blockchain - Get started with smart contracts
- Implementation Guide - Original development roadmap
- Project setup with RainbowKit
- Wallet connection + Ronin chain configuration
- Game state management (Zustand + Immer)
- All UI components (Card, Board, Shop, Timer, Stats, OpponentList)
- Custom hooks (useGame, useContract, useSocket)
- Landing page + Lobby + Match pages
- WebSocket server + GameRoom + Matchmaking
- Drag & drop system (react-dnd)
- Real-time multiplayer foundation
- ✅ Complete deterministic combat engine
- ✅ 30+ unit abilities implemented
- ✅ Smart contracts deployed on Ronin Testnet
- ✅ Shop generation & economy system
- ✅ Round management & state synchronization
- ✅ 1v1 & Main match contracts deployed
- ✅ Entry fee system with RON payments
- ✅ Prize distribution (91.7% winner, 8.3% platform)
- ✅ On-chain match state management
- ✅ Wallet-based player authentication
- ✅ ROFL service with TEE signing
- ✅ Docker containerization
- ✅ Local testing successful (93ms avg)
- ✅ Game server ROFL client integration
- ✅ Paid vs free match routing
- ⏳ Ready for Oasis Testnet deployment
The trustless battle computation service is containerized and tested locally:
- Local Endpoint: http://localhost:8000
- Performance: ~93ms battle computation
- Security: TEE-signed results with signature verification
- Status: ✅ Ready for Oasis Testnet deployment
RoninRumble1v1 Contract:
- Address:
0x4b3F7C33636B1b72312b32Bd1ba93A44D2f2a177 - Network: Ronin Testnet (Chain ID: 2021)
- Deployer:
0xfDF0e775aC0E946DC940e3ad301e1E64fc722C51 - Game Server:
0xfDF0e775aC0E946DC940e3ad301e1E64fc722C51
Entry Fees:
- Tier 1: 0.001 RON
- Tier 2: 0.005 RON
- Tier 3: 0.01 RON
Prize Distribution:
- Winner: 91.7%
- Platform Fee: 8.3%
Deployed: November 23, 2025
-
Deploy ROFL to Oasis Testnet
- Get testnet tokens: https://faucet.testnet.oasis.io/
- Wallet:
oasis1qzp50yuq8j5latfxc2gvgsxa756ja4lmdgvf5vtv - Follow guide:
ROFL_DEPLOYMENT_GUIDE.md
-
Test Paid Matches
- Create 1v1 matches with entry fees
- Verify ROFL battle computation
- Monitor TEE signing and verification
-
Production Deployment
- Deploy ROFL to Oasis mainnet
- Deploy contracts to Ronin mainnet
- Set up monitoring and analytics
- Ronin Testnet: Smart contracts, payments, wallet authentication
- Oasis Sapphire Testnet: ROFL trustless battle computation (TEE)
- Flare: On-chain RNG for shop generation and matchmaking
- Filecoin: Decentralized match replay storage
MIT
# Install dependencies
npm install
# Run full stack (frontend + backend)
npm run dev:all
# Run separately
npm run dev # Frontend (localhost:3000)
npm run server # Game server (localhost:3001)
# Smart contracts
npm run compile # Compile contracts
npm run test # Run contract tests
npm run deploy:1v1:testnet # Deploy 1v1 contract
npm run deploy:main:testnet # Deploy main contract
# ROFL service
cd rofl-service
docker build -t ronin-rumble-battle .
docker run -d -p 8000:3000 --env-file .env --name rofl-test ronin-rumble-battle-
Start all services:
npm run dev:all docker start rofl-test # If already built -
Create a 1v1 match with entry fee > 0
-
Monitor logs:
# Game server logs npm run server # ROFL container logs docker logs -f rofl-test
-
Verify ROFL usage in logs:
[ROFL] Match is a paid match - ROFL enabled [ROFL] Computing battle via ROFL [ROFL] Battle computed successfully
- Testnet Only: All contracts currently deployed to Ronin Testnet
- ROFL Local: ROFL service running locally, ready for Oasis deployment
- Entry Fees: Test with small amounts (0.001-0.01 RON)
- TEE Security: All paid match battles are signed by TEE for trustless verification
Built for ETHGlobal Buenos Aires
- Ronin Testnet Explorer: https://saigon-app.roninchain.com/
- Oasis ROFL Docs: https://docs.oasis.io/build/rofl/
- Oasis Faucet: https://faucet.testnet.oasis.io/
Last Updated: November 23, 2025 Generated with Claude Code