Why Effectstream?
Because building a serious on-chain app today means building three products: smart contracts, an indexer, and a backend — then keeping them in sync forever. Effectstream collapses that stack into one deterministic node you can write in TypeScript.
The problem it removes
1 · Primitives: chains become typed inputs
Reading a chain by hand means RPC pagination, reorg handling, event decoding, retry logic — per contract, per chain. In Effectstream you declare what you care about and the framework does the reading:
.addPrimitive((syncProtocols) => syncProtocols.mainEvmRPC, () => ({
name: "Arbitrum_ERC721",
type: PrimitiveTypeEVMERC721, // ← the entire indexer
contractAddress: "0x…",
stateMachinePrefix: "transfer-assets", // ← routes into YOUR logic, fully typed
}))
That's the whole integration. The same declarative pattern covers EVM, Midnight, Bitcoin, Cardano, Avail, Celestia, and NEAR — and because every primitive feeds the same grammar, adding a second (or fifth) chain doesn't change your game logic at all. Our workshop app reads three chains with three primitive blocks.
2 · A sovereign app-chain — without writing a chain
Your logic doesn't run on any of those chains. It runs in your own L2: a state machine that is deterministic and replayable — anyone can run the node, read the same chains, and recompute the exact same state. That buys you the trust properties of on-chain logic with none of its constraints:
- No gas limits on your rules. Our battle formula, fatigue, and season logic would be expensive Solidity; here it's plain TypeScript that costs nothing to run or change.
- Your app, your rules. Upgrade logic, tune constants, add features by restarting a process — no contract migrations, no governance to beg, no redeploys of user assets.
- The chain is the save file. The database is disposable; state is recomputed from the chains on every boot. (You'll watch this happen live in Step 5.)
- Exit-friendly. Assets (the NFTs) stay on their chains, under user control — sovereignty over execution without custody of anything.
3 · Developer infrastructure that's actually the product
The part you feel in the first ten minutes — everything a chain-app team normally assembles by hand, in one repo:
| You need | You get |
|---|---|
| a local multi-chain devnet | bun run dev — the orchestrator boots two EVM chains, Midnight (node + indexer + proof server), deploys contracts, and wires it all, with status/logs/restart per process |
| gasless UX | the batcher: users sign, one tx settles many inputs, signatures re-verified by the node |
| an API for your frontend | Fastify router + MQTT events, reading the same Postgres your logic writes |
| type safety across the stack | grammar types your inputs, pgtyped types your SQL — schema drift becomes a compile error |
| a starting point | 16 templates (this workshop builds on evm-midnight-v2; chess, swaps, and Bitcoin variants to raid next) |