OSRS Private Server with Solana GP Token Integration
ChainScape is a browser-based RuneScape private server (2009 era, pre-EoC with HD graphics) where GP (gold pieces) is backed 1:1 by a Solana SPL token (CSGP). Players can deposit tokens (burned on-chain -> credited in-game) and withdraw GP (minted on-chain -> deducted in-game).
- Browser-based Play - No client download required, reducing friction for crypto users
- Full Vanilla Experience - All skills, quests, Grand Exchange, minigames
- 2009-era Content - HD graphics, pre-Evolution of Combat
- Solana Integration - 1 CSGP token = 1 GP, instant deposits and withdrawals
- Wallet Connect - Native Phantom/Solflare integration
┌─────────────────────────────────────────────────────────────────┐
│ BROWSER (No Download) │
│ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │
│ │ WebGL Renderer │ │ Game Logic │ │ Phantom/Solflare│ │
│ │ (ThreeJS) │ │ (TypeScript) │ │ Wallet Connect │ │
│ └────────┬────────┘ └────────┬────────┘ └────────┬────────┘ │
│ └────────────────────┼────────────────────┘ │
└────────────────────────────────┼─────────────────────────────────┘
│ WebSocket
┌──────────────────┴──────────────────┐
│ Game Server (Java/Kotlin) │
│ Blockchain Bridge Service │
└──────────────────┬──────────────────┘
│
┌──────────────────┴──────────────────┐
│ Solana Blockchain │
│ CSGP Token (SPL) + Multisig │
└─────────────────────────────────────┘
chainscape/
├── web-client/ # Browser client (TypeScript/React)
├── game-server/ # 2009scape fork with blockchain extensions
├── blockchain-bridge/ # Solana bridge service (Java)
├── common/ # Shared DTOs and events
├── database/migrations/ # PostgreSQL schema
└── infrastructure/ # Docker, K8s configs
- Node.js 20+
- Java 17+
- Docker & Docker Compose
- PostgreSQL 15+
- Redis 7+
-
Clone the repository:
git clone https://github.com/your-org/chainscape.git cd chainscape -
Copy environment configuration:
cp .env.example .env # Edit .env with your configuration -
Start infrastructure services:
docker-compose -f infrastructure/docker/docker-compose.yml up -d postgres redis
-
Run database migrations:
psql -h localhost -U chainscape -d chainscape -f database/migrations/V001__initial_schema.sql
-
Start the game server:
cd game-server ./gradlew run -
Start the web client:
cd web-client npm install npm run dev -
Open http://localhost:3000 in your browser
# Build and deploy all services
docker-compose -f infrastructure/docker/docker-compose.yml up -d --build| Property | Value |
|---|---|
| Name | ChainScape Gold |
| Symbol | CSGP |
| Decimals | 6 |
| Initial Supply | 1,000,000,000 (1 billion) |
| Mint Authority | Squads Multisig |
Note: 1 CSGP = 1 GP. With 6 decimals, on-chain amounts are multiplied by 10^6.
# Install Solana CLI
sh -c "$(curl -sSfL https://release.solana.com/stable/install)"
# Create token with 6 decimals
spl-token create-token --decimals 6
# Create token account
spl-token create-account <TOKEN_MINT_ADDRESS>
# Mint initial supply (1 billion tokens = 1_000_000_000_000_000 smallest units)
spl-token mint <TOKEN_MINT_ADDRESS> 1000000000000000- Player requests their unique deposit address (generated per-account)
- Player sends CSGP tokens to their deposit address from any wallet
- Bridge service detects incoming tokens (2 confirmations)
- Sweep process:
- Fund deposit wallet with 0.001 SOL from treasury
- Transfer tokens to treasury
- Return SOL to treasury
- Credits equivalent GP to player's in-game account
- Player connects any Solana wallet in the UI
- Player requests withdrawal with amount
- Server validates balance, rate limits, fraud score
- Atomically debits GP
- Bridge mints tokens directly to player's connected wallet
- Multisig Mint Authority - 3-of-5 required for minting
- Atomic Operations - DB transactions with row-level locking
- Idempotency - Transaction signatures prevent double-processing
- Rate Limiting - 5 withdrawals/hour, 20/day
- Fraud Detection - Risk scoring based on patterns
- Reconciliation - Hourly GP vs token supply verification
- Circuit Breakers - Auto-pause on anomalies
| Command | Description |
|---|---|
::deposit |
Show your unique deposit address |
::withdraw <amount> <address> |
Withdraw GP to any Solana address |
::gpbalance |
Show GP balance breakdown |
::txhistory |
Show recent deposit/withdrawal history |
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
./gradlew testandnpm test - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
This is an educational project. RuneScape is a trademark of Jagex Ltd. This project is not affiliated with or endorsed by Jagex.