Sol.College

Structure lesson (licence does not allow quoting code)

chainbills

Original
chainbills/chainbills
SuperStack fork
Blockchains/chainbills @ b03a137
Stars
6
Last push (original)
2026-09-27
Languages
TypeScript, Solidity, Vue, Rust, JavaScript, CSS
Detected stack
Anchorweb3.js
Categories
Other
Licence
none detected: code not quoted on Sol.College

Architecture

497 source files. By extension: .ts ×207, .sol ×207, .rs ×81, .js ×2.

Top-level directorySource files
evm207
backend143
solana78
frontend49
cosmwasm20

On-chain programs: solana/programs/chainbills

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
initializeInitializesolana/programs/chainbills/src/lib.rs:53
disallow_tokenDisallowTokensolana/programs/chainbills/src/lib.rs:68
close_payableClosePayablesolana/programs/chainbills/src/lib.rs:178
reopen_payableReopenPayablesolana/programs/chainbills/src/lib.rs:185
payPaysolana/programs/chainbills/src/lib.rs:194
pay_nativePayNativesolana/programs/chainbills/src/lib.rs:200
withdrawWithdrawsolana/programs/chainbills/src/lib.rs:228
process_close_payableClosePayablesolana/programs/chainbills/src/instructions/payable/close_payable.rs:82
process_reopen_payableReopenPayablesolana/programs/chainbills/src/instructions/payable/reopen_payable.rs:82
process_withdrawWithdrawsolana/programs/chainbills/src/instructions/withdraw/withdraw.rs:155
process_initializeInitializesolana/programs/chainbills/src/instructions/admin/initialize.rs:75
process_disallow_tokenDisallowTokensolana/programs/chainbills/src/instructions/admin/disallow_token.rs:36
process_pay_nativePayNativesolana/programs/chainbills/src/instructions/payment/pay_native.rs:127
process_payPaysolana/programs/chainbills/src/instructions/payment/pay.rs:158

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
solana/tests/helpers/svm.tsPublicKey, Keypair, Program, Transaction, sendTransaction, TransactionMessage
frontend/src/stores/solana.tsPublicKey, SystemProgram, AnchorProvider, Program, Connection, seeds
solana/tests/payment.test.tsKeypair, PublicKey, Program, createMint, mintTo, SystemProgram
solana/tests/accounts.tsPublicKey, Keypair, seeds, SystemProgram, findProgramAddressSync
solana/programs/chainbills/src/cpi/cctp.rsAccountInfo, invoke, invoke_signed, Keypair, Program
solana/tests/payable.test.tsKeypair, PublicKey, Program, createMint
solana/tests/helpers/tokens.tsPublicKey, Keypair, Transaction, sendTransaction, SystemProgram, getAssociatedTokenAddressSync
backend/src/indexer/solana/solana.indexer.tsPublicKey, getAccountInfo, Connection
solana/programs/chainbills/src/events.rsPubkey
solana/tests/withdraw.test.tsKeypair, PublicKey, Program, getBalance, createMint, mintTo
backend/src/indexer/solana/solana.accounts.spec.tsPublicKey
solana/programs/chainbills/tests/test_admin.rsPubkey, seeds

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/chainbills/. 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
frontendnpm run dev
frontendnpm run build
frontendnpm run lint
solananpm run test
backendnpm run dev
backendnpm run start
backendnpm run build
backendnpm run test
backendnpm run lint
solanaanchor build
solanaanchor test
solanaanchor run test

What you could build from it