Sol.College

Structure lesson (licence does not allow quoting code)

BlinkEsportsBetLive

Original
zhiming817/BlinkEsportsBetLive
SuperStack fork
Blockchains/BlinkEsportsBetLive @ 20b3320
Stars
0
Last push (original)
2026-05-11
Languages
TypeScript, JavaScript, Rust, CSS, Shell, HTML
Detected stack
@solana/kitAnchorweb3.js
Categories
Other
Licence
none detected: code not quoted on Sol.College

Architecture

143 source files. By extension: .tsx ×59, .rs ×36, .ts ×26, .js ×13, .jsx ×9.

Top-level directorySource files
code143

On-chain programs: code/blink_bet_contract/programs/blink_bet_contract

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
initialize_configInitializeConfigcode/blink_bet_contract/programs/blink_bet_contract/src/lib.rs:17
place_betPlaceBetcode/blink_bet_contract/programs/blink_bet_contract/src/lib.rs:29
settle_matchSettleMatchcode/blink_bet_contract/programs/blink_bet_contract/src/lib.rs:33
claim_prizeClaimPrizecode/blink_bet_contract/programs/blink_bet_contract/src/lib.rs:37
handlerInitializeConfigcode/blink_bet_contract/programs/blink_bet_contract/src/instructions/initialize_config.rs:19
handlerClaimPrizecode/blink_bet_contract/programs/blink_bet_contract/src/instructions/claim_prize.rs:30
handlerSettleMatchcode/blink_bet_contract/programs/blink_bet_contract/src/instructions/settle_match.rs:20
handlerPlaceBetcode/blink_bet_contract/programs/blink_bet_contract/src/instructions/place_bet.rs:28

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
code/dapp/src/utils/contractUtils.tsPublicKey, Program, AnchorProvider, Connection, findProgramAddressSync
code/dapp/src/components/MatchDetail.jsxPublicKey, findProgramAddressSync, SystemProgram, Transaction, sendTransaction, AnchorProvider
code/dapp/src/utils/solanaContractUtils.jsPublicKey, sendTransaction, Program, Transaction, getLatestBlockhash, Connection
code/mobile/BlinkBetLive-app/app/prediction-detail.tsxPublicKey, Program, SystemProgram, findProgramAddressSync, Transaction, signTransaction
code/mobile/BlinkBetLive-app/components/wallet/create-transaction.tsxVersionedTransaction, PublicKey, TransactionMessage, Connection, SystemProgram, transfer
code/blink_bet_contract/tests/blink_bet_contract.tsPublicKey, findProgramAddressSync, SystemProgram, Program, AnchorProvider
code/blink_bet_contract/scripts/init-match.tsProgram, PublicKey, findProgramAddressSync, Connection, Keypair, AnchorProvider
code/blink_bet_contract/scripts/test-claim.tsPublicKey, findProgramAddressSync, Program, Connection, Keypair, AnchorProvider
code/blink_bet_contract/scripts/init-devnet.tsProgram, PublicKey, findProgramAddressSync, SystemProgram, Connection, Keypair
code/blink_bet_contract/scripts/test-bet.tsProgram, PublicKey, findProgramAddressSync, Connection, Keypair, AnchorProvider
code/blink_bet_contract/scripts/test-settle.tsProgram, PublicKey, findProgramAddressSync, Connection, Keypair, AnchorProvider
code/backend/rust_backend/src/services/event_listener.rsPubkey, Program

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/blinkesportsbetlive/. 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
code/blink_bet_contractnpm run lint
code/dappnpm run dev
code/dappnpm run build
code/dappnpm run lint
code/blink_bet_contractanchor build
code/blink_bet_contractanchor test
code/blink_bet_contractanchor run test

What you could build from it