Sol.College

Structure lesson (licence does not allow quoting code)

ChainTrust-SOL

🛡 The trust layer for Solana startup fundraising. Founders publish metrics on-chain (24-instruction Anchor program), oracles verify, investors get cryptographic proof chains. 3 smart-contract audits + 1 deep adversarial audit, 0 critical CVEs. Built for Colosseum Frontier.

Original
urosradojicic/ChainTrust-SOL
SuperStack fork
Blockchains/ChainTrust-SOL @ 61a9a22
Stars
1
Last push (original)
2026-07-27
Languages
TypeScript, HTML, Rust, PLpgSQL, JavaScript, CSS
Detected stack
AnchorMetaplexweb3.js
Categories
DeFiGovernance & DAOs
Licence
NOASSERTION: code not quoted on Sol.College
Homepage
https://chaintrust-sol.vercel.app

Architecture

307 source files. By extension: .tsx Ă—158, .ts Ă—144, .rs Ă—3, .js Ă—2.

Top-level directorySource files
src298
(root)5
blockchain3
supabase1

On-chain programs: blockchain/programs/chainmetrics

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_tokenInitializeTokenblockchain/programs/chainmetrics/src/lib.rs:20
mint_tokensMintTokensblockchain/programs/chainmetrics/src/lib.rs:48
burn_tokensBurnTokensblockchain/programs/chainmetrics/src/lib.rs:76
delegate_votesDelegateVotesblockchain/programs/chainmetrics/src/lib.rs:93
initialize_registryInitializeRegistryblockchain/programs/chainmetrics/src/lib.rs:111
verify_startupVerifyStartupblockchain/programs/chainmetrics/src/lib.rs:218
update_trust_scoreVerifyStartupblockchain/programs/chainmetrics/src/lib.rs:240
initialize_vaultInitializeVaultblockchain/programs/chainmetrics/src/lib.rs:264
stakeStakeblockchain/programs/chainmetrics/src/lib.rs:276
unstakeUnstakeblockchain/programs/chainmetrics/src/lib.rs:323
distribute_rewardsDistributeRewardsblockchain/programs/chainmetrics/src/lib.rs:372
claim_rewardsClaimRewardsblockchain/programs/chainmetrics/src/lib.rs:390
set_reward_rateSetRewardRateblockchain/programs/chainmetrics/src/lib.rs:430
upgrade_badge_tierUpdateBadgeblockchain/programs/chainmetrics/src/lib.rs:506
execute_proposalExecuteProposalblockchain/programs/chainmetrics/src/lib.rs:661
cancel_proposalCancelProposalblockchain/programs/chainmetrics/src/lib.rs:711
close_investor_accountCloseInvestorAccountblockchain/programs/chainmetrics/src/lib.rs:732
close_vote_recordCloseVoteRecordblockchain/programs/chainmetrics/src/lib.rs:742

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
src/hooks/use-blockchain.tssendTransaction, useConnection, useWallet, Transaction, SystemProgram, getAccountInfo
blockchain/programs/chainmetrics/src/lib.rsseeds, Program, Pubkey, CpiContext, init_if_needed, transfer
src/lib/solana/contracts.tsPublicKey, findProgramAddressSync, Program
blockchain/programs/chainmetrics/src/state.rsPubkey, seeds
src/hooks/use-cnft-certificate.tsPublicKey, useConnection, useWallet, sendTransaction, Transaction, SystemProgram
src/lib/solana/memo-anchor.tsPublicKey, Connection, Transaction, Program, sendTransaction, requestAirdrop
src/lib/solana/wallet-abstraction.tsTransaction, Connection, PublicKey, VersionedTransaction, sendTransaction
src/pages/LiveTestnetDemo.tsxsendTransaction, Transaction, useConnection, useWallet, WalletMultiButton, Program
src/hooks/use-chain-verification.tsuseConnection, PublicKey, getBalance, Transaction
src/components/common/ChainStatus.tsxProgram, useConnection, useWallet, getAccountInfo, Connection
src/contexts/WalletContext.tsxuseWallet, useConnection, PublicKey, getBalance, getAccountInfo
src/hooks/use-wallet-intelligence.tsuseConnection, PublicKey, getBalance, transfer

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/chaintrust-sol/. 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 build
.npm run test
.npm run lint
blockchainnpm run build
blockchainnpm run test
blockchainnpm run deploy
blockchainanchor build
blockchainanchor test
blockchainanchor run test
.make help
.make install
.make dev
.make demo
.make build
.make test

What you could build from it