Sol.College

Full lesson

CoorRe

Provable decisions for AI agents, enforced on Solana: the rule decides within the mandate, a person signs every exception, and anyone can verify the trail.

What it does

From the project README:

O CoorRe resolve a falta de coordenação verificável. Ele transforma as evidências e as decisões de um processo em prova assinada e ancorada, e entrega um verificador que qualquer pessoa executa, para que a auditoria confira a trilha em vez de reconstruí-la.
Original
catitodev/CoorRe
SuperStack fork
Blockchains/CoorRe @ 959dbc1
Stars
1
Last push (original)
2026-11-01
Languages
JavaScript, Rust, Solidity, CSS, TypeScript, HTML
Detected stack
web3.js
Categories
AI & AgentsGovernance & DAOs
Licence
Apache-2.0
Homepage
https://catitodev.github.io/CoorRe/

Architecture

66 source files. By extension: .rs ×51, .js ×6, .sol ×6, .ts ×3.

Top-level directorySource files
offchain49
hedera7
web6
onchain2
spike2

On-chain programs: onchain/programs/coorre_anchor

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

catitodev/CoorRe · onchain/programs/coorre_anchor/src/lib.rs L217–240 @ 959dbc1 · Apache-2.0 · original
    require!(remaining >= rent_minimum, CoorreError::InsufficientEscrow);    let credited = to        .lamports()        .checked_add(amount)        .ok_or(CoorreError::Overflow)?;    **from.try_borrow_mut_lamports()? = remaining;    **to.try_borrow_mut_lamports()? = credited;    Ok(())} #[derive(Accounts)]#[instruction(case_id: [u8; 32])]pub struct OpenCase<'info> {    #[account(        init,        payer = creator,        space = 8 + CaseRecord::INIT_SPACE,        seeds = [b"case", creator.key().as_ref(), case_id.as_ref()],        bump    )]    pub case_record: Account<'info, CaseRecord>,    #[account(mut)]    pub creator: Signer<'info>,    pub system_program: Program<'info, System>,
  1. Line 217 require!(remaining >= rent_minimum, CoorreError::InsufficientEscrow);: An explicit validation that aborts the instruction with an error.
  2. Line 220 .checked_add(amount): Uses checked arithmetic so overflow fails instead of wrapping.
  3. Line 231 init,: Creates and pays for a new account. Space and payer must be specified.
  4. Line 234 seeds = [b"case", creator.key().as_ref(), case_id.as_ref()],: Declares the PDA seeds. Anchor re-derives the address and rejects the account if it doesn't match.
  5. Line 235 bump: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.
  6. Line 239 pub creator: Signer<'info>,: Requires this account to have signed the transaction.
catitodev/CoorRe · spike/playground_spike.rs L85–108 @ 959dbc1 · Apache-2.0 · original
    from: &Signer<'info>,    to: &AccountInfo<'info>,    system_program: &Program<'info, System>,    amount: u64,) -> Result<()> {    system_program::transfer(        CpiContext::new(            system_program.to_account_info(),            system_program::Transfer {                from: from.to_account_info(),                to: to.clone(),            },        ),        amount,    )} #[derive(Accounts)]pub struct OpenVault<'info> {    #[account(        init,        payer = authority,        space = 8 + Vault::INIT_SPACE,        seeds = [b"vault", authority.key().as_ref()],
  1. Line 85 from: &Signer<'info>,: Requires this account to have signed the transaction.
  2. Line 91 CpiContext::new(: Makes a cross-program invocation into another program.
  3. Line 105 init,: Creates and pays for a new account. Space and payer must be specified.
  4. Line 108 seeds = [b"vault", authority.key().as_ref()],: Declares the PDA seeds. Anchor re-derives the address and rejects the account if it doesn't match.

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
web/verifiernpm run testnode --test test/*.test.mjs
bridgenpm run testnode --test test/*.test.mjs
hederanpm run testnode --test test/*.test.mjs
tools/playground-preflightnpm run testnode --test test/*.test.mjs

What you could build from it

Used in lessons