Sol.College

Structure lesson (licence does not allow quoting code)

Sol-EcoWaifu

Original
Laikaiyong/Sol-EcoWaifu
SuperStack fork
Blockchains/Sol-EcoWaifu @ 0f94666
Stars
0
Last push (original)
2024-04-08
Languages
JavaScript, Rust, TypeScript, CSS
Detected stack
MetaplexNative RustNext.jsweb3.js
Categories
Other
Licence
none detected: code not quoted on Sol.College
Homepage
https://sol-eco-waifu.vercel.app

Architecture

76 source files. By extension: .js ×46, .rs ×17, .ts ×9, .jsx ×4.

Top-level directorySource files
src52
codigo22
(root)2

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
Mintnative instruction variantcodigo/program/generated/instructions.rs:28
Transfernative instruction variantcodigo/program/generated/instructions.rs:44
Burnnative instruction variantcodigo/program/generated/instructions.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
codigo/program_client/lib/rpc.tsPublicKey, Keypair, sendAndConfirmTransaction, Transaction, Connection, getAccountInfo
codigo/program/libraries/csl_spl_token 0.0.0/src/cpi.rsAccountInfo, invoke, Pubkey, transfer, Transaction, Program
codigo/program_client/lib/pda.tsPublicKey, seeds, findProgramAddressSync
codigo/program/src/mint.rsAccountInfo, Pubkey
codigo/program/src/transfer.rsAccountInfo, Pubkey, transfer
src/component/ChatBox/ChatBox.jsxTransaction, useWallet, useConnection, PublicKey, SystemProgram, sendTransaction
codigo/program_client/lib/types.tsPublicKey
src/app/products/[product_id]/page.jsTransaction, useWallet, useConnection, PublicKey, SystemProgram, sendTransaction
codigo/program/libraries/csl_spl_assoc_token 0.0.0/src/cpi.rsAccountInfo, invoke, Pubkey
codigo/program/src/burn.rsAccountInfo, Pubkey
src/services/solanaservice.jsConnection, Keypair, requestAirdrop, PublicKey, Transaction, sendAndConfirmTransaction
src/app/(home)/navbar.jsuseConnection, useWallet, WalletMultiButton, sendTransaction

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/sol-ecowaifu/. 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 start
.npm run build
.npm run lint

What you could build from it