# MATH > math.alxo.city. Read /index.json. plan() returns unsigned transactions. ideas() ranks up to three cheap ones. A human signs. No server. ## Files - /index.json — snapshot the site already builds. script/snapshot.js rewrites it; the weekly workflow commits that file. - /plan.js — AGENT.plan(wallet, target, snapshot). Browser global after abi.js, planner.js, and eth.js. Node: require('./plan'). - /ideas.js — IDEAS.ideas(wallet, snapshot). Up to three cheap plans. Browser global after suggest.js, eth.js, and plan.js. Node: require('./ideas'). - /agents/ — schema, calls, caveats, contracts. - /ens/ — subname batch tool. Reads a parent, diffs records, and waits for a signature. - /agents/example.json — MATH, RGB, and TOON plans on a tiny fixture. ## Snapshot index.json fields: - block: number. Last indexed block. - owners: lowercase 0x addresses. - math: [id, ownerIndex] - rgb: [id, ownerIndex, r, g, b] - toon: [id, ownerIndex, word, face, rgb] - words, faces: { id: text } - wordOwners, faceOwners: [ownerIndex, ...]. The array index is the token id. - blocked: lowercase addresses that revert MATH's 2300-gas payout - blockedDone: true when that list was scanned Ids are decimal strings. ownerIndex indexes owners. A used RGB channel is an r, g, or b value. WORD and FACE ids run from 0, and wordOwners[id] / faceOwners[id] is the holder. owned is null only when those arrays are missing. ## plan(wallet, target, snapshot) - wallet: 0x address. - target: "3" or { "math": "3" }. RGB: { "r", "g", "b" }. TOON: { "math", "word", "face", "rgb" }. - snapshot: the index.json object. Returns v, ok, kind, target, block, wallet, exists, txs, royalty, shares, owned, note. txs items are { to, data, value }. value is hex wei: MATH 0.002 ETH, RGB 0.03 ETH, TOON 0x0. royalty is decimal wei paid to holders, not gas. shares items are { id, holder, wei, owned }. owned is the input ids this address already holds. owned is null only when the WORD or FACE owner index is missing. shares.holder is the owner in the snapshot. The contract pays whoever holds the input at send time. ok: false means the snapshot shows the call reverting (a channel already used, a TOON part already used, a missing MATH or RGB, a WORD or FACE the signer does not hold, or a MATH input held by an address in blocked). The transactions are still returned. exists: true means that target is already minted, so txs is empty. A TOON plan is ok: true when the signer holds the MATH, WORD, FACE, and RGB. ## ideas(wallet, snapshot) - wallet: 0x address. The zero address returns []. Moldemort takes a pasted address or ENS name, resolves it, then calls ideas(). With a wallet connected, that field is hidden and the account is used. - snapshot: the index.json object. At most one math, one rgb, and one toon. Cheapest royalty first, then smallest value sent. Each item is { kind, target, ok, cost, sent, plan }. cost is the royalty in wei. sent is the sum of tx value. Both are BigInt. plan is the AGENT.plan result. Already minted targets are omitted. An ok: false plan is still returned. No chain calls. Load it fills the mint, rgb, or toon form from an ok plan. A human signs. A MATH plan with more than one transaction has no load. ## Caveats - A human signs. This returns transactions and holds no key. - TOON.add is free. - MATH pays each input holder 0.001 ETH with a 2300-gas transfer. Some contract wallets cannot receive it. blocked lists them when blockedDone is true. A route that still names one comes back ok: false. If the list is missing, the note says so. - RGB pays 0.01 ETH to each of the three MATH channel holders (0.03 ETH total). - You still pay gas. value is only msg.value. - Each MATH id is one red, one green, or one blue. Each WORD, FACE, RGB, and MATH bases one TOON. ## Contracts - math.alxocity.eth https://etherscan.io/address/0x6B4fccdd888Bb6fD3934A9e49eF64dfd2c0D8e6D - rgb.alxocity.eth https://etherscan.io/address/0x9355Fb9693ffF9bB6f06721C82fe0B5F49E6c956 - toon.alxocity.eth https://etherscan.io/address/0x026A7D72a448D0E44d441e55F746BF56B843aEDB - WORD https://etherscan.io/address/0xAc1AEe5027FCC98d40a26588aC0841a44f53A8Fe - FACE https://etherscan.io/address/0x91047Abf3cAb8da5A9515c8750Ab33B4f1560a7A - mathrender.alxocity.eth https://etherscan.io/address/0xb3cA13A2722CAB48c8d9068bD67656efe2d5e376 - rgbrender.alxocity.eth https://etherscan.io/address/0x62FFe75cd9824A2e8855CbC055256De229B5b936 - toonrender.alxocity.eth https://etherscan.io/address/0x1E1a576e4186551e4DEdE58Ccc2DCC34697159Cb