Sol.College

Full lesson

Awareness-Market-Solana

Local-first AI agent memory with a native Solana registry for verifiable commitments and state transitions. Deployed on Solana Devnet.

What it does

From the project README:

This repository extends everest-an/Awareness-Market at commit `14f11d3`. The original MIT license and copyright are preserved. This repository starts from a clean source snapshot; local memory, logs, credentials, and generated test data are excluded.
Original
XiaoHai67890/Awareness-Market-Solana
SuperStack fork
Blockchains/Awareness-Market-Solana @ b1223c8
Stars
0
Last push (original)
2026-10-10
Languages
JavaScript, HTML, Rust, Python, CSS, Shell
Detected stack
Anchorweb3.js
Categories
AI & Agents
Licence
MIT

Architecture

15 source files. By extension: .js ×9, .rs ×4, .py ×2.

Top-level directorySource files
src9
contracts4
benchmarks2

On-chain programs: contracts/solana/programs/awareness-memory

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/awareness-market-solana/. 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.

XiaoHai67890/Awareness-Market-Solana · contracts/solana/programs/awareness-memory/src/lib.rs L145–168 @ b1223c8 · MIT · original
        space.authorizer = new_authorizer;        space.config_nonce = nonce;        emit!(AuthorizationUpdated {            space_id: space.space_id,            new_controller,            new_authorizer,            nonce        });        Ok(())    }} #[derive(Accounts)]#[instruction(space_id: [u8; 32])]pub struct RegisterSpace<'info> {    #[account(mut)]    pub payer: Signer<'info>,    pub controller: Signer<'info>,    #[account(init, payer = payer, space = Space::LEN, seeds = [b"space", space_id.as_ref()], bump)]    pub memory_space: Account<'info, Space>,    pub system_program: Program<'info, System>,} #[derive(Accounts)]
  1. Line 147 emit!(AuthorizationUpdated {: Emits an Anchor event that clients can parse from the logs.
  2. Line 161 pub payer: Signer<'info>,: Requires this account to have signed the transaction.
  3. Line 163 #[account(init, payer = payer, space = Space::LEN, seeds = [b"space", space_id.as_ref()], : Declares the PDA seeds. Anchor re-derives the address and rejects the account if it doesn't match.
  4. Line 163 #[account(init, payer = payer, space = Space::LEN, seeds = [b"space", space_id.as_ref()], : Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.
  5. Line 163 #[account(init, payer = payer, space = Space::LEN, seeds = [b"space", space_id.as_ref()], : Creates and pays for a new account. Space and payer must be specified.
XiaoHai67890/Awareness-Market-Solana · contracts/solana/programs/awareness-memory/examples/generate_abi.rs L25–48 @ b1223c8 · MIT · original
    let payer = Pubkey::new_from_array([1; 32]);    let authorizer = Pubkey::new_from_array([2; 32]);    let salt = [0x11; 32];    let space_id = native_space_id(&controller, &salt);    let sequence: u64 = 1;    let (space_pda, space_bump) = Pubkey::find_program_address(&[b"space", &space_id], &ID);    let (receipt_pda, receipt_bump) =        Pubkey::find_program_address(&[b"transition", &space_id, &sequence.to_le_bytes()], &ID);    let delta = [0x22; 32];    let profile = [0x33; 32];    let tid = transition_id(&space_id, sequence, &ZERO, &delta, &ZERO, &profile, &ZERO);    let root = next_state_root(&ZERO, &tid);    let mut space = Vec::new();    Space {        version: VERSION,        bump: space_bump,        space_id,        initial_controller: controller,        salt,        controller,        authorizer,        sequence,        config_nonce: 0,        transition_id: tid,
  1. Line 30 let (space_pda, space_bump) = Pubkey::find_program_address(&[b"space", &space_id], &ID);: Derives a PDA from seeds and the program ID and returns the address with its canonical bump.
  2. Line 40 bump: space_bump,: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.

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 startnode bin/awareness-local.mjs start
.npm run testnode --test test/*.test.mjs
contracts/solanaanchor buildcompile programs and generate IDLs
contracts/solanaanchor testlocal validator + test suite
contracts/solanaanchor run testcargo test --locked --features svm-tests

What you could build from it

Used in lessons