Sol.College

Structure lesson (licence does not allow quoting code)

Demo-Routing-Test

The First version of how Routing can be done using Zarnith and testing the initial flow.

Original
Zarnith-Fi/Demo-Routing-Test
SuperStack fork
Blockchains/Demo-Routing-Test @ 2c54a24
Stars
0
Last push (original)
2025-05-08
Languages
TypeScript, JavaScript, Rust
Detected stack
Anchorweb3.js
Categories
Other
Licence
none detected: code not quoted on Sol.College

Architecture

33 source files. By extension: .ts ×24, .js ×8, .rs ×1.

Top-level directorySource files
sdk30
migrations1
programs1
tests1

On-chain programs: programs/test-router

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/test-router.tsgetBalance, Keypair, SystemProgram, PublicKey, requestAirdrop, Program
sdk/src/client.tsPublicKey, Transaction, Program, SystemProgram, AnchorProvider, Connection
sdk/ist/client.d.tsPublicKey, Transaction, Connection, Program
sdk/ist/client.jsTransaction, Program, AnchorProvider, SystemProgram
programs/test-router/src/lib.rstransfer, invoke, Pubkey, Program, has_one, seeds
sdk/examples/update-router.tsPublicKey, Connection, Keypair, Transaction
sdk/examples/create-router.tsPublicKey, Connection, Keypair, Transaction
sdk/examples/close-router.tsConnection, Keypair, getBalance, PublicKey, Transaction
sdk/examples/route-fees.tsConnection, Keypair, PublicKey, Transaction
sdk/src/utils/pda.tsPublicKey, findProgramAddressSync
sdk/src/types.tsPublicKey, Transaction
sdk/ist/types.d.tsPublicKey, Transaction

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/demo-routing-test/. 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
sdknpm run build
sdknpm run test
.anchor build
.anchor test
.anchor run test
.cargo build
.cargo test

What you could build from it