Sol.College

Structure lesson (licence does not allow quoting code)

AgroRWA

Decentralized platform for tokenizing agricultural real-world assets (RWA), enabling farmers to issue tokens backed by crops or future harvests and allowing investors to trade verified tokens through a rating-based marketplace.

Original
deni5/AgroRWA
SuperStack fork
Blockchains/AgroRWA @ 23164b8
Stars
0
Last push (original)
2026-10-01
Languages
TypeScript, Rust, CSS, JavaScript
Detected stack
AnchorNext.jsweb3.js
Categories
Other
Licence
none detected: code not quoted on Sol.College

Architecture

71 source files. By extension: .rs ×31, .tsx ×25, .ts ×12, .js ×3.

Top-level directorySource files
apps37
programs30
(root)1
smart-contracts1
scripts1
tests1

On-chain programs: programs/agro_registry, programs/asset_registry, programs/identity, programs/insurance, programs/liquidity_pool, programs/marketplace, programs/oracle_verify, programs/vault

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_fundInitializeFundprograms/insurance/src/lib.rs:23
reject_claimRejectClaimprograms/insurance/src/lib.rs:110
slash_oracleSlashOracleprograms/insurance/src/lib.rs:126
register_tokenRegisterTokenprograms/agro_registry/src/instructions.rs:7
update_tokenUpdateTokenprograms/agro_registry/src/instructions.rs:30
create_assetCreateAssetprograms/asset_registry/src/lib.rs:18
update_lifecycleUpdateLifecycleprograms/asset_registry/src/lib.rs:50
add_documentAddDocumentprograms/asset_registry/src/lib.rs:57
freeze_assetFreezeAssetprograms/asset_registry/src/lib.rs:66
increment_verificationsIncrementVerificationsprograms/asset_registry/src/lib.rs:73
deposit_lpDepositLpprograms/vault/src/instructions.rs:36
redeem_lpRedeemLpprograms/vault/src/instructions.rs:87
redeem_lpRedeemLpprograms/vault/src/lib.rs:26
create_listingCreateListingprograms/marketplace/src/lib.rs:22
fill_orderFillOrderprograms/marketplace/src/lib.rs:49
create_secondary_listingCreateSecondaryListingprograms/marketplace/src/lib.rs:115
cancel_listingCancelListingprograms/marketplace/src/lib.rs:141
create_poolCreatePoolprograms/liquidity_pool/src/instructions.rs:11
create_poolCreatePoolprograms/liquidity_pool/src/lib.rs:16
register_emitterRegisterEmitterprograms/identity/src/lib.rs:18
review_kycReviewKycprograms/identity/src/lib.rs:21
update_emitter_ratingUpdateEmitterRatingprograms/identity/src/lib.rs:24
register_oracleRegisterOracleprograms/identity/src/lib.rs:27
set_oracle_activeSetOracleActiveprograms/identity/src/lib.rs:30
update_oracle_reputationUpdateOracleReputationprograms/identity/src/lib.rs:33
registerRegisterEmitterprograms/identity/src/instructions/emitter.rs:6
review_kycReviewKycprograms/identity/src/instructions/emitter.rs:35
update_ratingUpdateEmitterRatingprograms/identity/src/instructions/emitter.rs:48
registerRegisterOracleprograms/identity/src/instructions/oracle.rs:8
set_activeSetOracleActiveprograms/identity/src/instructions/oracle.rs:31

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
programs/liquidity_pool/src/instructions.rsseeds, CpiContext, Program, transfer, init_if_needed
apps/web/src/lib/solana.tsPublicKey, findProgramAddressSync, Connection, Program
programs/marketplace/src/lib.rsseeds, Program, transfer, CpiContext, has_one
apps/web/src/hooks/useIdentity.tsPublicKey, useConnection, Transaction, signTransaction, useWallet, SystemProgram
apps/web/src/hooks/useVault.tsPublicKey, useConnection, useWallet, Program, AnchorProvider, SystemProgram
apps/web/src/hooks/useMarketplace.tsPublicKey, useConnection, Program, AnchorProvider, useWallet, sendTransaction
apps/web/src/hooks/useAsset.tsPublicKey, useConnection, Transaction, useWallet, Keypair, SystemProgram
programs/vault/src/instructions.rsseeds, Program, CpiContext, Pubkey, transfer, init_if_needed
apps/web/src/app/create-pool/page.tsxPublicKey, useWallet, WalletMultiButton, useConnection, Program, AnchorProvider
tests/agrorwa.test.tsPublicKey, Program, SystemProgram, createMint, findProgramAddressSync, Keypair
apps/web/src/hooks/usePools.tsPublicKey, useConnection, useWallet, SystemProgram, Program, AnchorProvider
programs/insurance/src/lib.rsseeds, Program, transfer, CpiContext, Pubkey

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/agrorwa/. 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
apps/webnpm run dev
apps/webnpm run start
apps/webnpm run build
apps/webnpm run lint
.anchor build
.anchor test
.anchor run test
.cargo build
.cargo test

What you could build from it