Sol.College

Full lesson

Flicko

Flicko: Snap It. Caption It. Trade It.

What it does

From the project README:

A camera-first meme market for Solana Seeker. Every photo can become a tradable coin, priced in SKR.
Original
Dev050x/Flicko
SuperStack fork
Blockchains/Flicko @ 06b0d7c
Stars
1
Last push (original)
2026-11-03
Languages
TypeScript, HTML, Rust, Kotlin, JavaScript, Shell
Detected stack
Anchorweb3.js
Categories
Consumer & Social
Licence
MIT
Homepage
https://getflicko.tech

Architecture

313 source files. By extension: .ts ×184, .tsx ×101, .rs ×19, .cpp ×6, .js ×3.

Top-level directorySource files
flicko_app286
flicko_programs27

On-chain programs: flicko_programs/programs/flicko_programs

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/flicko/. 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.

Dev050x/Flicko · flicko_programs/programs/flicko_programs/src/instructions/sell.rs L1–24 @ 06b0d7c · MIT · original
use anchor_lang::prelude::*;use anchor_spl::{    token_2022::Token2022,    token_interface::{        burn, transfer_checked, Burn, Mint, TokenAccount, TokenInterface, TransferChecked,    },}; use crate::{    error::ErrorCode,    events::Trade,    math::{curve_sell, pool_sell, to_u64, SellQuote},    Config, Meme, Phase, CONFIG_SEED, MEME_SEED, SKR_VAULT_SEED, TOKEN_VAULT_SEED,}; #[derive(Accounts)]pub struct Sell<'info> {    pub seller: Signer<'info>,     #[account(        seeds = [CONFIG_SEED],        bump = config.bump,        has_one = skr_mint @ ErrorCode::InvalidMint    )]
  1. Line 3 token_2022::Token2022,: Targets the Token-2022 program instead of the original Token Program.
  2. Line 5 burn, transfer_checked, Burn, Mint, TokenAccount, TokenInterface, TransferChecked,: A checked token transfer, which also verifies the mint and decimals.
  3. Line 18 pub seller: Signer<'info>,: Requires this account to have signed the transaction.
  4. Line 21 seeds = [CONFIG_SEED],: Declares the PDA seeds. Anchor re-derives the address and rejects the account if it doesn't match.
  5. Line 22 bump = config.bump,: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.
  6. Line 23 has_one = skr_mint @ ErrorCode::InvalidMint: Checks that a stored pubkey field matches the passed account.
Dev050x/Flicko · flicko_programs/programs/flicko_programs/src/instructions/set_attestor.rs L1–24 @ 06b0d7c · MIT · original
use anchor_lang::prelude::*; use crate::{error::ErrorCode, Attestor, Config, ATTESTOR_SEED, CONFIG_SEED}; #[derive(Accounts)]pub struct SetAttestor<'info> {    #[account(mut)]    pub admin: Signer<'info>,     #[account(        seeds = [CONFIG_SEED],        bump = config.bump,        has_one = admin @ ErrorCode::Unauthorized    )]    pub config: Account<'info, Config>,     #[account(        init_if_needed,        payer = admin,        seeds = [ATTESTOR_SEED],        bump,        space = 8 + Attestor::INIT_SPACE    )]    pub attestor: Account<'info, Attestor>,
  1. Line 8 pub admin: Signer<'info>,: Requires this account to have signed the transaction.
  2. Line 11 seeds = [CONFIG_SEED],: Declares the PDA seeds. Anchor re-derives the address and rejects the account if it doesn't match.
  3. Line 12 bump = config.bump,: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.
  4. Line 13 has_one = admin @ ErrorCode::Unauthorized: Checks that a stored pubkey field matches the passed account.
  5. Line 18 init_if_needed,: Creates the account only if it doesn't exist. Watch for re-initialisation bugs.
Dev050x/Flicko · flicko_programs/programs/flicko_programs/src/instructions/claim_creator_fees.rs L1–24 @ 06b0d7c · MIT · original
use anchor_lang::prelude::*;use anchor_spl::token_interface::{    transfer_checked, Mint, TokenAccount, TokenInterface, TransferChecked,}; use crate::{    error::ErrorCode, events::CreatorFeesClaimed, Config, Meme, CONFIG_SEED, MEME_SEED,    SKR_VAULT_SEED,}; #[derive(Accounts)]pub struct ClaimCreatorFees<'info> {    pub creator: Signer<'info>,     #[account(        seeds = [CONFIG_SEED],        bump = config.bump,        has_one = skr_mint @ ErrorCode::InvalidMint    )]    pub config: Account<'info, Config>,     #[account(        mint::token_program = skr_token_program    )]
  1. Line 3 transfer_checked, Mint, TokenAccount, TokenInterface, TransferChecked,: A checked token transfer, which also verifies the mint and decimals.
  2. Line 13 pub creator: Signer<'info>,: Requires this account to have signed the transaction.
  3. Line 16 seeds = [CONFIG_SEED],: Declares the PDA seeds. Anchor re-derives the address and rejects the account if it doesn't match.
  4. Line 17 bump = config.bump,: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.
  5. Line 18 has_one = skr_mint @ ErrorCode::InvalidMint: Checks that a stored pubkey field matches the passed account.
Dev050x/Flicko · flicko_programs/programs/flicko_programs/src/instructions/create_meme.rs L13–36 @ 06b0d7c · MIT · original
    token_interface::{burn, mint_to, Burn, Mint, MintTo, TokenAccount, TokenInterface},}; use solana_instructions_sysvar::{load_current_index_checked, load_instruction_at_checked}; use crate::{    attestation::{attestation_message, check_ed25519_data},    error::ErrorCode,    events::MemeCreated,    math::launch_params,    Attestor, Config, Meme, Phase, ATTESTOR_SEED, CONFIG_SEED, MAX_NAME_LEN, MAX_SYMBOL_LEN,    MAX_URI_LEN, MEME_DECIMALS, MEME_SEED, SKR_VAULT_SEED, TOKEN_VAULT_SEED,}; #[derive(Accounts)]pub struct CreateMeme<'info> {    #[account(mut)]    pub creator: Signer<'info>,     #[account(        seeds = [CONFIG_SEED],        bump = config.bump,        has_one = skr_mint @ ErrorCode::InvalidMint    )]
  1. Line 13 token_interface::{burn, mint_to, Burn, Mint, MintTo, TokenAccount, TokenInterface},: Mints new tokens. The mint authority must sign.
  2. Line 30 pub creator: Signer<'info>,: Requires this account to have signed the transaction.
  3. Line 33 seeds = [CONFIG_SEED],: Declares the PDA seeds. Anchor re-derives the address and rejects the account if it doesn't match.
  4. Line 34 bump = config.bump,: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.
  5. Line 35 has_one = skr_mint @ ErrorCode::InvalidMint: Checks that a stored pubkey field matches the passed account.

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
flicko_appnpm run devturbo run dev
flicko_appnpm run buildturbo run build
flicko_appnpm run testturbo run test
flicko_appnpm run lintturbo run lint
flicko_programsnpm run testanchor test
flicko_programsnpm run lintprettier */*.js "*/**/*{.js,.ts}" --check
flicko_programsanchor buildcompile programs and generate IDLs
flicko_programsanchor testlocal validator + test suite
flicko_programsanchor run testnpx ts-mocha -p ./tsconfig.json -t 1000000 tests/config.ts tests/create_meme.ts tests/buy.ts tests/sell.ts tests/claim_c

What you could build from it

Used in lessons