Sol.College

Structure lesson (licence does not allow quoting code)

BlinkPot

Original
hsyndeniz/BlinkPot
SuperStack fork
Blockchains/BlinkPot @ 94d53f9
Stars
0
Last push (original)
2026-05-11
Languages
TypeScript, Rust, CSS, JavaScript
Detected stack
@solana/kitAnchorNext.jsweb3.js
Categories
Other
Licence
none detected: code not quoted on Sol.College
Homepage
https://blinkpot.io/

Architecture

259 source files. By extension: .ts ×126, .tsx ×103, .rs ×29, .js ×1.

Top-level directorySource files
app227
anchor29
(root)3

On-chain programs: anchor/programs/lottery, anchor/programs/vault

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_configInitializeConfiganchor/programs/lottery/src/lib.rs:23
update_configUpdateConfiganchor/programs/lottery/src/lib.rs:27
set_pausedAdminToggleanchor/programs/lottery/src/lib.rs:31
set_emergency_modeAdminToggleanchor/programs/lottery/src/lib.rs:35
enter_round_emergencyEnterRoundEmergencyanchor/programs/lottery/src/lib.rs:39
commit_drawCommitDrawanchor/programs/lottery/src/lib.rs:67
reveal_drawRevealDrawanchor/programs/lottery/src/lib.rs:71
claim_winningsClaimWinningsanchor/programs/lottery/src/lib.rs:75
lp_depositLpDepositanchor/programs/lottery/src/lib.rs:79
lp_initiate_withdrawLpInitiateWithdrawanchor/programs/lottery/src/lib.rs:83
lp_finalize_withdrawLpFinalizeWithdrawanchor/programs/lottery/src/lib.rs:87
claim_referral_feesClaimReferralFeesanchor/programs/lottery/src/lib.rs:91
cancel_subscriptionCancelSubscriptionanchor/programs/lottery/src/lib.rs:118
emergency_refund_ticketEmergencyRefundTicketanchor/programs/lottery/src/lib.rs:122
emergency_lp_withdrawEmergencyLpWithdrawanchor/programs/lottery/src/lib.rs:126
archive_roundArchiveRoundanchor/programs/lottery/src/lib.rs:130
initialize_configInitializeConfiganchor/programs/lottery/src/instructions/admin.rs:241
update_configUpdateConfiganchor/programs/lottery/src/instructions/admin.rs:292
set_pausedAdminToggleanchor/programs/lottery/src/instructions/admin.rs:313
set_emergency_modeAdminToggleanchor/programs/lottery/src/instructions/admin.rs:319
commit_drawCommitDrawanchor/programs/lottery/src/instructions/draw.rs:75
reveal_drawRevealDrawanchor/programs/lottery/src/instructions/draw.rs:176
enter_round_emergencyEnterRoundEmergencyanchor/programs/lottery/src/instructions/emergency.rs:67
emergency_refund_ticketEmergencyRefundTicketanchor/programs/lottery/src/instructions/emergency.rs:208
emergency_lp_withdrawEmergencyLpWithdrawanchor/programs/lottery/src/instructions/emergency.rs:380
archive_roundArchiveRoundanchor/programs/lottery/src/instructions/round.rs:333
cancel_subscriptionCancelSubscriptionanchor/programs/lottery/src/instructions/subscription.rs:664
claim_winningsClaimWinningsanchor/programs/lottery/src/instructions/claim.rs:119
claim_referral_feesClaimReferralFeesanchor/programs/lottery/src/instructions/referral.rs:119
lp_depositLpDepositanchor/programs/lottery/src/instructions/lp.rs:67

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
anchor/programs/lottery/tests/integration.rsPubkey, Keypair, Transaction, seeds
anchor/programs/lottery/src/instructions/subscription.rsseeds, Pubkey, Program, CpiContext, init_if_needed, has_one
anchor/programs/lottery/src/instructions/emergency.rsseeds, transfer, CpiContext, has_one, Program
anchor/programs/lottery/src/instructions/ticket.rsPubkey, seeds, CpiContext, AccountInfo, Program, init_if_needed
anchor/programs/lottery/src/instructions/lp.rsseeds, Program, CpiContext, has_one, init_if_needed, transfer
anchor/programs/lottery/src/instructions/round.rsseeds, Program, Pubkey, CpiContext, has_one, transfer
anchor/programs/lottery/src/events.rsPubkey
app/lib/lottery/addresses.tsseeds
anchor/programs/lottery/src/instructions/claim.rsseeds, Program, has_one, transfer, CpiContext, Pubkey
anchor/programs/lottery/src/instructions/referral.rsPubkey, seeds, Program, transfer, CpiContext
anchor/programs/lottery/src/instructions/admin.rsseeds, Program, has_one
app/lib/lottery/randomness.tsPublicKey, Connection, Keypair

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/blinkpot/. 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 dev
.npm run start
.npm run build
.npm run lint
.npm run deploy
anchoranchor build
anchoranchor test
anchoranchor run test

What you could build from it