Sol.College

Structure lesson (licence does not allow quoting code)

agc

Original
c0rv0s/agc
SuperStack fork
Blockchains/agc @ 4c5a443
Stars
0
Last push (original)
2026-06-10
Languages
TypeScript, Rust, CSS, Python, HTML
Detected stack
Anchorweb3.js
Categories
Other
Licence
none detected: code not quoted on Sol.College
Homepage
https://agentcredit-two.vercel.app

Architecture

28 source files. By extension: .ts ×13, .rs ×11, .tsx ×3, .py ×1.

Top-level directorySource files
solana12
script8
web8

On-chain programs: solana/programs/agc_solana

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
set_keeperSetKeepersolana/programs/agc_solana/src/lib.rs:164
set_buyback_usdc_escrowSetBuybackUsdcEscrowsolana/programs/agc_solana/src/lib.rs:202
transfer_adminTransferAdminsolana/programs/agc_solana/src/lib.rs:210
accept_adminAcceptAdminsolana/programs/agc_solana/src/lib.rs:221
set_pause_flagsSetPauseFlagssolana/programs/agc_solana/src/lib.rs:236
set_policy_paramsSetPolicyParamssolana/programs/agc_solana/src/lib.rs:255
set_exit_fee_bpsSetExitFeeBpssolana/programs/agc_solana/src/lib.rs:301
deposit_underwriter_agcDepositUnderwriterAgcsolana/programs/agc_solana/src/lib.rs:532
draw_credit_lineDrawCreditLinesolana/programs/agc_solana/src/lib.rs:827
repay_credit_lineRepayCreditLinesolana/programs/agc_solana/src/lib.rs:935
mark_credit_line_defaultMarkCreditLineDefaultsolana/programs/agc_solana/src/lib.rs:1048
deposit_xagcDepositXagcsolana/programs/agc_solana/src/lib.rs:1199
redeem_xagcRedeemXagcsolana/programs/agc_solana/src/lib.rs:1256
record_swapRecordSwapsolana/programs/agc_solana/src/lib.rs:1334
record_market_observationRecordSwapsolana/programs/agc_solana/src/lib.rs:1393
cancel_buyback_campaignCancelBuybackCampaignsolana/programs/agc_solana/src/lib.rs:1722
burn_treasury_agcBurnTreasuryAgcsolana/programs/agc_solana/src/lib.rs:1771

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/programs/agc_solana/src/lib.rsseeds, Program, Pubkey, CpiContext, has_one, transfer
solana/tests/agc_solana.tsPublicKey, Keypair, SystemProgram, createMint, findProgramAddressSync, Program
web/src/transactions.tsPublicKey, Transaction, Connection, Program, signTransaction, findProgramAddressSync
solana/programs/agc_solana/src/events.rsPubkey
script/devnet-bootstrap.tsPublicKey, Keypair, createMint, SystemProgram, Program, mintTo
solana/programs/agc_solana/src/state.rsPubkey
script/demo/_lib.tsPublicKey, Connection, Keypair, AnchorProvider, Program, findProgramAddressSync
solana/programs/agc_solana/src/cpi.rsProgram, CpiContext, transfer
web/src/useProtocolState.tsPublicKey, getAssociatedTokenAddressSync, Connection
script/demo/full-run.tsPublicKey, findProgramAddressSync, SystemProgram, getAssociatedTokenAddressSync, seeds
script/demo/reset.tsPublicKey, createTransferInstruction, getAssociatedTokenAddressSync, findProgramAddressSync, SystemProgram, transfer
solana/programs/agc_solana/src/auth.rsPubkey, AccountInfo

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/agc/. 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 test
solanaanchor build
solanaanchor test
solanaanchor run test

What you could build from it