Sol.College

Structure lesson (licence does not allow quoting code)

HimalayaCarbon

HimalayaCarbon

Original
NEEDSOMESOLFR/HimalayaCarbon
SuperStack fork
Blockchains/HimalayaCarbon @ 88d6870
Stars
0
Last push (original)
2026-10-13
Languages
TypeScript, Rust, CSS, HTML
Detected stack
AnchorMetaplexweb3.js
Categories
Other
Licence
none detected: code not quoted on Sol.College

Architecture

53 source files. By extension: .tsx ×25, .ts ×15, .rs ×13.

Top-level directorySource files
src35
himalaya-carbon14
(root)2
scripts2

On-chain programs: himalaya-carbon/programs/himalaya_carbon

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_registryInitializeRegistryhimalaya-carbon/programs/himalaya_carbon/src/lib.rs:16
verify_projectVerifyProjecthimalaya-carbon/programs/himalaya_carbon/src/lib.rs:42
reject_projectRejectProjecthimalaya-carbon/programs/himalaya_carbon/src/lib.rs:46
mint_creditsMintCreditshimalaya-carbon/programs/himalaya_carbon/src/lib.rs:50
update_priceUpdatePricehimalaya-carbon/programs/himalaya_carbon/src/lib.rs:54
buy_creditsBuyCreditshimalaya-carbon/programs/himalaya_carbon/src/lib.rs:58
handlerRejectProjecthimalaya-carbon/programs/himalaya_carbon/src/instructions/reject_project.rs:25
handlerInitializeRegistryhimalaya-carbon/programs/himalaya_carbon/src/instructions/initialize_registry.rs:21
handlerVerifyProjecthimalaya-carbon/programs/himalaya_carbon/src/instructions/verify_project.rs:25
handlerUpdatePricehimalaya-carbon/programs/himalaya_carbon/src/instructions/update_price.rs:19
handlerMintCreditshimalaya-carbon/programs/himalaya_carbon/src/instructions/mint_credits.rs:30
handlerBuyCreditshimalaya-carbon/programs/himalaya_carbon/src/instructions/buy_credits.rs:39

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
himalaya-carbon/tests/himalaya_carbon.tsPublicKey, SystemProgram, Keypair, findProgramAddressSync, getAssociatedTokenAddressSync, Program
server.tsKeypair, PublicKey, SystemProgram, getAssociatedTokenAddress, Connection, Transaction
src/components/BuyModal.tsxTransaction, SystemProgram, transfer, Connection, signTransaction, getBalance
scripts/init-mints.tsKeypair, Connection, PublicKey, createMint, mintTo, createUmi
himalaya-carbon/programs/himalaya_carbon/src/instructions/buy_credits.rshas_one, Program, CpiContext, transfer, seeds, AccountInfo
src/lib/phantom.tsConnection, PublicKey, getBalance, requestAirdrop, getLatestBlockhash
src/components/VerifyView.tsxTransaction, Connection, transfer
himalaya-carbon/programs/himalaya_carbon/src/events.rsPubkey
himalaya-carbon/programs/himalaya_carbon/src/state.rsPubkey
himalaya-carbon/programs/himalaya_carbon/src/instructions/mint_credits.rshas_one, seeds, Program, CpiContext
himalaya-carbon/programs/himalaya_carbon/src/instructions/retire_credits.rsseeds, Program, has_one, CpiContext
himalaya-carbon/programs/himalaya_carbon/src/instructions/register_project.rsseeds, Program

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/himalayacarbon/. 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 lint
himalaya-carbonnpm run lint
himalaya-carbonanchor build
himalaya-carbonanchor test
himalaya-carbonanchor run test

What you could build from it