Sol.College

Structure lesson (licence does not allow quoting code)

HealthTrust-solana-program

HealthTrust smart contracts for the Solana Virtual Machine

Original
HealthTrust/solana-program
SuperStack fork
Blockchains/HealthTrust-solana-program @ cab7703
Stars
0
Last push (original)
2026-10-02
Languages
JavaScript, TypeScript, Rust, PowerShell
Detected stack
Anchor
Categories
Other
Licence
none detected: code not quoted on Sol.College

Architecture

40 source files. By extension: .rs ×30, .ts ×5, .js ×5.

Top-level directorySource files
programs30
scripts5
tests4
migrations1

On-chain programs: programs/data_registry, programs/healthtrust, programs/order_handler, programs/pricing_config

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
set_pausedAuthorizedRegistryActionprograms/data_registry/src/lib.rs:41
emergency_withdraw_solEmergencyWithdrawSolprograms/data_registry/src/lib.rs:52
upload_new_metaUploadNewMetaprograms/data_registry/src/lib.rs:56
close_data_entry_metaCloseDataEntryMetaprograms/data_registry/src/lib.rs:85
initialize_registryInitializeRegistryprograms/data_registry/src/instructions/admin.rs:7
set_pausedAuthorizedRegistryActionprograms/data_registry/src/instructions/admin.rs:44
emergency_withdraw_solEmergencyWithdrawSolprograms/data_registry/src/instructions/admin.rs:64
upload_new_metaUploadNewMetaprograms/data_registry/src/instructions/data_provider.rs:35
close_data_entry_metaCloseDataEntryMetaprograms/data_registry/src/instructions/data_provider.rs:232
initializeInitializeprograms/healthtrust/src/lib.rs:9
request_jobRequestJobprograms/order_handler/src/lib.rs:41
cancel_jobCancelJobprograms/order_handler/src/lib.rs:61
finalize_jobFinalizeJobprograms/order_handler/src/lib.rs:74
claim_payoutClaimPayoutprograms/order_handler/src/lib.rs:78
sweep_vault_dustSweepVaultDustprograms/order_handler/src/lib.rs:82
request_jobRequestJobprograms/order_handler/src/instructions/researcher.rs:11
cancel_jobCancelJobprograms/order_handler/src/instructions/researcher.rs:126
sweep_vault_dustSweepVaultDustprograms/order_handler/src/instructions/researcher.rs:146
claim_payoutClaimPayoutprograms/order_handler/src/instructions/provider.rs:8
finalize_jobFinalizeJobprograms/order_handler/src/instructions/rofl.rs:69

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/devnet-full-flow.tsPublicKey, Keypair, SystemProgram, getBalance, findProgramAddressSync, Program
tests/order-handler.tsPublicKey, Keypair, getBalance, SystemProgram, findProgramAddressSync, Program
tests/data-registry.tsPublicKey, SystemProgram, Keypair, findProgramAddressSync, Program, AnchorProvider
scripts/order-handler-cli.jsPublicKey, SystemProgram, getBalance, findProgramAddressSync, Keypair, Transaction
scripts/data-registry-cli.jsPublicKey, SystemProgram, findProgramAddressSync, getBalance, Keypair, Transaction
scripts/populate-data-registry.jsPublicKey, SystemProgram, findProgramAddressSync, Keypair, Program, getBalance
programs/pricing_config/src/lib.rsPubkey, seeds, Program, has_one, init_if_needed
programs/data_registry/src/contexts/data_provider.rsseeds, Program
scripts/read-data-registry.jsPublicKey, findProgramAddressSync, Program, AnchorProvider
programs/order_handler/src/contexts/researcher.rsseeds, Program
programs/data_registry/src/instructions/admin.rsPubkey
programs/data_registry/src/events.rsPubkey

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/healthtrust-solana-program/. 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
.cargo build
.cargo test

What you could build from it