Sol.College

Structure lesson (licence does not allow quoting code)

FlashGame

Original
VitDavid10/FlashGame
SuperStack fork
Blockchains/FlashGame @ 05ead35
Stars
0
Last push (original)
2026-10-25
Languages
JavaScript, HTML, TypeScript, Rust, Python, Kotlin
Detected stack
Anchorweb3.js
Categories
Gaming
Licence
none detected: code not quoted on Sol.College

Architecture

174 source files. By extension: .js ×135, .tsx ×20, .py ×11, .rs ×4, .ts ×4.

Top-level directorySource files
tools48
server46
tests30
scripts27
game8
stress_bot4
programs4
(root)2

On-chain programs: programs/pill-custody, programs/pill-staking, programs/pill-treasury

How it works: instructions and accounts

Each instruction handler and the accounts struct it validates, found by reading the Rust source. Links go to the exact line at the pinned commit.

InstructionAccountsSource
initializeInitializeprograms/pill-staking/src/lib.rs:93
stakeStakeprograms/pill-staking/src/lib.rs:119
request_unstakeRequestUnstakeprograms/pill-staking/src/lib.rs:160
withdraw_unstakedWithdrawUnstakedprograms/pill-staking/src/lib.rs:189
claim_rewardsClaimRewardsprograms/pill-staking/src/lib.rs:222
compoundCompoundprograms/pill-staking/src/lib.rs:257
fund_rewardsFundRewardsprograms/pill-staking/src/lib.rs:303
transfer_authorityAuthorityOnlyprograms/pill-staking/src/lib.rs:343
accept_authorityAcceptAuthorityprograms/pill-staking/src/lib.rs:348
initializeInitializeprograms/pill-treasury/src/lib.rs:127
depositDepositprograms/pill-treasury/src/lib.rs:191
fundFundprograms/pill-treasury/src/lib.rs:215
withdrawWithdrawprograms/pill-treasury/src/lib.rs:245
sweepSweepprograms/pill-treasury/src/lib.rs:292
burnBurnFromCustodyprograms/pill-treasury/src/lib.rs:338
init_stakingInitStakingprograms/pill-treasury/src/lib.rs:382
stakeStakeprograms/pill-treasury/src/lib.rs:401
request_unstakeRequestUnstakeprograms/pill-treasury/src/lib.rs:443
withdraw_unstakedUnstakeprograms/pill-treasury/src/lib.rs:472
compound_stake_rewardsCompoundStakeRewardsprograms/pill-treasury/src/lib.rs:509
claim_stake_rewardsClaimStakeRewardsprograms/pill-treasury/src/lib.rs:548
fund_stake_rewardsFundStakeRewardsprograms/pill-treasury/src/lib.rs:587
cancel_roundCancelRoundprograms/pill-treasury/src/lib.rs:701
claimClaimprograms/pill-treasury/src/lib.rs:725
claim_to_stakeClaimToStakeprograms/pill-treasury/src/lib.rs:809
expire_roundExpireRoundprograms/pill-treasury/src/lib.rs:893
extend_lockAuthorityOnlyprograms/pill-treasury/src/lib.rs:920
tightenAuthorityOnlyprograms/pill-treasury/src/lib.rs:934
finalizeAuthorityOnlyprograms/pill-treasury/src/lib.rs:971
transfer_authorityAuthorityOnlyprograms/pill-treasury/src/lib.rs:985

Where the Solana code lives

Source files that import a Solana SDK, ranked by how many Solana APIs they use, with the APIs each one calls. Read them in this order to see how the app talks to the chain.

FileSolana APIs used
programs/pill-treasury/src/lib.rsseeds, Pubkey, Program, transfer, CpiContext, has_one
server/treasury-client.jsPublicKey, findProgramAddressSync, SystemProgram, getAssociatedTokenAddressSync
programs/pill-staking/src/lib.rsseeds, Pubkey, Program, has_one, transfer, CpiContext
server/solana.jsPublicKey, Connection, Transaction, transfer, sendAndConfirmTransaction, Keypair
server/staking-client.jsPublicKey, findProgramAddressSync, SystemProgram, getAssociatedTokenAddressSync, Pubkey
programs/pill-custody/src/lib.rsPubkey, seeds, Program, transfer, CpiContext, has_one
scripts/staking-prueba.jsgetAccountInfo, Keypair, SystemProgram, mintTo, Connection, PublicKey
tests/staking-client.test.jsKeypair, PublicKey, Pubkey, SystemProgram, getAssociatedTokenAddressSync, findProgramAddressSync
scripts/rewards-prueba.jsKeypair, PublicKey, transfer, Connection, Transaction, SystemProgram
tests/custody-client.test.jsKeypair, PublicKey, Pubkey, SystemProgram, getAssociatedTokenAddressSync, findProgramAddressSync
scripts/custody-prueba.jsKeypair, createMint, mintTo, Connection, PublicKey, Transaction
server/onchain.jsPublicKey, getAssociatedTokenAddressSync, getProgramAccounts, Connection

Dapp: devnet deploy pending

⏳ Devnet deploy pending — goes live when the devnet wallet is topped up. This fork's own dapp is not deployed yet, so there is no program address or transaction to show. It is queued in dapp-queue.txt; once devnet SOL is available it is deployed, exercised with real devnet transactions, and this section switches to the live dapp at /dapps/flashgame/. Until then, the lesson and step-by-step guide below are complete, and you can run it locally with the commands below.

How to run, build and test

These commands come from the repo's own manifests (package.json scripts, Anchor.toml, Cargo, go.mod, Makefile). Check the README for prerequisites and environment variables.

DirectoryCommandRuns
.npm run test
stress_botnpm run start
tools/origin-videonpm run dev
tools/origin-videonpm run build
tools/origin-videonpm run lint
.anchor build
.anchor test
.anchor run test
.cargo build
.cargo test

What you could build from it