Smart Contracts
All Pachinko smart contracts are currently deployed on Solana devnet for active testing. Program IDs listed on this page are devnet addresses and will change for mainnet launch.
This page is the canonical source of truth for program IDs and deployment network. Other docs link back here instead of repeating addresses.
Deployed Contracts
Core Platform (Devnet)
| Contract | Program ID | Description |
|---|---|---|
| Unified Wallet | 9LkwNkyFM2D4gvjBCRxqiZ8PgxeMvTBgUSMwpyvDC42V | Player balance management |
| Blockpad Game | fCGi2QxYkHH4A79sHUbtzB5DDASpSgd5WLvUPsthwSU | Tile betting game logic |
| Lotto Lottery | 2SyVdy5osy3LsUMZauMkfKb1zY6gigXRQhjS73LBh8aS | Lottery game mechanics |
| Megablock Jackpot | TBA | Progressive jackpot system (not yet deployed) |
Token Contracts
| Contract | Address | Description |
|---|---|---|
| PACHI Token | TBA | Native utility token |
| Staking Contract | TBA | Token staking rewards |
External Integrations
| Service | Program ID | Purpose |
|---|---|---|
| ORAO VRF | VRFzZoJdhFWL8rkvu87LpKM3RbcVezpMEc6X5GVDr7y | Verifiable random function |
Contract Architecture
Verification
How to Verify Transactions
- Find transaction on pachinko.fun history
- Copy transaction ID
- View on Solscan:
https://solscan.io/tx/{TX_ID} - Verify program ID matches our deployed contracts
- Check instruction data for expected parameters
Solscan Links
| Contract | Solscan Link |
|---|---|
| Unified Wallet | View on Solscan |
| Blockpad | View on Solscan |
| ORAO VRF | View on Solscan |
Security
Audit Status
| Contract | Auditor | Status | Report |
|---|---|---|---|
| Unified Wallet | Pending | In Progress | - |
| Blockpad | Pending | In Progress | - |
| Lotto | Pending | In Progress | - |
Security Features
| Feature | Implementation |
|---|---|
| Non-Custodial | Users maintain wallet control |
| PDA Security | Program Derived Addresses for fund safety |
| Immutable Logic | Core game logic cannot be modified |
| Transparent | All transactions visible on-chain |
| VRF Verified | Randomness from ORAO oracle network |
Technical Specifications
Unified Wallet Account Structure
rust
pub struct UnifiedPlayerAccount {
pub owner: Pubkey, // Wallet owner
pub balance: u64, // SOL balance (lamports)
pub token_balance: u64, // SPL token balance
pub total_deposited: u64, // Lifetime deposits
pub total_withdrawn: u64, // Lifetime withdrawals
pub blockpad_stats: BlockpadStats,
pub lottery_stats: LotteryStats,
pub referral_stats: ReferralStats,
pub referrer: Option<Pubkey>, // Referrer address
pub bump: u8, // PDA bump seed
}Blockpad Round Structure
rust
pub struct BlockpadRound {
pub round_id: u64, // Unique round identifier
pub start_time: i64, // Unix timestamp
pub end_time: i64, // Round end timestamp
pub total_pool: u64, // Total bets (lamports)
pub tile_bets: [u64; 25], // Bets per tile
pub winning_tile: Option<u8>, // VRF result (0-24)
pub vrf_seed: [u8; 32], // ORAO VRF seed
pub status: RoundStatus, // Active/Resolved
}API Endpoints
WebSocket Events
| Event | Description |
|---|---|
round_start | New Blockpad round begins |
bet_placed | Player places a bet |
round_end | Round timer expires |
vrf_result | VRF seed received |
winner_declared | Winning tile announced |
payout_complete | Winnings distributed |
REST Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/rounds/current | GET | Current round status |
/api/rounds/{id} | GET | Historical round data |
/api/player/{wallet} | GET | Player statistics |
/api/verify/{tx} | GET | Transaction verification |
Developer Resources
SDKs & Libraries
| Resource | Link | Description |
|---|---|---|
| Solana Web3.js | npm | Solana JavaScript SDK |
| Anchor | anchor-lang.com | Solana framework |
| ORAO SDK | GitHub | VRF integration |
Integration Example
typescript
import { Connection, PublicKey } from '@solana/web3.js';
// Contract addresses
const UNIFIED_WALLET = new PublicKey('9LkwNkyFM2D4gvjBCRxqiZ8PgxeMvTBgUSMwpyvDC42V');
const BLOCKPAD = new PublicKey('fCGi2QxYkHH4A79sHUbtzB5DDASpSgd5WLvUPsthwSU');
// Derive player PDA
const [playerPDA] = PublicKey.findProgramAddressSync(
[Buffer.from('player'), walletAddress.toBuffer()],
UNIFIED_WALLET
);Related Pages
- Security - Truly Fair and Verifiable
- Unified Wallet - Balance management
- Blockpad - Game mechanics
- Lotto - Lottery mechanics
