Sol.College

Full lesson

proof-of-engagement

2025 cypherpunk submission

What it does

From the project README:

A blockchain-powered engagement tracking platform for university clubs built on Solana. Features QR code check-ins, photo proof verification, and ELO-based leaderboard rankings.
Original
chennethelius/proof-of-engagement
SuperStack fork
Blockchains/proof-of-engagement @ 190b41f
Stars
0
Last push (original)
2025-10-31
Languages
Dart, C++, CMake, Rust, Shell, Ruby
Detected stack
Anchor
Categories
Other
Licence
MIT

Architecture

5 source files. By extension: .cpp ×4, .rs ×1.

Top-level directorySource files
proof-of-engagement-app4
programs1

On-chain programs: programs/proof-of-engagement

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/proof-of-engagement/. 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.

chennethelius/proof-of-engagement · programs/proof-of-engagement/src/lib.rs L61–84 @ 190b41f · MIT · original
        event.created_at = Clock::get()?.unix_timestamp;        event.bump = ctx.bumps.event;         // Increment club's total events        let club = &mut ctx.accounts.club;        club.total_events = club.total_events.checked_add(1).unwrap();         msg!("Event created: {} for club: {}", event.name, club.name);        Ok(())    }     /// Record attendance for an event with photo proof    pub fn record_attendance(        ctx: Context<RecordAttendance>,        photo_hash: String,    ) -> Result<()> {        require!(photo_hash.len() <= 128, ErrorCode::PhotoHashTooLong);                let event = &mut ctx.accounts.event;        require!(event.is_active, ErrorCode::EventNotActive);        require!(            event.current_attendance < event.max_capacity,            ErrorCode::EventAtCapacity        );
  1. Line 61 event.created_at = Clock::get()?.unix_timestamp;: Reads on-chain time from the Clock sysvar.
  2. Line 62 event.bump = ctx.bumps.event;: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.
  3. Line 66 club.total_events = club.total_events.checked_add(1).unwrap();: Uses checked arithmetic so overflow fails instead of wrapping.
  4. Line 68 msg!("Event created: {} for club: {}", event.name, club.name);: Logs to the program log, which is visible in explorers and the test output.
  5. Line 77 require!(photo_hash.len() <= 128, ErrorCode::PhotoHashTooLong);: An explicit validation that aborts the instruction with an error.

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
.anchor buildcompile programs and generate IDLs
.anchor testlocal validator + test suite
.anchor run testyarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts

What you could build from it