Sol.College

Structure lesson (licence does not allow quoting code)

Jason_Sol_1Q24

Original
Web3-Builders-Alliance/Jason_Sol_1Q24
SuperStack fork
Blockchains/Jason_Sol_1Q24 @ a5b580c
Stars
0
Last push (original)
2024-04-04
Languages
TypeScript, Rust
Detected stack
AnchorMetaplexweb3.js
Categories
Other
Licence
none detected: code not quoted on Sol.College

Architecture

104 source files. By extension: .rs ×59, .ts ×45.

Top-level directorySource files
Lectures79
Capstone12
workshops8
PreReq5

On-chain programs: Capstone/cap-project/programs/cap-project, Lectures/AdditionalWork/escrow/programs/escrow, Lectures/amm/programs/amm, Lectures/escrow/programs/escrow, Lectures/marketplace/programs/marketplace, Lectures/sol_dice_game/programs/sol_dice_game, Lectures/vault/programs/vault, workshops/programs/escrow

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
make_contractMakeCapstone/cap-project/programs/cap-project/src/lib.rs:15
revoke_contractRevokeCapstone/cap-project/programs/cap-project/src/lib.rs:20
applicationApplicateCapstone/cap-project/programs/cap-project/src/lib.rs:24
acceptapplicationAcceptApplicationCapstone/cap-project/programs/cap-project/src/lib.rs:28
claimClaimCapstone/cap-project/programs/cap-project/src/lib.rs:32
initializeInitializeLectures/marketplace/programs/marketplace/src/lib.rs:18
handlerInitializeLectures/marketplace/programs/marketplace/src/instructions/initialize.rs:6
initializeInitializeLectures/sol_dice_game/programs/sol_dice_game/src/lib.rs:13
make_escrowMakeLectures/AdditionalWork/escrow/programs/escrow/src/lib.rs:12
refund_escrowRefundLectures/AdditionalWork/escrow/programs/escrow/src/lib.rs:18
take_escrowTakeLectures/AdditionalWork/escrow/programs/escrow/src/lib.rs:23
handlerInitializeLectures/amm/programs/amm/src/instructions/initialize.rs:56
make_escrowMakeLectures/escrow/programs/escrow/src/lib.rs:14
refund_escrowRefundLectures/escrow/programs/escrow/src/lib.rs:20
take_escrowTakeLectures/escrow/programs/escrow/src/lib.rs:25
depositDepositLectures/vault/programs/vault/src/lib.rs:11
cancelCancelLectures/vault/programs/vault/src/lib.rs:33
claimClaimLectures/vault/programs/vault/src/lib.rs:57
makeMakeworkshops/programs/escrow/src/lib.rs:14

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
Capstone/cap-project/tests/cap-project.tsPublicKey, findProgramAddressSync, SystemProgram, Keypair, Program, requestAirdrop
Lectures/amm/tests/amm.tsPublicKey, getAssociatedTokenAddressSync, createMint, mintTo, findProgramAddressSync, SystemProgram
Lectures/vault/tests/vault.tsPublicKey, SystemProgram, findProgramAddressSync, Keypair, Program, requestAirdrop
Lectures/AdditionalWork/escrow/tests/escrow.tsSystemProgram, getAssociatedTokenAddressSync, Keypair, Program, PublicKey, Transaction
Lectures/escrow/tests/escrow.tsSystemProgram, getAssociatedTokenAddressSync, Keypair, Program, PublicKey, Transaction
PreReq/airdrop/transfer.tsTransaction, transfer, SystemProgram, sendAndConfirmTransaction, Connection, Keypair
Lectures/vault/programs/vault/src/lib.rsseeds, transfer, CpiContext, Program, Pubkey, has_one
Lectures/solana-starter/ts/prereqs/transfer.tstransfer, SystemProgram, Transaction, Connection, Keypair, sendAndConfirmTransaction
Lectures/solana-starter/ts/cluster1/vault_deposit_nft.tsPublicKey, Connection, Keypair, Program, AnchorProvider, findProgramAddressSync
Lectures/solana-starter/ts/cluster1/vault_withdraw_nft.tsPublicKey, Connection, Keypair, Program, AnchorProvider, findProgramAddressSync
workshops/programs/escrow/src/context/donate.rstransfer, seeds, Program, CpiContext, init_if_needed
Lectures/solana-starter/ts/prereqs/enroll.tsConnection, Keypair, SystemProgram, PublicKey, Program, AnchorProvider

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/jason-sol-1q24/. 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
Capstone/cap-projectnpm run lint
Lectures/marketplacenpm run lint
Lectures/sol_dice_gamenpm run lint
Lectures/ammnpm run lint
Lectures/escrownpm run lint
Lectures/vaultnpm run lint
workshopsnpm run lint
Capstone/cap-projectanchor build
Capstone/cap-projectanchor test
Capstone/cap-projectanchor run test
Lectures/marketplaceanchor build
Lectures/marketplaceanchor test
Lectures/marketplaceanchor run test
Lectures/sol_dice_gameanchor build
Lectures/sol_dice_gameanchor test
Lectures/sol_dice_gameanchor run test

What you could build from it