Sol.College

Structure lesson (licence does not allow quoting code)

CrossPay

Original
robertocarlous/CrossPay
SuperStack fork
Blockchains/CrossPay @ 86715f3
Stars
0
Last push (original)
2026-05-10
Languages
TypeScript, Rust, Python, JavaScript, CSS
Detected stack
AnchorNext.jssolana-pyweb3.js
Categories
Payments
Licence
none detected: code not quoted on Sol.College

Architecture

66 source files. By extension: .py ×28, .rs ×12, .tsx ×11, .js ×10, .ts ×5.

Top-level directorySource files
app28
Crosspay-frontend20
smartcontract13
ai-agent5

On-chain programs: smartcontract/programs/lifi

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
initializeInitializesmartcontract/programs/lifi/src/lib.rs:39
claim_paymentClaimPaymentsmartcontract/programs/lifi/src/lib.rs:72
cancel_paymentCancelPaymentsmartcontract/programs/lifi/src/lib.rs:77
handlerInitializesmartcontract/programs/lifi/src/instructions/initialize.rs:26
handlerClaimPaymentsmartcontract/programs/lifi/src/instructions/claim_payment.rs:68
handlerCancelPaymentsmartcontract/programs/lifi/src/instructions/cancel_payment.rs:55

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
smartcontract/programs/lifi/tests/test_initialize.rsKeypair, Pubkey, VersionedTransaction, Transaction
smartcontract/programs/lifi/src/instructions/claim_payment.rsseeds, Program, CpiContext, init_if_needed, transfer
smartcontract/programs/lifi/src/instructions/cancel_payment.rsseeds, Program, CpiContext, transfer
smartcontract/programs/lifi/src/state.rsPubkey, getProgramAccounts
smartcontract/programs/lifi/src/instructions/send_payment.rsseeds, Program, Pubkey, transfer, CpiContext
smartcontract/programs/lifi/src/events.rsPubkey
smartcontract/programs/lifi/src/instructions/register_user.rsseeds, Program
smartcontract/programs/lifi/src/instructions/initialize.rsseeds, Program, Pubkey
smartcontract/programs/lifi/src/lib.rsPubkey

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/crosspay/. 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
ai-agentnpm run dev
ai-agentnpm run start
Crosspay-frontendnpm run dev
Crosspay-frontendnpm run start
Crosspay-frontendnpm run build
Crosspay-frontendnpm run lint
Crosspay-frontend/ai-agentnpm run dev
Crosspay-frontend/ai-agentnpm run start
smartcontractnpm run lint
smartcontractanchor build
smartcontractanchor test
smartcontractanchor run test

What you could build from it