On-chain Tic-Tac-Toe
A tic-tac-toe game whose board, rules, win check and stakes all live inside a smart contract — no server, no database. The walkthrough covers connecting a wallet, playing the contract's own opponent (one move = one transaction, with the contract's reply computed inside it), a staked player-versus-player game, and the way winnings are credited inside the contract and only transferred when you claim them. It ends on the history view, showing that the list is assembled from the contract's event log rather than a database, and that each block's parentHash matches the hash of the one before it. Sepolia testnet only.
Narrated walkthrough
Chapters
- 1
What this is
The board, the rules and the stakes all live in the contract. No server, no database.
- 2
Connecting the wallet
Connect and switch to Sepolia. Every move needs a signature.
- 3
Playing the contract
One move, one transaction — the contract computes its reply inside it. Hard cannot be beaten.
- 4
Player versus player
Stake, play, and claim. Winnings are credited inside the contract, never pushed.
- 5
History and the event log
The list comes from the event log. Each block's parentHash matches the previous block's hash.