Full lesson
Chainstory
What it does
From the project README:
Every payout. Prove it first. Evidence-backed controls for cross-chain USDC escrow payouts: source backing, independent screening, customer policy and fixed returns.
- Original
- shokkanuly/Chainstory
- SuperStack fork
- Blockchains/Chainstory @
fd7da9b - Stars
- 1
- Last push (original)
- 2026-10-11
- Languages
- TypeScript, Solidity, CSS, JavaScript, Python, HTML
- Detected stack
- Anchor
- Categories
- Other
- Licence
- MIT
- Homepage
- https://chainstory-iota.vercel.app
Architecture
321 source files. By extension: .ts ×250, .tsx ×60, .sol ×7, .py ×3, .rs ×1.
| Top-level directory | Source files |
|---|---|
src | 171 |
scripts | 113 |
contracts | 21 |
server | 8 |
(root) | 2 |
ml | 2 |
api | 2 |
programs | 1 |
On-chain programs: programs/story-attest
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/chainstory/. 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.
programs/story-attest/src/lib.rs L25–47 @ fd7da9b · MIT · original ) -> Result<()> { let receipt = &mut ctx.accounts.receipt; receipt.schema_version = SCHEMA_VERSION; receipt.wallet = ctx.accounts.signer.key(); receipt.snapshot_hash = snapshot_hash; receipt.tier = tier; receipt.issued_slot = issued_slot; emit!(StoryReceiptCreated { wallet: receipt.wallet, snapshot_hash, tier, issued_slot, }); Ok(()) }} #[derive(Accounts)]pub struct CreateReceipt<'info> { #[account(mut)] pub signer: Signer<'info>,- Line 33
emit!(StoryReceiptCreated {: Emits an Anchor event that clients can parse from the logs. - Line 47
pub signer: 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.
| Directory | Command | Runs |
|---|---|---|
. | npm run dev | vite |
. | npm run build | tsc -b && vite build |
. | npm run test | vitest run |
. | npm run lint | oxlint |
What you could build from it
- Fork the SuperStack copy and extend it within the Other gaps listed on the idea page.
- Learn the pattern first: Program Derived Addresses (PDAs)
- Learn the pattern first: Cross-Program Invocations (CPIs)