- X: @mathcastles · @0x113d · @xaltgeist
- Discord: discord.gg/mathcastles
- Website: mathcastles.xyz
- Contract addresses
This is unofficial/fan repo with Terraforms source code, useful tooling and documentation.
- clone repo
- init submodules:
git submodule update --init --recursive- build:
forge build.
├── artifacts/
├── docs/
├── lib/
├── scripts/
└── src/
- artifacts: storage for pretty-formatted artifacts for quick access
- animation-v0.js: animation script for V0 rendered token
- animation-v2.js: animation script for V2 rendered token
- blades.js: JSON dump of all blade patterns for each token
- response-tokenURI.json: example JSON with tokenURI() response from the main contract
- docs: AI-generated documentation
- beacon.md: Beacon/Satellite/Antenna system
- events.md: all events Terraforms can emit (including V2)
- reference.md: full public/private API reference
- lib: dependencies from OpenZeppelin and Forge standard libraries required for Terraforms compilation
- scripts
- perlin_noise_audit: script & report with analysis of
PerlinNoise.solto verify that there's no hidden data in the noise - getparcel/: TypeScript + viem CLI to fetch a parcel's HTML/SVG (current state or any variation)
- video_capture/: headless Chromium + ffmpeg pipeline to record Terraforms HTML into MP4 (see its README for full details)
- perlin_noise_audit: script & report with analysis of
- src: smart contracts
- interfaces/: contract interfaces
- lib/: shared libraries (e.g.,
Base64.sol,ToString.sol,Types.sol) - Key contracts:
Terraforms.sol,TerraformsData.sol,TerraformsSVG.sol - V2 rendering and the Beacon system:
TerraformsData_v2_0.sol,TerraformsBeacon_v2_0.sol(source forTerraformsSVG_v2_0.solremains private so far)
Requirements:
- Node 20+
npm installinsidescripts/getparcel
You can control which JSON-RPC node to call with $ETH_RPC_URL (defaults to a public mainnet endpoint).
- Install and fetch parcel #1 in the current state:
cd scripts/getparcel
npm install
npm run getparcel -- 1- See full usage (any version/state/canvas):
npm run getparcel -- --help- Example with custom canvas (1024 decimal digits), renderer index, and status:
npm run getparcel -- 5308 --status terraformed --version 2 --canvas "<1024 decimals>"This Node/Puppeteer + ffmpeg script loads any standalone Terraforms HTML and writes frames plus capture.mp4 under tmp/capture_<timestamp>.
cd scripts/video_capture
npm install
NODE_OPTIONS=--expose-gc npm run capture -- path/to/animation.htmlFull options, pipeline notes, and customization tips live in scripts/video_capture/README.md.
When calling implementation ABIs, use the proxy address as the target; storage lives at the proxy.
- 0x4E1f41613c9084FdB9E34E11fAE9412427480e56
- Terraforms
- TerraformsAdmin
- TerraformsDreaming
- TerraformsPlacements
- 0xA5aFC9fE76a28fB12C60954Ed6e2e5f8ceF64Ff2
- TerraformsData
- TerraformsDataInterfaces
- TerraformsDataStorage
- 0x49957Ca2F1E314c2cf70701816bf6283b7215811
- TerraformsSVG
- 0xC9e417B7e67E387026161E50875D512f29630D7B
- TerraformsCharacters
- 0x1BAa1a790De69893b48932a151ef9bdB914bFBAe
- TerraformsZones (not verified on Etherscan due to a bug)
- 0x2521bEb44D433A5B916Ad9d5aB51B98378870072
- TerraformsAugmentations
- 0x53B811757fC725aB3556Bc00237D9bBcF2c0DfDE
- PerlinNoise
- TerraformsData_v1_0
- TerraformsTokenURI_v1_0
- TerraformsSVG_v1_0 (presumably; source not published yet)
- TerraformsHelpers_v1_0
- TerraformsData_v2_0
- TerraformsTokenURI_v2_0
- TerraformsBeacon_v2_0
- TerraformsSVG_v2_0 (presumably; source not published yet)
- TerraformsHelpers_v2_0