Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
8a8fba6
Anchor compatibility update
doctorsolana Jun 12, 2025
7e9cf71
recentplaysworks
doctorsolana Jun 12, 2025
6d48caa
updates
doctorsolana Jun 13, 2025
3965796
mintbonusfix
doctorsolana Jun 13, 2025
730cddd
fixed referral plugin
doctorsolana Jun 13, 2025
a6fce7d
everything works except for recent plays
doctorsolana Jun 13, 2025
d1930c3
package updates
doctorsolana Jun 16, 2025
5d78e8d
pnpm stuff
doctorsolana Jun 28, 2025
1fe3e2d
react 18 instead recentplays still dont work
doctorsolana Jul 2, 2025
10cd606
maybe fixed with new event stuff
doctorsolana Jul 2, 2025
e7d3584
react alignement
doctorsolana Jul 2, 2025
aa5d929
multiplayer package
doctorsolana Jul 9, 2025
3aaee9a
multiplyare package update and jackpot game scaffold
doctorsolana Jul 9, 2025
bc8dc49
small updates
doctorsolana Jul 9, 2025
f948d42
jackpot demo
doctorsolana Jul 9, 2025
100255c
more jackpot stuff messy code rn
doctorsolana Jul 10, 2025
ef9eb57
lil fixes
doctorsolana Jul 10, 2025
cbbda60
better jackpot
doctorsolana Jul 11, 2025
10a0dd7
plinko optimizations, loadingbar fix, marble game demo
doctorsolana Jul 12, 2025
27d7214
updaptes
doctorsolana Jul 14, 2025
4cb11b1
new program event logging, recent game fetching and stuff, jackpot al…
doctorsolana Jul 15, 2025
8c63fb0
jackpot is ready?
doctorsolana Jul 15, 2025
b7d009b
going to bed
doctorsolana Jul 16, 2025
4c68ab2
lots of fixes plus plinkrace
doctorsolana Jul 17, 2025
6c6aa90
plinko race is taking shape
doctorsolana Jul 18, 2025
5557ce8
deterministic seed try plinkorace
doctorsolana Jul 22, 2025
a50e4e0
program update new address, wager range, min/max bet, hard settle wit…
doctorsolana Jul 31, 2025
47f69a1
lots of updates, plinko etc metadata add etc
doctorsolana Aug 1, 2025
e207ba8
maybe some stupid fix
doctorsolana Aug 1, 2025
0c92c97
lil jackpot fix still gotta fix recent games and see why it spams rpc
doctorsolana Aug 1, 2025
d453dec
small fix
doctorsolana Aug 1, 2025
873f3a4
plinkorace updates
doctorsolana Aug 3, 2025
58a0b43
plinko updates
doctorsolana Aug 4, 2025
eb5f78c
more plinko stuff
doctorsolana Aug 5, 2025
9a1ace3
plinkorace node test thing
doctorsolana Aug 6, 2025
aaac151
test for explorer rpc
doctorsolana Aug 6, 2025
cc2fe27
vercel test
doctorsolana Aug 6, 2025
f7fb7bf
update
doctorsolana Aug 6, 2025
a459eaf
new test
doctorsolana Aug 6, 2025
4d47b98
rpc logging
doctorsolana Aug 6, 2025
f43f68b
rpc test
doctorsolana Aug 6, 2025
c34c891
wallet connection test
doctorsolana Aug 6, 2025
2e7e4ef
other fixes
doctorsolana Aug 6, 2025
3673d3c
any changes?
doctorsolana Aug 6, 2025
c8eb4bb
tsup test
doctorsolana Aug 6, 2025
57a438d
finally found the fucking bug going back to remove the dumb buttons
doctorsolana Aug 6, 2025
42f35e6
some plinko fixes and referral works
doctorsolana Aug 7, 2025
57a2bdb
plinkorace done?
doctorsolana Aug 8, 2025
53971ba
various little touches on plinkorace
doctorsolana Aug 8, 2025
d8e7d97
vsync independent
doctorsolana Aug 8, 2025
a847bc5
vsync indpenednt temporary devnet
doctorsolana Aug 8, 2025
fe7a1e5
devnet
doctorsolana Aug 8, 2025
4842089
allow real testing devnet
doctorsolana Aug 8, 2025
ff257ea
more specific game fetching options
doctorsolana Aug 10, 2025
e7fd1e3
plinkorace bug fixes
doctorsolana Aug 10, 2025
4d2067d
final updates before mainnet
doctorsolana Aug 11, 2025
09958a6
ready for main
doctorsolana Aug 11, 2025
90edc32
Merge branch 'main' into anchor-update
doctorsolana Aug 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
},
"dependencies": {
"@coral-xyz/anchor": "^0.27.0",
"@solana/spl-token": "^0.3.8",
"@solana/web3.js": "^1.73.5",
"@coral-xyz/anchor": "^0.31.1",
"@solana/spl-token": "^0.4.13",
"@solana/web3.js": "^1.95.4",
"apicache": "^1.6.3",
"cors": "^2.8.5",
"dotenv": "^16.0.3",
Expand Down
5 changes: 5 additions & 0 deletions apps/explorer/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Web3 connection
VITE_RPC_ENDPOINT="https://mainnet.helius-rpc.com/?api-key=373105b2-df11-4381-bea4-e9aecdda396e"
VITE_GAMBA_API_ENDPOINT="api.gamba.so"
VITE_HELIUS_API_KEY="373105b2-df11-4381-bea4-e9aecdda396e"

8 changes: 4 additions & 4 deletions apps/explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
},
"dependencies": {
"@coral-xyz/anchor": "^0.27.0",
"@coral-xyz/anchor": "^0.31.1",
"@preact/signals-react": "^1.3.8",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-navigation-menu": "^1.1.4",
Expand All @@ -18,7 +18,7 @@
"@radix-ui/react-tooltip": "^1.0.7",
"@radix-ui/themes": "^1.1.2",
"@solana/spl-token": "^0.3.8",
"@solana/wallet-adapter-react": "^0.15.35",
"@solana/wallet-adapter-react": "^0.15.39",
"@solana/wallet-adapter-react-ui": "^0.9.34",
"@solana/wallet-adapter-wallets": "^0.19.18",
"@solana/web3.js": "^1.98.2",
Expand Down Expand Up @@ -46,8 +46,8 @@
"zustand": "^4.4.1"
},
"devDependencies": {
"@types/react": "^18.2.22",
"@types/react-dom": "^18.0.11",
"@types/react": "^18.2.13",
"@types/react-dom": "^18.2.4",
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"@vitejs/plugin-react": "^3.1.0",
Expand Down
3 changes: 2 additions & 1 deletion apps/explorer/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ function Root() {
],
[],
)



return (
<Theme accentColor="iris" radius="large" panelBackground="translucent">
<BrowserRouter>
Expand Down
4 changes: 4 additions & 0 deletions apps/platform/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Web3 connection
VITE_RPC_ENDPOINT="https://devnet.helius-rpc.com/?api-key=7b05747c-b100-4159-ba5f-c85e8c8d3997"
# VITE_HELIUS_API_KEY=""
# VITE_REAL_PLAYS_DISABLED=true
16 changes: 9 additions & 7 deletions apps/platform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,24 @@
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
},
"dependencies": {
"@coral-xyz/anchor": "^0.27.0",
"@coral-xyz/anchor": "^0.31.1",
"@solana/spl-token": "^0.4.13",
"@solana/web3.js": "^1.98.2",
"@preact/signals-react": "^1.3.8",
"@react-three/drei": "^9.89.0",
"@react-three/fiber": "^8.15.11",
"@solana/spl-token": "^0.3.8",
"@solana/wallet-adapter-react": "^0.15.35",
"@solana/wallet-adapter-react": "^0.15.39",
"@solana/wallet-adapter-react-ui": "^0.9.34",
"@solana/wallet-adapter-wallets": "^0.19.18",
"@solana/web3.js": "^1.93.0",
"@vercel/kv": "^3.0.0",
"buffer": "^6.0.3",
"@gamba-labs/multiplayer-sdk": "workspace:*",
"gamba-core-v2": "workspace:*",
"gamba-react-ui-v2": "workspace:*",
"gamba-react-v2": "workspace:*",
"html2canvas": "^1.4.1",
"matter-js": "^0.19.0",
"matter-js": "^0.20.0",
"framer-motion": "^12.16.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.10.0",
Expand All @@ -34,8 +36,8 @@
"zustand": "^4.4.1"
},
"devDependencies": {
"@types/react": "^18.2.22",
"@types/react-dom": "^18.0.11",
"@types/react": "^18.2.13",
"@types/react-dom": "^18.2.4",
"@types/matter-js": "^0.19.5",
"@types/three": "^0.161.2",
"@vitejs/plugin-react": "^3.1.0",
Expand Down
Binary file added apps/platform/public/games/jackpot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/platform/public/games/plinkorace.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 41 additions & 32 deletions apps/platform/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
import React from 'react'
import { Route, Routes, useLocation } from 'react-router-dom'
import { useWalletModal } from '@solana/wallet-adapter-react-ui'
import { GambaUi } from 'gamba-react-ui-v2'
import { useTransactionError } from 'gamba-react-v2'
import React from 'react'
import { Route, Routes, useLocation } from 'react-router-dom'

import { Modal } from './components/Modal'
import { TOS_HTML, ENABLE_TROLLBOX } from './constants'
import { useToast } from './hooks/useToast'
import { useUserStore } from './hooks/useUserStore'

import Dashboard from './sections/Dashboard/Dashboard'
import Game from './sections/Game/Game'
import Header from './sections/Header'
import RecentPlays from './sections/RecentPlays/RecentPlays'
import Toasts from './sections/Toasts'
import { MainWrapper, TosInner, TosWrapper } from './styles'
import TrollBox from './components/TrollBox'

import { MainWrapper, TosInner, TosWrapper } from './styles'

/* -------------------------------------------------------------------------- */
/* Helpers */
/* -------------------------------------------------------------------------- */

function ScrollToTop() {
const { pathname } = useLocation()
React.useEffect(() => window.scrollTo(0, 0), [pathname])
Expand All @@ -23,63 +30,65 @@ function ScrollToTop() {

function ErrorHandler() {
const walletModal = useWalletModal()
const toast = useToast()
const [error, setError] = React.useState<Error>()

useTransactionError(
(error) => {
if (error.message === 'NOT_CONNECTED') {
walletModal.setVisible(true)
return
}
toast({ title: '❌ Transaction error', description: error.error?.errorMessage ?? error.message })
},
)
const toast = useToast()

return (
<>
{error && (
<Modal onClose={() => setError(undefined)}>
<h1>Error occured</h1>
<p>{error.message}</p>
</Modal>
)}
</>
)
// React‑state not needed; let Toasts surface details
useTransactionError((err) => {
if (err.message === 'NOT_CONNECTED') {
walletModal.setVisible(true)
} else {
toast({
title: '❌ Transaction error',
description: err.error?.errorMessage ?? err.message,
})
}
})

return null
}

/* -------------------------------------------------------------------------- */
/* App */
/* -------------------------------------------------------------------------- */

export default function App() {
const newcomer = useUserStore((state) => state.newcomer)
const set = useUserStore((state) => state.set)
const newcomer = useUserStore((s) => s.newcomer)
const set = useUserStore((s) => s.set)

return (
<>
{/* onboarding / ToS */}
{newcomer && (
<Modal>
<h1>Welcome</h1>
<TosWrapper>
<TosInner dangerouslySetInnerHTML={{ __html: TOS_HTML }} />
</TosWrapper>
<p>
By playing on our platform, you confirm your compliance.
</p>
<p>By playing on our platform, you confirm your compliance.</p>
<GambaUi.Button main onClick={() => set({ newcomer: false })}>
Acknowledge
</GambaUi.Button>
</Modal>
)}

<ScrollToTop />
<ErrorHandler />

<Header />
<Toasts />

<MainWrapper>
<Routes>
<Route path="/" element={<Dashboard />} />
<Route path="/:gameId" element={<Game />} />
{/* Normal landing page always shows Dashboard (with optional inline game) */}
<Route path="/" element={<Dashboard />} />
{/* Dedicated game pages */}
<Route path="/:gameId" element={<Game />} />
</Routes>

<h2 style={{ textAlign: 'center' }}>Recent Plays</h2>
<RecentPlays />
</MainWrapper>

{ENABLE_TROLLBOX && <TrollBox />}
</>
)
Expand Down
11 changes: 9 additions & 2 deletions apps/platform/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ export const EXPLORER_URL = 'https://explorer.gamba.so'
export const PLATFORM_SHARABLE_URL = 'play.gamba.so'

// Creator fee (in %)
export const PLATFORM_CREATOR_FEE = 0.01 // 1% !!max 5%!!
export const PLATFORM_CREATOR_FEE = 0.01 // 1% !!max 7%!!

export const MULTIPLAYER_FEE = 0.01 // 1%

// Jackpot fee (in %)
export const PLATFORM_JACKPOT_FEE = 0.001 // 0.1%
export const PLATFORM_JACKPOT_FEE = 0.001 // 0.1%, not jackpot game specific, but platform wide

// Referral fee (in %)
export const PLATFORM_REFERRAL_FEE = 0.0025 // 0.25%
Expand Down Expand Up @@ -109,3 +111,8 @@ export const TOKEN_METADATA_FETCHER = (

export const ENABLE_LEADERBOARD = true
export const ENABLE_TROLLBOX = false // Requires setup in vercel (check tutorial in discord)

/** If true, the featured game is fully playable inline on the dashboard */
export const FEATURED_GAME_INLINE = false
export const FEATURED_GAME_ID: string | undefined = 'jackpot' // ← put game id or leave undefined

Loading