Conway's Game of Life implemented on an Ethereum testnet: each cell is a deployed Solidity contract.
- Click any cell to toggle it alive/dead (sends a transaction to that
Cellcontract) - Gens/tx - configuration of operations to multiplex in each tx (speed of simulation, cost)
- Step - advances all cells one generation using Conway's rules (calls
GameOfLife.step()) - Auto - steps automatically every 3 seconds
- Clear - kills all cells
This deploys a GameOfLife contract and a 10x10 grid of Cell contracts, wires up their Moore neighbourhoods, and writes deployed.json.
A simulated Gas cost is provided for demonstration of how prohibitively expensive this would be.
docker pull ghcr.io/psedge/GethOfLife:latest
docker run -p 3000:3000 ghcr.io/psedge/GethOfLife:latestThen open http://localhost:3000 in your browser.
Prerequisites: Node.js, npm
npm installTerminal 1: start a local Hardhat node:
npm run nodeTerminal 2: deploy contracts:
npm run deployTerminal 2: serve the frontend:
npm run serveThen open http://localhost:3000 in your browser.
contracts/
Cell.sol # Individual cell contract with GoL step logic
GameOfLife.sol # Manager: holds cell registry, orchestrates step()
scripts/
deploy.js # Hardhat deploy script
index.html # Frontend (ethers.js, no build step)
hardhat.config.js
