Sol.College

Full lesson

airdrop_quest

What it does

From the project README:

Monsters, challenges, and monster stats are all automatically generated by AI. As a result, some behaviors may become slow or laggy.
Original
ytakahashi2020/airdrop_quest
SuperStack fork
Blockchains/airdrop_quest @ 0d24628
Stars
2
Last push (original)
2025-12-27
Languages
TypeScript, CSS, Rust, JavaScript
Detected stack
MetaplexNext.jsweb3.js
Categories
Other
Licence
MIT
Homepage
https://qdropadventure.vercel.app

Architecture

32 source files. By extension: .ts ×21, .tsx ×9, .js ×1, .rs ×1.

Top-level directorySource files
pkgs32

Dapp: deploying

This fork is queued for its own live dapp on Sol.College, with a Devnet/Mainnet switch. It appears here, at /dapps/airdrop-quest/, once it is deployed and checked on devnet. Until then, 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.

ytakahashi2020/airdrop_quest · pkgs/frontend/src/lib.rs L61–84 @ 0d24628 · MIT · original
            // Create a context for the transfer and execute the transfer_checked instruction.            let cpi_ctx = CpiContext::new(token_program.clone(), transfer_cpi_accounts);            token_2022::transfer_checked(cpi_ctx, amount, ctx.accounts.mint.decimals)?;        }         Ok(())    }} // Define the data structure for the accounts involved in the send_to_all function.#[derive(Accounts)]pub struct SendTokens<'info> {    #[account(mut)]    pub from: Box<InterfaceAccount<'info, TokenAccount>>,    pub authority: Signer<'info>,    #[account()]    pub mint: Box<InterfaceAccount<'info, Mint>>,    pub token_program: Program<'info, Token2022>,} // Custom errors returned from this program.#[error_code]pub enum ErrorCode {    #[msg("Invalid Token Account. Please ensure the account is correctly initialized.")]
  1. Line 61 // Create a context for the transfer and execute the transfer_checked instruction.: A checked token transfer, which also verifies the mint and decimals.
  2. Line 62 let cpi_ctx = CpiContext::new(token_program.clone(), transfer_cpi_accounts);: Makes a cross-program invocation into another program.
  3. Line 63 token_2022::transfer_checked(cpi_ctx, amount, ctx.accounts.mint.decimals)?;: Targets the Token-2022 program instead of the original Token Program.
  4. Line 75 pub authority: Signer<'info>,: Requires this account to have signed the transaction.

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
pkgs/cdknpm run buildtsc
pkgs/cdknpm run testjest
pkgs/cdknpm run deploycdk deploy --require-approval never
pkgs/frontendnpm run devnext dev
pkgs/frontendnpm run startnext start
pkgs/frontendnpm run buildnext build
pkgs/frontendnpm run lintnext lint

What you could build from it

Used in lessons