Sol.College

Structure lesson (licence does not allow quoting code)

Winnrdotfun-protocol

Original
Winnrdotfun/protocol
SuperStack fork
Blockchains/Winnrdotfun-protocol @ 61ac381
Stars
0
Last push (original)
2025-05-30
Languages
TypeScript, Rust, Shell
Detected stack
Anchor
Categories
Other
Licence
none detected: code not quoted on Sol.College

Architecture

47 source files. By extension: .ts ×27, .rs ×20.

Top-level directorySource files
tests21
programs20
scripts5
migrations1

On-chain programs: programs/protocol

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
init_token_accountsInitTokenAccountsprograms/protocol/src/lib.rs:25
resolve_token_draft_contestResolveTokenDraftContestprograms/protocol/src/lib.rs:62
claim_token_draft_contestClaimTokenDraftContestprograms/protocol/src/lib.rs:66
withdraw_feeWithdrawFeeprograms/protocol/src/lib.rs:70
delegate_erDelegateErprograms/protocol/src/lib.rs:74
resolve_token_draft_contest_erResolveTokenDraftContestErprograms/protocol/src/lib.rs:78
resolve_token_draft_contestResolveTokenDraftContestprograms/protocol/src/instructions/resolve.rs:40
resolve_token_draft_contest_erResolveTokenDraftContestErprograms/protocol/src/instructions/resolve_er.rs:57
withdraw_feeWithdrawFeeprograms/protocol/src/instructions/withdraw_fee.rs:50
claim_token_draft_contestClaimTokenDraftContestprograms/protocol/src/instructions/claim.rs:65
init_configInitConfigsprograms/protocol/src/instructions/initialize.rs:67
delegate_erDelegateErprograms/protocol/src/instructions/delegate_er.rs:29
post_token_draft_contest_pricesPostTokenDraftContestPricesprograms/protocol/src/instructions/post_prices.rs:23

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
tests/helpers/contest.tsPublicKey, Program, Keypair, findProgramAddressSync, TransactionMessage, VersionedTransaction
tests/helpers/index.tsPublicKey, findProgramAddressSync, AnchorProvider, Program, createMint, Connection
tests/initialize.test.tsPublicKey, findProgramAddressSync, AnchorProvider, Program, createMint, getLatestBlockhash
tests/enter.test.tsPublicKey, AnchorProvider, Program, findProgramAddressSync, Keypair, Transaction
tests/svm/enter.test.tsPublicKey, Program, findProgramAddressSync, Keypair, TransactionMessage, VersionedTransaction
tests/svm/create.test.tsPublicKey, AnchorProvider, Program, findProgramAddressSync, Keypair
tests/create.test.tsPublicKey, AnchorProvider, Program, findProgramAddressSync, Keypair
tests/withdrawFee.test.tsPublicKey, AnchorProvider, Program, Keypair, requestAirdrop
tests/claim.test.tsPublicKey, AnchorProvider, Program, Keypair, findProgramAddressSync
tests/svm/initialize.test.tsPublicKey, findProgramAddressSync, Program, Keypair, getLatestBlockhash, TransactionMessage
tests/svm/claim.test.tsPublicKey, Program, Keypair, findProgramAddressSync, TransactionMessage, VersionedTransaction
tests/svm/postPrices.test.tsPublicKey, AnchorProvider, Program, TransactionMessage, Keypair, VersionedTransaction

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/winnrdotfun-protocol/. 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 lint
.anchor build
.anchor test
.anchor run create
.anchor run deploy-init
.anchor run init
.anchor run test
.anchor run test2
.cargo build
.cargo test

What you could build from it