A · Building a Game — Overview

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.

▼ details below

The problem it removes

the usual stack contracts indexer backend relayer glue scripts × every chain you support · × every schema change · drift bugs live here with Effectstream one deterministic node primitives + state machine + API + batcher grammar → STM → SQL: typed end to end, one language

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:

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 needYou get
a local multi-chain devnetbun 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 UXthe batcher: users sign, one tx settles many inputs, signatures re-verified by the node
an API for your frontendFastify router + MQTT events, reading the same Postgres your logic writes
type safety across the stackgrammar types your inputs, pgtyped types your SQL — schema drift becomes a compile error
a starting point16 templates (this workshop builds on evm-midnight-v2; chess, swaps, and Bitcoin variants to raid next)
The one-sentence pitch
Write a game server in TypeScript; get a verifiable multi-chain app — because every node that replays the chains computes the same state you did.
Checkpoint
You should be able to complete: "Effectstream reads chains through ___, runs my logic in a sovereign ___, and I never wrote an indexer because ___." Next: the architecture in one diagram.
← What we're buildingHow Effectstream thinks →