Sol.College

Full lesson

murphy

A powerful and developer-friendly Kit for building decentralized applications on Solana.

What it does

From the project README:

Murphy is an SDK designed to simplify Web3 and Solana development, allowing developers to build decentralized applications in their own way.
Original
Murphy-CodeLabs/murphy
SuperStack fork
Blockchains/murphy @ c73450f
Stars
29
Last push (original)
2025-07-27
Languages
TypeScript, MDX, CSS, JavaScript
Detected stack
MetaplexNext.jsweb3.js
Categories
DeFiNFTs & Digital Assets
Licence
MIT
Homepage
https://onchainkit.murphyai.dev

Architecture

168 source files. By extension: .tsx ×138, .ts ×30.

Top-level directorySource files
components126
app20
lib8
hook4
models3
(root)2
types2
constants1

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/murphy/. Until then, the lesson and step-by-step guide below are complete, and you can run it locally with the commands below.

Key code, explained

Excerpts chosen automatically where the code uses the most Solana concepts, pinned to the fork's commit.

Murphy-CodeLabs/murphy · components/ui/murphy/send-token-form.tsx L337–360 @ c73450f · MIT · original
            mintPubkey,            destinationPubkey          );           transaction.add(            createTransferInstruction(              senderATA,              receiverATA,              publicKey,              Math.floor(                values.amount * Math.pow(10, selectedTokenInfo.decimals)              )            )          );        }         const { blockhash } = await connection.getLatestBlockhash();        transaction.recentBlockhash = blockhash;        transaction.feePayer = publicKey;         const signature = await sendTransaction(transaction, connection);         toast.message("Transaction sent", {          description: "Waiting for confirmation...",
  1. Line 342 createTransferInstruction(: An SPL token transfer through the Token Program.
  2. Line 353 const { blockhash } = await connection.getLatestBlockhash();: Fetches a recent blockhash. Transactions expire if it gets too old.
  3. Line 357 const signature = await sendTransaction(transaction, connection);: Submits the signed transaction to the cluster.
Murphy-CodeLabs/murphy · components/ui/murphy/transfer-nft-form.tsx L229–252 @ c73450f · MIT · original
            toTokenAccount,            recipientPubkey,            mintPubkey          )        );      }       // Add transfer instruction      transaction.add(        createTransferInstruction(          fromTokenAccount,          toTokenAccount,          publicKey,          1, // NFT amount is always 1          [],          mintPubkey        )      );       // Send transaction      const signature = await sendTransaction(transaction, connection);       // Confirm transaction      await connection.confirmTransaction(signature, 'confirmed');
  1. Line 238 createTransferInstruction(: An SPL token transfer through the Token Program.
  2. Line 249 const signature = await sendTransaction(transaction, connection);: Submits the signed transaction to the cluster.
Murphy-CodeLabs/murphy · components/ui/murphy/claim-cToken.tsx L169–192 @ c73450f · MIT · original
          payer: publicKey,          inputCompressedTokenAccounts: inputAccounts,          toAddress: ataAddress,          amount,          tokenPoolInfos: selectedTokenPoolInfos,          recentInputStateRootIndices: proof.rootIndices,          recentValidityProof: proof.compressedProof,        });         // 10. Sign and send transaction using connected wallet        const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash();                // Create transaction and add instructions        const transaction = new Transaction();        transaction.add(ComputeBudgetProgram.setComputeUnitLimit({ units: 300_000 }));        transaction.add(ix);                // Set blockhash and feePayer information        transaction.recentBlockhash = blockhash;        transaction.feePayer = publicKey;                console.log("Signing transaction...");                try {
  1. Line 179 const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash();: Fetches a recent blockhash. Transactions expire if it gets too old.
  2. Line 183 transaction.add(ComputeBudgetProgram.setComputeUnitLimit({ units: 300_000 }));: Sets the compute-unit limit or price (priority fee).
Murphy-CodeLabs/murphy · components/ui/murphy/buildCurveAndCreateConfigByMarketCap-form.tsx L361–384 @ c73450f · MIT · original
          quoteMint: new PublicKey(values.quoteMint),          config: configKeypair.publicKey,        };         // Tạo transaction        const transaction =          await client.partners.buildCurveAndCreateConfigByMarketCap(params);         // Lấy blockhash gần nhất        const { blockhash, lastValidBlockHeight } =          await connection.getLatestBlockhash();        transaction.recentBlockhash = blockhash;        transaction.lastValidBlockHeight = lastValidBlockHeight;         // Đặt feePayer cho transaction        transaction.feePayer = publicKey;         // Ký giao dịch với configKeypair        transaction.partialSign(configKeypair);         // Gửi và ký giao dịch        const signature = await wallet.adapter.sendTransaction(          transaction,          connection
  1. Line 371 await connection.getLatestBlockhash();: Fetches a recent blockhash. Transactions expire if it gets too old.
  2. Line 382 const signature = await wallet.adapter.sendTransaction(: Submits the signed transaction to the cluster.

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 devnext dev --turbo
.npm run startnext start
.npm run buildnext build

What you could build from it

Used in lessons