@artblocks/abx-cli 0.1.0-alpha.12 → 0.1.0-alpha.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/schema.js CHANGED
@@ -23,6 +23,27 @@ import { PARAM_TYPES, AUTH_OPTIONS, encodeScalarParam } from '@artblocks/abx-sdk
23
23
  const ZERO32 = `0x${'0'.repeat(64)}`;
24
24
  /** The types that accept a `[min..max]` bound (the contract's min/max fields are meaningful here). */
25
25
  const BOUNDED_TYPES = new Set(['Uint256Range', 'Int256Range', 'DecimalRange', 'Timestamp']);
26
+ const ZERO_ADDR = '0x0000000000000000000000000000000000000000';
27
+ /**
28
+ * A point in time for `lock=`: unix seconds, an ISO date, or `now` (which means "immediately and
29
+ * forever" — the retire idiom). Reuses the Timestamp encoder so `lock=2026-12-31` parses exactly
30
+ * like a `Timestamp[..]` bound does; one date grammar for the whole flag.
31
+ */
32
+ export function parseWhen(raw) {
33
+ const t = raw.trim();
34
+ if (t === '')
35
+ throw new Error('lock= needs a value (unix seconds, an ISO date, or `now`)');
36
+ // `now` locks on the next block. Anything already past is equally permanent — the contract's test
37
+ // is `block.timestamp > lockAfter`.
38
+ if (t.toLowerCase() === 'now')
39
+ return Math.floor(Date.now() / 1000) - 1;
40
+ const secs = Number(BigInt(encodeScalarParam('Timestamp', t, []).value));
41
+ if (!Number.isSafeInteger(secs) || secs < 0)
42
+ throw new Error(`bad time "${raw}"`);
43
+ if (secs > 0xffffffffffff)
44
+ throw new Error(`"${raw}" exceeds the uint48 lock field`);
45
+ return secs;
46
+ }
26
47
  /** min ≤ max in the type's own ordering (mirrors AbxParamsLib's on-chain check, but earlier + clearer). */
27
48
  function orderedBounds(typeName, min, max) {
28
49
  if (typeName === 'Int256Range')
@@ -31,22 +52,54 @@ function orderedBounds(typeName, min, max) {
31
52
  }
32
53
  export function parseSchemaSpec(spec) {
33
54
  const parts = spec.split(':');
34
- if (parts.length !== 3) {
35
- throw new Error(`--schema "${spec}" — expected key:Type:Auth (a Select adds options: key:Select[A|B|C]:Auth; a Range adds bounds: key:Uint256Range[0..100]:Auth).`);
55
+ if (parts.length !== 3 && parts.length !== 4) {
56
+ throw new Error(`--schema "${spec}" — expected key:Type:Auth (a Select adds options: key:Select[A|B|C]:Auth; a Range adds bounds: key:Uint256Range[0..100]:Auth; add :lock=<when> to freeze the value after a date).`);
57
+ }
58
+ const [key, typeToken, authToken, lockToken] = parts;
59
+ // A 4th field is ONLY ever `lock=…`. Anything else there means a colon leaked out of a label or
60
+ // bound and split the spec wrong — report that as the shape error it is, rather than letting the
61
+ // mangled fragments fail later with a confusing "malformed type".
62
+ if (lockToken !== undefined && !/^lock=/.test(lockToken)) {
63
+ throw new Error(`--schema "${spec}" — expected key:Type:Auth (with an optional 4th field, lock=<when>). ` +
64
+ `Got ${parts.length} colon-separated fields: a ':' inside a Select option or a bound splits the spec — use simpler labels.`);
36
65
  }
37
- const [key, typeToken, authName] = parts;
38
66
  const m = typeToken.match(/^([A-Za-z0-9]+)(?:\[(.*)\])?$/);
39
67
  if (!key || !m)
40
68
  throw new Error(`--schema "${spec}" — malformed type "${typeToken}".`);
41
69
  const typeName = m[1];
42
70
  const bracket = m[2]; // undefined when there is no [...]
43
71
  const paramType = PARAM_TYPES.indexOf(typeName);
72
+ // An Address-bearing leg names its holder inline: `Address(0x…)`, `ArtistOrAddress(0x…)`. The
73
+ // contract pairs auth and authAddress strictly (one without the other reverts InvalidParamSchema),
74
+ // so they belong in one token rather than a second flag that could be forgotten.
75
+ const am = authToken.match(/^([A-Za-z]+)(?:\((0x[0-9a-fA-F]{40})\))?$/);
76
+ if (!am)
77
+ throw new Error(`--schema "${spec}" — malformed auth "${authToken}" (an Address leg looks like Address(0x…)).`);
78
+ const authName = am[1];
44
79
  const auth = AUTH_OPTIONS.indexOf(authName);
45
80
  if (paramType < 0 || auth < 0) {
46
81
  throw new Error(`--schema "${spec}" — Type ∈ {${PARAM_TYPES.join('|')}}, Auth ∈ {${AUTH_OPTIONS.join('|')}}.`);
47
82
  }
48
- if (AUTH_OPTIONS[auth].includes('Address')) {
49
- throw new Error(`--schema "${spec}" — Address-auth legs need an authAddress; set that schema post-deploy via the contract.`);
83
+ const wantsAddress = AUTH_OPTIONS[auth].includes('Address');
84
+ const authAddress = (am[2] ?? ZERO_ADDR);
85
+ if (wantsAddress && authAddress === ZERO_ADDR) {
86
+ throw new Error(`--schema "${spec}" — ${authName} names a specific writer, so it needs one: ${key}:${typeToken}:${authName}(0xYourAddress). ` +
87
+ `A CONTRACT may hold this leg — that is how open/multi-party participation is built (a controller applies its own rules and forwards the write).`);
88
+ }
89
+ if (!wantsAddress && am[2]) {
90
+ throw new Error(`--schema "${spec}" — ${authName} takes no address; only an Address-bearing leg does.`);
91
+ }
92
+ let lockAfter = 0;
93
+ if (lockToken !== undefined) {
94
+ const lm = lockToken.match(/^lock=(.*)$/);
95
+ if (!lm)
96
+ throw new Error(`--schema "${spec}" — the 4th field must be lock=<when> (unix seconds, an ISO date, or "now").`);
97
+ try {
98
+ lockAfter = parseWhen(lm[1]);
99
+ }
100
+ catch (e) {
101
+ throw new Error(`--schema "${spec}" — ${e.message}`);
102
+ }
50
103
  }
51
104
  let min = ZERO32;
52
105
  let max = ZERO32;
@@ -85,7 +138,7 @@ export function parseSchemaSpec(spec) {
85
138
  throw new Error(`--schema "${spec}" — min must be ≤ max (got ${mm[0].trim()}..${mm[1].trim()}).`);
86
139
  }
87
140
  }
88
- return { key, paramType, auth, min, max, selectOptions };
141
+ return { key, paramType, auth, authAddress, lockAfter, min, max, selectOptions };
89
142
  }
90
143
  /** Parse a full `--schema` value: comma-separated specs. */
91
144
  export function parseSchemaSpecs(raw) {
@@ -107,7 +160,9 @@ export function describeSchema(s) {
107
160
  const hi = decodeBound(type, s.max);
108
161
  detail = `[${lo}..${hi}]`;
109
162
  }
110
- return `${s.key}:${type}${detail}:${auth}`;
163
+ const who = s.authAddress && s.authAddress !== ZERO_ADDR ? `(${s.authAddress})` : '';
164
+ const lock = s.lockAfter ? `:lock=${new Date(s.lockAfter * 1000).toISOString().slice(0, 19)}Z` : '';
165
+ return `${s.key}:${type}${detail}:${auth}${who}${lock}`;
111
166
  }
112
167
  function decodeBound(typeName, v) {
113
168
  // Cheap display-only decode (the SDK's decodeScalarParam is the canonical one, but this keeps the
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAC,WAAW,EAAE,YAAY,EAAE,iBAAiB,EAAqB,MAAM,oBAAoB,CAAC;AAGpG,MAAM,MAAM,GAAG,KAAK,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,EAAS,CAAC;AAE5C,sGAAsG;AACtG,MAAM,aAAa,GAAG,IAAI,GAAG,CAAS,CAAC,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC,CAAC;AAWpG,2GAA2G;AAC3G,SAAS,aAAa,CAAC,QAAgB,EAAE,GAAQ,EAAE,GAAQ;IACzD,IAAI,QAAQ,KAAK,aAAa;QAAE,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1G,OAAO,MAAM,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CACb,aAAa,IAAI,iIAAiI,CACnJ,CAAC;IACJ,CAAC;IACD,MAAM,CAAC,GAAG,EAAE,SAAS,EAAE,QAAQ,CAAC,G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CAAC;CACtB;AAiBD,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,UAAU,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACrB;AAqED;;;;GAIG;AACH,wBAAsB,MAAM,CAAC,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAShG;AA+GD;;;;;;;;;GASG;AACH,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,GAAG,CAAC;IACZ,OAAO,EAAE,kBAAkB,CAAC;CAC7B;AAED,MAAM,WAAW,aAAa;IAC5B,8FAA8F;IAC9F,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5B,6FAA6F;IAC7F,IAAI,CAAC,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAC7C;oGACgG;IAChG,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACjE,yEAAyE;IACzE,KAAK,IAAI,IAAI,CAAC;CACf;AASD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,2FAA2F;IAC3F,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4FAA4F;IAC5F,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,aAAa,CAAC,CA8J1F"}
package/dist/signer.js CHANGED
@@ -2,6 +2,7 @@ import { createServer } from 'node:http';
2
2
  import { writeFileSync } from 'node:fs';
3
3
  import { makePublicClient, makeWalletClient, resolveChain, } from '@artblocks/abx-sdk';
4
4
  import { faucetHint } from './config.js';
5
+ import { pinGas, waitForCodeAt } from './gas.js';
5
6
  /** Announce the wallet sign-page URL: a stable, greppable line for humans/agents, plus an
6
7
  * optional file write so a backgrounding agent can read the URL without parsing stdout. */
7
8
  function announceSignUrl(signUrl, file) {
@@ -108,12 +109,16 @@ async function signHot(provider, opts) {
108
109
  console.log(`\n ${C.orange}⚠${C.reset} env key ${account.address} is not the expected signer ${opts.expectedSigner} — this will likely revert.`);
109
110
  }
110
111
  console.log(`\n ${dim(`signing with env key ${account.address} …`)}`);
112
+ // Pin the gas rather than letting viem re-estimate at send time — see gas.ts for why an estimate
113
+ // can come back as the calldata cost alone and silently underfund a CREATE.
114
+ const gas = await pinGas(publicClient, { from: account.address, to: prepared.to, data: prepared.data, value: prepared.value, gasFloor: prepared.gasFloor });
111
115
  const txHash = await wallet.sendTransaction({
112
116
  account,
113
117
  chain: wallet.chain,
114
118
  to: prepared.to ?? undefined,
115
119
  data: prepared.data,
116
120
  value: BigInt(prepared.value),
121
+ gas,
117
122
  });
118
123
  console.log(` ${dim('tx')} ${explorerFor(opts.chainKey)}/tx/${txHash}`);
119
124
  const receipt = await publicClient.waitForTransactionReceipt({ hash: txHash });
@@ -128,10 +133,26 @@ async function signCold(provider, opts) {
128
133
  const prepared = await resolveTx(provider, opts.expectedSigner ?? '0x0000000000000000000000000000000000000000');
129
134
  printIntent(prepared, opts);
130
135
  console.log(`\n ${bold('unsigned transaction')} ${dim('— sign + broadcast this with your own signer (multisig / offline):')}\n`);
131
- console.log(JSON.stringify({ to: prepared.to, data: prepared.data, value: prepared.value, chainId: prepared.chainId }, null, 2)
136
+ console.log(JSON.stringify({
137
+ to: prepared.to,
138
+ data: prepared.data,
139
+ value: prepared.value,
140
+ chainId: prepared.chainId,
141
+ // NOT a gas limit — a floor the external signer's own estimate must clear. Emitting it as
142
+ // `gas` would be wrong: it covers only the provable code-deposit cost, not the schema /
143
+ // dependency / mint legs riding the same multicall, so a signer that used it verbatim would
144
+ // under-fund the transaction. See gas.ts.
145
+ ...(prepared.gasFloor ? { gasMustExceed: prepared.gasFloor } : {}),
146
+ }, null, 2)
132
147
  .split('\n')
133
148
  .map((l) => ' ' + l)
134
149
  .join('\n'));
150
+ if (prepared.gasFloor) {
151
+ console.log(`\n ${C.orange}⚠${C.reset} ${bold('gasMustExceed')} ${dim('is a floor, not a limit.')} This tx stores bytes on-chain, which costs\n` +
152
+ ` 200 gas/byte in code deposit alone. If your signer's gas estimate comes back BELOW ${BigInt(prepared.gasFloor)},\n` +
153
+ ` it is estimating against stale state (the target contract not visible yet) — re-estimate rather than\n` +
154
+ ` sending, or it reverts ${bold('DeploymentFailed()')} and the gas is lost.`);
155
+ }
135
156
  console.log(`\n ${dim('Then run')} ${bold('abx index <address>')} ${dim('to reflect it once mined.')}\n`);
136
157
  return null;
137
158
  }
@@ -190,6 +211,8 @@ export async function openWalletSession(opts) {
190
211
  // txHash) or a message to sign (personal_sign → signature) — the latter is how the wallet signs
191
212
  // Turbo (Arweave) upload data-items so its own credits pay. Both resolve `pendingResolve` with a
192
213
  // Hex value (a txHash or a signature); only one item is ever in flight.
214
+ // `tx` carries an optional resolved `gas` (hex) the CLI pinned for this item — the page forwards it
215
+ // to `eth_sendTransaction` rather than letting the wallet estimate. See send() below.
193
216
  let current = null;
194
217
  let pendingResolve = null;
195
218
  let pendingReject = null;
@@ -285,7 +308,16 @@ export async function openWalletSession(opts) {
285
308
  connect: () => connected,
286
309
  async send(tx) {
287
310
  index += 1;
288
- current = { index, kind: 'tx', tx, consumed: false };
311
+ // A wallet session spans blocks: the deploy is approved, then setup targets the contract it
312
+ // just created. The browser wallet estimates against ITS OWN RPC, which we don't control and
313
+ // which can lag — so wait for the code to be visible and hand the page an explicit gas limit
314
+ // instead of letting the wallet guess. Same reasoning as the hot lane (see gas.ts).
315
+ if (tx.to && tx.gasFloor)
316
+ await waitForCodeAt(publicClient, tx.to);
317
+ const gas = opts.expectedSigner
318
+ ? await pinGas(publicClient, { from: opts.expectedSigner, to: tx.to, data: tx.data, value: tx.value, gasFloor: tx.gasFloor }).catch(() => undefined)
319
+ : undefined;
320
+ current = { index, kind: 'tx', tx: gas === undefined ? tx : { ...tx, gas: `0x${gas.toString(16)}` }, consumed: false };
289
321
  console.log(` ${dim(`tx ${opts.total ? `${index}/${opts.total}` : index}:`)} ${tx.summary} ${dim('— approve in your wallet …')}`);
290
322
  const txHash = await new Promise((resolve, reject) => {
291
323
  pendingResolve = resolve;
@@ -499,6 +531,10 @@ $('sign').onclick = async () => {
499
531
  } else {
500
532
  const params = {from: account, data: curTx.data, value: curTx.value};
501
533
  if (curTx.to) params.to = curTx.to;
534
+ // An explicit limit the CLI resolved for this tx. Wallets that would otherwise estimate against
535
+ // a node lagging behind the deploy block send ~200k for a call needing ~941k, and the on-chain
536
+ // content write reverts DeploymentFailed(). The user can still edit it in the wallet UI.
537
+ if (curTx.gas) params.gas = curTx.gas;
502
538
  const txHash = await window.ethereum.request({method:'eth_sendTransaction', params:[params]});
503
539
  await fetch('/signed', {method:'POST', headers:{'content-type':'application/json'}, body: JSON.stringify({index: curIndex, txHash})});
504
540
  const link = CFG.explorer ? '<a href="'+CFG.explorer+'/tx/'+txHash+'" target="_blank">'+txHash+'</a>' : txHash;
@@ -1 +1 @@
1
- {"version":3,"file":"signer.js","sourceRoot":"","sources":["../src/signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAyD,MAAM,WAAW,CAAC;AAE/F,OAAO,EAAC,aAAa,EAAC,MAAM,SAAS,CAAC;AACtC,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,GAIb,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AAmCvC;4FAC4F;AAC5F,SAAS,eAAe,CAAC,OAAe,EAAE,IAAa;IACrD,qFAAqF;IACrF,uEAAuE;IACvE,OAAO,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,CA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": "MIT",
5
5
  "description": "ABX CLI ('abx') — the agentic UX surface of the Self-Host Toolkit (Layer 3). Deploy, index, serve, and demo a self-hosted ABX project end to end. Wraps the SDK; runs a different implementation and the protocol works identically.",
6
6
  "type": "module",
@@ -38,13 +38,13 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "viem": "^2.21.0",
41
- "@artblocks/abx-sdk": "0.1.0-alpha.5",
42
- "@artblocks/abx-storage": "0.1.0-alpha.5",
43
- "@artblocks/abx-indexer": "0.1.0-alpha.6",
44
- "@artblocks/abx-token-api": "0.1.0-alpha.8"
41
+ "@artblocks/abx-indexer": "0.1.0-alpha.8",
42
+ "@artblocks/abx-storage": "0.1.0-alpha.7",
43
+ "@artblocks/abx-sdk": "0.1.0-alpha.7",
44
+ "@artblocks/abx-token-api": "0.1.0-alpha.10"
45
45
  },
46
46
  "optionalDependencies": {
47
- "@artblocks/abx-effects": "0.1.0-alpha.5"
47
+ "@artblocks/abx-effects": "0.1.0-alpha.7"
48
48
  },
49
49
  "devDependencies": {
50
50
  "playwright": "1.61.1"
package/skill/SKILL.md CHANGED
@@ -3,7 +3,7 @@ name: abx-self-host
3
3
  description: Launch and operate a self-hosted ABX NFT end to end with the ABX CLI (`abx`) on testnet — a 1/1 (`abx deploy`), a multi-token Series from a folder of media (`abx deploy-series`), or a generative/code drop (`abx deploy-code`). Covers on-chain vs off-chain metadata, storage custody (local disk, S3/R2, IPFS, Arweave), deploy + mint (now or pre-warmed at a predicted address), rendered thumbnails and on-chain traits for code art, primary sales via the shared fixed-price minter, and owner ops (transfer, refresh, re-point URIs, royalties, lock fields, pause/unpause, supply cap, delegate minting). Use when the user wants to self-host an ABX project, take an image to an NFT on testnet, deploy a collection from a folder of images, launch generative/code art, mint or run a primary sale, refresh a listing, operate a project they launched, choose a storage backend, stand up hosting they own, or point a project at a hosted/managed metadata provider with an API key.
4
4
  compatibility: Drives the abx CLI (@artblocks/abx-cli). Co-versioned with it — install/refresh with `abx skill install` so this skill matches the CLI's `abx version`. Requires Node 22.5+.
5
5
  metadata:
6
- version: "0.1.0-alpha.12"
6
+ version: "0.1.0-alpha.14"
7
7
  ---
8
8
 
9
9
  # ABX Self-Host Toolkit (`abx`)
@@ -38,6 +38,15 @@ Route by the **content** first, then apply the gates below. The three paths diff
38
38
  |---|---|---|---|
39
39
  | **one image** (a 1/1) | `abx deploy` | on-chain (tiny art) or off-chain — **no server possible** | the image itself |
40
40
  | **a folder of images** | `abx deploy-series` | same — on-chain or off-chain, **no server possible** | each image itself |
41
+
42
+ > **`--onchain-uri` puts the JSON on-chain — the IMAGE follows one of three routes, and the creator
43
+ > is choosing between them whether they know it or not.** An **SVG** is inlined (bytes on-chain,
44
+ > fully self-contained). A **raster** with `--backend arweave|ipfs|cloud` is uploaded and its URL is
45
+ > baked into the on-chain JSON — no server, permanence is the backend's. A **raster on `fs`** has no
46
+ > public URL to bake, so the renderer holds only a hash and `tokenURI` serves a **placeholder**; the
47
+ > CLI warns before the spend. For the bytes themselves on-chain regardless of format, use
48
+ > `--onchain-image --compress fastlz` (best under ~24 KB). Say which one you're giving them: "no
49
+ > server" and "on-chain" are not the same promise.
41
50
  | **a program** (generative / code) | `abx deploy-code` | **a resolver you run** (live seed + PostParam injection) — OR `--onchain-uri` (tokenURI on-chain; the canonical generator computes the live view) | **rendered off-chain** by the effect runner, else a placeholder |
42
51
 
43
52
  **The dividing line is static art vs a running program.** Static art is self-resolving (the file *is* the thumbnail, nothing to keep running); **a code project's thumbnail is *rendered* off-chain, so it ALWAYS needs a public home you provide (`--image-base` bucket, or a resolver) — settle that infra fork with the creator FIRST** (details in [Code projects](#code-projects-generative--code-based-drops)). Nail the project type before the gates.
@@ -182,48 +191,27 @@ Master call is **custody × mutability**:
182
191
  | | **Mutable** (name/desc/traits may change) | **Immutable** (never changes) |
183
192
  |---|---|---|
184
193
  | **Tiny static** (≲ 24 KB/file, ≲ 256 KB total) | **on-chain renderer** — `--onchain-image --compress fastlz`. No host, mutable via `set-field`, permanent. | on-chain renderer + `lock-field` + `lock-uri` once it resolves. |
185
- | **Bigger / dynamic** (most PNG/JPEG) | **image off-chain, JSON on-chain, no server** — `--onchain-uri --backend arweave` (or `ipfs`). Renderer assembles JSON pointing at the bytes; many files → one `url-template` (O(1)). For metadata you edit often, a **resolver** instead — a managed provider or your own (`abx deploy-resolver`), [hosting.md](reference/hosting.md). Not fully on-chain (~200 gas/byte). | image off-chain (Arweave = permanent) + on-chain renderer + `lock-field`/`lock-uri`. Or a frozen `ipfs://` override + `lock-uri`. |
194
+ | **Bigger / dynamic** (most PNG/JPEG) | **image off-chain, JSON on-chain, no server** — `--onchain-uri --backend arweave` (or `ipfs`). For metadata you edit often, a **resolver** instead. | image off-chain (Arweave = permanent) + on-chain renderer + `lock-field`/`lock-uri`. |
186
195
 
187
- **Four patterns, by where bytes live × how `tokenURI` resolves:**
196
+ **Four patterns, by where bytes live × how `tokenURI` resolves** — pick one, then read
197
+ [decisions.md](reference/decisions.md) for how to configure it:
188
198
  1. **Fully on-chain** (`--onchain-image`) — bytes + JSON on-chain. Tiny art only.
189
- 2. **Image off-chain, JSON on-chain, no server** (`--onchain-uri --backend arweave|ipfs|cloud`) — the sweet spot for static art. Arweave/IPFS (permanent, content-addressed) or your S3/CDN (`--backend cloud --public-base <url>`; centralized, mutable). Many files → one `url-template`.
190
- 3. **Remote resolver** (`--public-base-url` + a node) — for mutable/dynamic metadata; **self-hosted** (`abx deploy-resolver`, you run it) or a **managed provider** (an API key, they run it). Same interface — swap with one re-point.
191
- 4. **Inline SVG on-chain** — self-contained vector art inlined into `tokenURI`. For a **1/1** that's `abx deploy … --onchain-uri`; for a **Series** of tiny SVGs use `abx deploy-series … --onchain-image --compress fastlz` (bare `--onchain-uri` on a folder does NOT inline the images — it's the image-custody flag `--onchain-image` that puts SVG bytes on-chain per token).
192
-
193
- **Picking IPFS (or Arweave) does NOT mean running a server.** The `--onchain-uri --backend ipfs|arweave` path (pattern 2) bakes the image's public **gateway** URL into on-chain JSON — a pinning service's read endpoint (a *dedicated* Pinata gateway for IPFS), not a resolver you host. So when a creator chooses IPFS, **default to this no-server path** — image on IPFS, JSON on-chain, nothing to keep running (just keep the pin alive). You only need a **resolver** (pattern 3 — managed or self-hosted) if they want *freely editable* metadata. Never present IPFS as blocked on "a public URL" or "a server always online": the gateway belongs to the pinning service and the JSON lives on-chain. (The one real input IPFS needs is `PINATA_JWT` in `.env` for pinning — that's an API upload, not a host.)
194
-
195
- **No-server tradeoff (patterns 1, 2, 4):** with the on-chain renderer only the *image* is off-chain — any **description / traits / animation_url live on-chain** (gas to write, permanent, lockable), vs a hosted resolver where they're free to edit. Cheap (a shared value is **one collection-scope field**, not one per token — the renderer falls back token→collection), but the creator should choose "no server" knowing their text metadata is on-chain.
196
-
197
- Get decisions 1–2 right before deploy (image commitment + resolver URL are written then; re-pointable, but):
198
-
199
- **1. Storage permanence** — where bytes live. Not irreversible: bytes are content-addressed by their on-chain keccak, so start on one backend and move later (`abx verify` confirms the hash). Don't let it block a first deploy.
200
- - `arweave` = pay-once permanent, no recurring fee. `cloud` (S3/R2) = durable, you maintain it. `ipfs` = decentralized, you pin it. `fs` = zero-config start, dies with the disk → move before it matters.
201
- - **`arweave` is nearly as easy as `fs` for small art** — Turbo default: **under 100 KB free, no setup** (a managed `.abx-self-host/arweave-key.json` minted on first upload; back it up with `abx storage backup-key`). Choose per command with `--backend` (stateless, no config file); a backend missing its secret falls back to `fs`.
202
- - **Who pays is a lane (`--storage-signer`)** — Turbo credits attach to an identity (managed key · `.env` key · browser wallet). **Before any top-up, check BOTH balances** (`abx storage balance --backend arweave` shows the managed key AND the wallet — spend the wallet's credits if present). On an upload error surface it verbatim — `…already been uploaded…` is *success* (dedup); don't reflexively top-up or switch to IPFS. Full lanes + failure playbook → [hosting.md](reference/hosting.md#arweave-via-turbo--the-easy-permanent-path-read-before-quoting-setup).
203
-
204
- **2. Public host URL — and who runs the resolver** (**off-chain custody only**). Baked into `tokenURI` at deploy, so the CLI **refuses an off-chain deploy without a public URL** (`ABX_PUBLIC_BASE_URL` or `--public-base-url https://…`) and **never bakes localhost** (that token resolves for no one). No exceptions.
205
- - **First ask whether you need a host at all** — tiny art is cheaper and more durable on-chain (no host). For bigger art, Arweave (no host to run) beats a resolver unless you need mutability or serve many files.
206
- - **A named remote is already configured (`ABX_REMOTE_<NAME>_URL` in `.env`)? Use it.** The creator already chose a provider — don't stand up new infrastructure beside it. **Run `abx remote <name>` FIRST, before registering anything**: it prints the provider's chain coverage + whether rendering is managed, and it *validates the key* (`401` = the token in `ABX_REMOTE_<NAME>_TOKEN` is stale/wrong → they replace the value in `.env`; `403` = the key is fine but not authorized for this contract/chain → provider-side scoping, don't touch the key). Then register: `abx add <addr> --remote <name>`. Testing a replacement key without editing `.env` first: `abx remote <name> --remote-token <new-key>`.
207
- - **Otherwise, two equal ways to have a resolver, one config change apart.** A **managed provider** — one base URL + one API key, no cloud account, nothing to keep alive; often **managed rendering** too, so a code drop needs no effects runner (**lead with this when the creator doesn't already run infrastructure or doesn't want to** — [hosting.md → Managed providers](reference/hosting.md#managed-providers--a-resolver-someone-else-runs---remote-name)). Or **self-host** (`abx deploy-resolver`, [hosting.md](reference/hosting.md)) — the creator owns the node and the cloud account. Same interface, same commands; a project moves between them with one re-point + re-register. **No provider key in hand and none to get? Self-host is the fully-supported path today** — the provider market is only starting to form; never invent or recommend a provider that isn't in front of you.
208
- - **Tunnels (ngrok/cloudflared) are preview-only — never bake one on-chain** (dies on sleep, rotates on restart). A real launch puts the resolver on a host you control under your own domain (move = a DNS re-point), or behind a provider.
209
-
210
- **3. Identity** — `--name`, `--symbol`, `--royalty-bps` (default 500 = 5%), `--description "…"`, `--external-url <url>` (both served in the metadata — set them or the description is boilerplate). Owner + royalty receiver = the deploying wallet. These default to off-chain operator metadata (editable via `abx add <addr> --description "…"`). For a description that should outlast any node, add `--description-onchain` (or later `abx set-field <addr> --field description --text "…"`) → on-chain, freezable via `lock-field`; the resolver prefers the on-chain value. This is the per-field on-chain model — any field on-chain or off, one active `representation` (inline · reader · keccak256 · arweave · ipfs · url). Background: [metadata model](https://abx.docs.artblocks.io/protocol/metadata/).
211
- - **Credit + license** — deploy flags `--artist "…"` · `--license "…"` (also `--display-notes`, `--artist-links`) bake authorship + rights ON-CHAIN in the deploy tx (all three deploy commands); or set/change them later with `abx set-field <addr> --collection --field artist|license --text "…"`. Reserved collection fields served in `contractURI`, on any type (1/1 · Series · code). Detail: [operating.md → Authorship + rights](reference/operating.md#authorship--rights-credit--license).
212
- - **Propose a real name/symbol and confirm — never silently bake a generic folder-name guess.** A folder called `series`/`images`/`photos` infers junk ("Series" / "SRS"), and on all three deploy commands the CLI *refuses* a real send that would bake its own placeholder identity (`--name`/`--symbol` missing) — because on-chain identity is effectively permanent. **In `--dry-run` the same check only warns** (so a preview still runs before you have the creator's title); don't read that warning as "the CLI allows it" — the real deploy stops. Suggest a specific title + a short ticker-style symbol drawn from the actual work, and get an explicit yes before deploying. Inference is a suggestion to confirm, not a default to ship — if the folder name is generic, say so and ask rather than proposing it.
213
-
214
- **4. Image placement** — `--image <path>` (png · jpg · gif · svg · webp). The on-chain keccak256 (`image` field) anchors integrity; size is bounded by the backend, not the chain.
215
- - *Off-chain:* the served `image` is the backend's **gateway HTTPS URL** (`https://<gateway>/ipfs/<cid>`), not raw `ipfs://` (wallets/marketplaces can't render that). So off-chain needs a pinning service + a **public** gateway — with Pinata use a **dedicated** gateway (`--gateway https://<you>.mypinata.cloud`); a local kubo gateway is preview-only. The keccak stays the anchor → move gateways without a tx.
216
- - *Fully on-chain:* `abx set-field <addr> --field image --file <path> [--compress fastlz]` splits into SSTORE2 chunks behind the shared reader; or bake it in with `abx deploy --image <path> --onchain-image [--compress fastlz]`.
199
+ 2. **Image off-chain, JSON on-chain, no server** (`--onchain-uri --backend arweave|ipfs|cloud`) — the sweet spot for static art.
200
+ 3. **Remote resolver** (`--public-base-url` + a node) — mutable/dynamic metadata; self-hosted or a managed provider.
201
+ 4. **Inline SVG on-chain** — self-contained vector art. 1/1 `--onchain-uri`; a Series of SVGs `--onchain-image --compress fastlz`.
217
202
 
218
- **Inline vs reader default to the reader for real artwork.** `--onchain-uri` alone inlines the SVG (1 tx, ~700 gas/byte); `--onchain-image --compress fastlz` stages via SSTORE2 + a small `reader` pointer (~200 gas/byte, +1 tx) — **cheaper above ~0.5 KB** and widening with size. So: tiny (<~0.5 KB, a one-line SVG/short text) → `--onchain-uri` inline; real artwork (a few KB+) → `--onchain-image --compress fastlz`. **Never `--compress gzip` for an on-chain-rendered token** — gzip decodes off-chain only, breaking `--onchain-uri`; use fastlz (it decodes *in* the reader).
203
+ **IPFS/Arweave is NOT a server.** Pattern 2 bakes the pinning service's public gateway URL into
204
+ on-chain JSON — nothing to keep running. Only pattern 3 needs a resolver. Never tell a creator IPFS
205
+ is blocked on "a public URL" or "a server always online".
219
206
 
220
- **5. On-chain vs off-chain resolution** — by default `tokenURI`/`contractURI` point at your resolver. `--onchain-uri` = JSON assembled *on-chain* by the shared `AbxMetadataRenderer`, self-resolving forever — so it pairs with on-chain content, cost-effective only for tiny art (thresholds above).
221
- - **Fully on-chain = no server.** Don't stand one up; never cite a localhost URL. **Prove it with `abx tokenuri <addr>`** (reads `tokenURI(0)` over RPC, no `serve`). `abx serve` is only for off-chain-resolving tokens.
222
- - **The off-chain `tokenURI` is a base, not a per-token URL** — the contract stores a base and derives `{base}/{chainId}/{address}/{tokenId}`. Set via `--public-base-url` or `set-token-uri --uri <base>` later.
223
- - **Don't default to a frozen `ipfs://` tokenURI** — every edit then = re-pin + on-chain re-point, and the event spine stops driving the token (exiting the spec). Right only for true immutability, then lock it (`set-token-uri --override ipfs://<cid>` then `lock-uri`).
224
- - **Store ≠ lock; lock last.** On-chain ≠ frozen. Deploy unlocked, confirm it resolves in production, *then* freeze. Two locks: `lock-field <addr> --field <name>` (a value) + `lock-uri <addr>` (how it resolves). Both = provably immutable. A deliberate follow-up, not the first deploy.
207
+ **The six decisions** — storage permanence · public host URL · identity · image placement · on-chain
208
+ vs off-chain resolution · when to mint. Full detail, tradeoffs and failure modes:
209
+ **[decisions.md](reference/decisions.md)**. The four that can go permanently wrong, in brief:
225
210
 
226
- **6. When to mint** [Deploy strategy](#deploy-strategy--when-to-mint).
211
+ - **Never bake localhost** into an off-chain deploy — that token resolves for no one. The CLI refuses it; don't try to talk it round.
212
+ - **Propose a real name/symbol and get an explicit yes** — on-chain identity is effectively permanent, and a generic folder name infers junk. The CLI refuses a real send that would bake its own placeholder (a `--dry-run` only warns — that is not permission).
213
+ - **Store ≠ lock; lock last.** Deploy unlocked, confirm it resolves in production, *then* freeze (`lock-field` / `lock-uri`). A deliberate follow-up, never the first deploy.
214
+ - **Tunnels (ngrok/cloudflared) are preview-only** — never bake one on-chain.
227
215
 
228
216
  ## Confirm before sending
229
217
 
@@ -292,7 +280,8 @@ A token is **not "just a picture."** It anchors **named, typed files** ("artifac
292
280
  - **Attach a file:** `abx attach <addr> <key> <ipfs://… | ar://… | https://…>` — `<key>` is any name you choose (`print`, `certificate`, `stems`, `readme`) and becomes the manifest entry's key. The representation is **auto-detected** from the URI scheme; the `mimeType` is declared from the file **extension** (`…/master.tiff` → `image/tiff`), so point the URI at the file itself. Tiny bytes with no external host can go **on-chain** with `--file <path>`. Token scope by default; `--collection` for a collection-wide file. Any signing lane; `--dry-run` previews. It's one file per call, run **after deploy**.
293
281
  - **Don't have a URL yet? Upload first.** `attach` takes a locator you already host. `abx storage upload <path> --backend arweave|ipfs` uploads one file and prints a locator that **keeps the filename** (so the declared type survives) plus the ready-to-run `attach` line (Arweave = pay-once permanent; the same backends `deploy` uses; `--dry-run` to preview without uploading). Full flow: `abx storage upload master.tiff --backend arweave` → copy the printed locator → `abx attach <addr> print <that-locator>`.
294
282
  - **`artifacts` is COMPUTED, never a field you set.** The resolver/renderer assembles the list from your fields — setting a field literally named `artifacts` is refused. You attach one file per key; the manifest builds itself.
295
- - **The complete listing is a resolver surface.** A resolver serves the full `artifacts` list at `/t/<chainId>/<addr>/<id>`, and `/data/<key>` fetches each file. The bare on-chain `tokenURI` enumerates **reserved fields only** (there's no on-chain enumeration of arbitrary keys) — so a project that must surface extra files to consumers today runs a resolver (attached files are still stored on-chain + keccak-anchored regardless).
283
+ - **The complete listing is a resolver surface.** A resolver serves the full `artifacts` list at `/t/<chainId>/<addr>/<id>`, and `/data/<key>` fetches each file. The bare on-chain `tokenURI` enumerates **reserved fields only** (the EVM can't enumerate arbitrary FIELD keys) — so a project that must surface extra files to consumers today runs a resolver (attached files are still stored on-chain + keccak-anchored regardless).
284
+ - **PostParams are the exception — they need no resolver.** Params enumerate on-chain, so a bare `tokenURI` already carries every set value under **`abx_params`**. The line to give a creator: *attachments always need a resolver; params never do.*
296
285
  - **Effect outputs are artifacts too.** A code project's effect runner publishes `render/image`, `render/traits`, and any extra declared output (e.g. a hi-res `render/print`) into the same manifest automatically, at the current settled state — files appear as tokens are minted and params change (see [code-projects](reference/code-projects.md)).
297
286
  - **Not the same as a Series.** `deploy-series` makes **N separate tokens, one file each**. The data plane is how **one** token holds several named files. Depth (representations, verify, reserved keys, on-chain-vs-resolver) → [operating.md](reference/operating.md#attaching-files--the-data-plane).
298
287
  - **Set expectations honestly (say it up front).** No mainstream marketplace (OpenSea/Blur) shows a "files" tab **today** — they render `image`/`animation_url` only. Attached files are a durable, cryptographically-anchored part of the token *now*, read by **data-plane-aware tools and any resolver**; broad marketplace display is future adoption. So a creator verifies an attach by **curling their resolver's listing**, not by refreshing OpenSea (which won't show it).
@@ -344,6 +333,7 @@ Whichever you land on, **keep using that same invocation for every command in th
344
333
  ## Reference files
345
334
 
346
335
  - **Public docs — the human-facing companion** at **https://abx.docs.artblocks.io** (quickstart, guides, the CLI/SDK reference, the protocol model). This skill is YOUR operating manual and stays authoritative for how to drive the CLI; the docs site is what you **link the creator to** for background/onboarding, and a place you can read if you want the protocol rationale behind a command. Don't send the creator commands to run (you run them) — send them the docs to *read*.
336
+ - **Configuring a real launch — the six decisions in depth** (storage backends + who pays, public host URL + managed vs self-hosted, identity/credit/license, image placement + inline-vs-reader thresholds, on-chain vs off-chain resolution, store-vs-lock) → **[reference/decisions.md](reference/decisions.md)**
347
337
  - **Code projects — operating depth** (what to keep running, the resume loop, verify-it-resolves, render ops, `--onchain-uri`/`--image-base`/traits internals, arweave delay, `deploy-code` flags, mint timing/pause/supply) → **[reference/code-projects.md](reference/code-projects.md)**
348
338
  - **Operating an existing project** (owner ops, **artist credit + license fields**, **attaching files / the data plane**, selling via the shared minter, `abx mint-page`, moving hosting, resolver→resolver `migrate`) → **[reference/operating.md](reference/operating.md)**
349
339
  - **Hosting infrastructure** (storage backends, Turbo lanes + failure playbook, **managed providers + named remotes + the service descriptor**, `deploy-resolver`, `deploy-effects`, local-vs-remote stores, token API routes, Docker) → **[reference/hosting.md](reference/hosting.md)**
@@ -45,6 +45,36 @@ When a creator arrives with an *idea* and you write the program, it must read it
45
45
 
46
46
  **`abx inspect <script>` is your author-time check** — iterate the script against it before picking a lane: its **PostParams** list must show every collector key you intend (if it says "none detected" but you meant `palette` to be collector-set, you're reading it the wrong way), and its **Traits** line must not say "no traits reported" if you want filterable traits. (A Solidity in-chain renderer is a *different* contract — see [In-chain Solidity SVG](#in-chain-solidity-svg--the-zero-dependency-lane); the `abx.js` contract above is for a JS `--script`/`--code-dir` program.)
47
47
 
48
+ ## Time-based + audio projects (sound, music, generative composition)
49
+
50
+ The protocol supports these: `animation_url` is an HTML document, so Web Audio works, and `abx attach`
51
+ handles `.wav`/`.mp3`/`.mid` as artifacts. Five judgments the visual lanes don't need:
52
+
53
+ - **Autoplay is blocked, and a marketplace iframe cannot ask.** No browser starts audio without a user
54
+ gesture, and the piece will be embedded in someone else's page. Author it to render *silent and
55
+ correct*, then start sound on first interaction (a click/keypress handler, or an in-piece play
56
+ affordance). A piece that only makes sense with sound running is a piece most viewers see mute.
57
+ - **The thumbnail is a real design decision, not a screenshot.** `image` is what every marketplace
58
+ grid, wallet, and social embed shows. Decide with the creator what the still *is* — a score, a
59
+ waveform, a spectrogram, a generative visual driven by the same seed — and draw it on a canvas so
60
+ the render effect can capture it. "It's audio, so there's no image" ships an empty grid tile.
61
+ - **`abx.done()` is the capture point, not the end of the piece.** For a duration-based work, call it
62
+ once the *visual* has settled (the still is what's being captured), not when playback finishes —
63
+ otherwise every capture waits out the full piece and `--shoot`/the render effect time out. A long
64
+ piece with a fast-settling visual is the normal, correct shape.
65
+ - **Audio libraries follow the same dependency rule as visual ones.** `Tone` is detected by
66
+ `abx inspect`; declaring it on-chain (`--dep tone@<version>`) needs a dependency registry entry,
67
+ which means **Sepolia, not Base Sepolia** — same constraint as `p5`. Hand-rolled Web Audio (no
68
+ library) has no such constraint and goes fully on-chain on either chain.
69
+ - **There is no `render/audio` output declaration.** The render effect produces the *still*; audio
70
+ lives inside the document (or as an attached artifact), never as a second rendered output. Don't
71
+ invent an output kind — see [the artifacts/attach lane](operating.md) for shipping the source audio
72
+ alongside the piece.
73
+
74
+ Everything else — seeds, traits, PostParams, the studio loop — is identical to a visual project.
75
+ `--shoot`'s per-seed traits table still works: encode musical invariants (key, tempo, section count)
76
+ as traits and it becomes your property check.
77
+
48
78
  ## Studio loop — iterate on the art before you deploy anything
49
79
 
50
80
  [← Phase 0 in SKILL.md](../SKILL.md#phase-0--make-the-work-first-skip-every-gate-below-until-its-good). When the creator is still designing, your job is to make the work **visible, interactive, and fast to change**. One command does it:
@@ -117,15 +147,22 @@ Two kinds of inputs feed a piece: **settled state** (explicit PostParams, the se
117
147
 
118
148
  - **Template mode (`--script`) can be CHAIN-COMPLETE** — the generator assembles the full HTML document (`data:text/html;base64`) from the on-chain chunks — **iff every `--dep` resolves to proven on-chain bytes** on the registry (`p5@1.0.0` qualifies on Sepolia). A CDN-served dep still *serves fine* but breaks chain-completeness. Zero-dep vanilla JS is trivially chain-complete.
119
149
  - **Directory mode (`--code-dir`) is no-server, not chain-complete**: the generator emits `{gateway}/{code root}/index.html?abx=<tokenData>` — liveness rides the gateway (default `ipfs.io`/`arweave.net`; repoint with `abx configure-param <addr> - display.gateway <prefix>`), permanence rides the pin/endowment, params ride the URL (**8KB budget** — `abx verify` reports `urlOverBudget`; big params ⇒ prefer template mode).
120
- - **`params.keys` is auto-managed**: the deploy writes this contract param (schema keys itself, sorted CSV) so the generator's on-chain `tokenData` carries the full param surface, byte-aligned with the resolver's. Add a param key another way and `abx configure-param` prints the exact fix when the CSV drifts.
121
- - **Verify it**: `abx verify <addr>` eth_calls the generator's `onChainStatus` (branch — template/directory · chain-complete · unresolved refs · URL budget) AND decodes `tokenURI` straight from the contract, reporting the `animation_url` form. `abx tokenuri <addr>` is the quick raw read.
150
+ - **Key enumeration lives in the contract nothing to maintain**: the params store lists its own keys on-chain, so the generator's `tokenData` always carries the full param surface, byte-aligned with the resolver's. Add a param key any way you like and it appears; there is no key list to sync and nothing that can drift. (Projects deployed before this shipped point at the older generator, which read a `params.keys` CSV — they keep working, untouched, and nothing writes one any more.)
151
+ - **Verify it**: `abx verify <addr>` eth_calls the generator's `onChainStatus` (branch — template/directory · chain-complete · unresolved refs · URL budget) AND decodes `tokenURI` straight from the contract, reporting the `animation_url` form. `abx tokenuri <addr>` is the quick raw read — and the cheapest proof a param really landed on-chain: look for its key under **`abx_params`** in that decoded JSON, no resolver anywhere.
122
152
 
123
153
  ### PostParam schema — the Type + Auth catalog
124
154
 
125
- A schema is `key:Type:Auth` (repeat comma-separated: `--schema palette:HexColor:TokenOwner,speed:Uint256Range[0..100]:Artist`). The Type token carries an optional **bracket suffix**: a **`Select` MUST list its options** (`Select[Spring|Summer|Autumn|Winter]`, pipe-delimited — a Select with no options is rejected, because the on-chain schema requires them), and a **Range MAY carry bounds** (`Uint256Range[0..100]`, `Int256Range[-50..50]`, `DecimalRange[0..1]`, `Timestamp[2026-01-01..2026-12-31]` — omit for unbounded). The delimiters never collide (params `,` · fields `:` · options `|` · bounds `..`, all inside `[…]`). Declared at **deploy** (`--schema`); set later per token with `abx configure-param <addr> <id> <key> <value>` (value canonically encoded per Type — you pass the human form; a Select takes a label or its index). Adding a schema to an already-deployed contract isn't a CLI command today; declare params at deploy.
155
+ A schema is `key:Type:Auth` (repeat comma-separated: `--schema palette:HexColor:TokenOwner,speed:Uint256Range[0..100]:Artist`). The Type token carries an optional **bracket suffix**: a **`Select` MUST list its options** (`Select[Spring|Summer|Autumn|Winter]`, pipe-delimited — a Select with no options is rejected, because the on-chain schema requires them), and a **Range MAY carry bounds** (`Uint256Range[0..100]`, `Int256Range[-50..50]`, `DecimalRange[0..1]`, `Timestamp[2026-01-01..2026-12-31]` — omit for unbounded). The delimiters never collide (params `,` · fields `:` · options `|` · bounds `..`, all inside `[…]`). Declared at **deploy** (`--schema`); set later per token with `abx configure-param <addr> <id> <key> <value>` (value canonically encoded per Type — you pass the human form; a Select takes a label or its index).
156
+
157
+ **See what a live project already has: `abx state <addr>`** lists every governed PostParam — type, auth, bounds/options, an upcoming lock date, and a `retired` marker. Read it BEFORE `set-schema` on an existing key: the write is a full-row upsert, so you need the current shape to avoid clobbering a field you didn't mean to touch.
158
+
159
+ **Both halves are plain chain reads.** Declared schemas enumerate on-chain (`paramSchemaKeys()` — every governed key, including one nobody has written yet), and every *set* value shows up in the token's `tokenURI` under `abx_params`. So a project's configure UI can be built from the chain alone, and a collector's write is visible metadata the moment it lands — no resolver, no indexer.
160
+
161
+ **The param surface is NOT frozen at deploy.** `abx set-schema <addr> --schema key:Type:Auth` attaches or replaces one key's schema on a live contract, so a piece that turns out to need another dial does **not** need a redeploy (which would cost the address, the mints, and the collectors). Two things to hold onto when you use it: it is a **full-row upsert**, so replacing a schema rewrites every field — restate anything you want to keep, including an existing `lock=`; and the chain does **not** re-validate values already stored under the key, so narrowing a bound, dropping a `Select` option, or changing the Type strands them (the CLI refuses that unless you pass `--force`). Tell the creator plainly before forcing one.
126
162
 
127
163
  - **Types:** `Bool` (`true`/`false`) · `Select[A|B|C]` (**options required in brackets**; set by a label from the list, or its index) · `Uint256Range[min..max]` (non-negative integer; bounds optional) · `Int256Range[min..max]` (signed integer) · `DecimalRange[min..max]` (decimal, ≤10 places) · `HexColor` (`#rrggbb`) · `Timestamp[min..max]` (Unix seconds **or** an ISO date like `2026-07-16`) · `String` · `Bytes` (`--file <path>` for the payload).
128
- - **Auth — who may set the param:** `Artist` (the contract owner) · `TokenOwner` (the token's current holder; **delegate.xyz honored**) · `Address` (a specific named address) · and the `Or` combinations `ArtistOrTokenOwner` · `ArtistOrAddress` · `TokenOwnerOrAddress` · `ArtistOrTokenOwnerOrAddress`. The chain enforces it — a wrong signer reverts. (There is **no** "anyone" leg a param is always artist / token-owner / a named address.)
164
+ - **Auth — who may set the param:** `Artist` (the contract owner) · `TokenOwner` (the token's current holder; **delegate.xyz honored**) · `Address(0x…)` (a specific named writer — **name it inline**, e.g. `board:Bytes:Address(0xabc…)`) · and the `Or` combinations `ArtistOrTokenOwner` · `ArtistOrAddress` · `TokenOwnerOrAddress` · `ArtistOrTokenOwnerOrAddress`. The chain enforces it — a wrong signer reverts. There is **no "anyone" leg**, but the `Address` leg is a plain `msg.sender` check with no EOA restriction, so **a contract may hold it** — that is how open / multi-party participation is built (a controller contract applies its own rules and forwards the write). If a creator wants a communal canvas or open entry, that is the shape to describe, not a missing feature.
165
+ - **`:lock=<when>` — an optional 4th field** that freezes the VALUE after a time (`palette:HexColor:TokenOwner:lock=2026-12-31`; ISO date, unix seconds, or `now`). A lock already in the past is permanent, which is the supported way to **retire** a param: `abx retire-param <addr> <key>`. It stops all further writes forever; it does **not** remove the key (a governed key stays governed) and does **not** erase a value already stored — that value keeps serving. Never describe retiring as deleting.
129
166
  - Examples: a collector-tunable color → `palette:HexColor:TokenOwner`; a collector-chosen mood → `mood:Select[Calm|Wild|Chaotic]:TokenOwner`; an artist-only bounded dial → `speed:Uint256Range[1..10]:Artist`; an on/off toggle → `invert:Bool:TokenOwner`.
130
167
 
131
168
  ## `--image-base` — deterministic S3/CDN thumbnail URLs (no metadata resolver)
@@ -162,7 +199,7 @@ The renderer is the creator's own Solidity (compiled + deployed with forge — t
162
199
  - **Correct content-type + shape.** `image` → `image/svg+xml` (or another image MIME) returning a valid document; `attributes` → `application/json` whose bytes are a JSON **array** `[{"trait_type":…,"value":…},…]` (numbers unquoted, strings escaped). A wrong type or malformed array is a broken/blank marketplace field.
163
200
  - **Guard the field, wire the right one.** Revert `UnsupportedField` for a field it doesn't serve (a wiring mistake fails loud), and make sure `--image-renderer`/`--attributes-renderer` point at the renderer that actually serves that field.
164
201
  - **`view` + deterministic.** Same chain state → same bytes. No unseeded randomness; read block/oracle state only if you *intend* live data (it re-reads per view).
165
- - **Read params LIVE via `IAbxParams(token)`** (`tokenParam`/`contractParam`, token scope wins) — so a collector's `configure-param` shows up on the next read with no redeploy. Never bake a param value in at deploy.
202
+ - **Read params LIVE via `IAbxParams(token)`** (`tokenParam`/`contractParam`, token scope wins; `tokenParamKeys`/`contractParamKeys` if the renderer must handle keys it wasn't written to name) — so a collector's `configure-param` shows up on the next read with no redeploy. Never bake a param value in at deploy.
166
203
  - **Keep the output bounded.** It assembles into `tokenURI` per call; a very large SVG/HTML can strain the `eth_call` gas on unauthenticated public reads.
167
204
 
168
205
  Fork `contracts/src/renderers/examples/{SeedSvgRenderer,SeedTraitsRenderer}.sol` — they satisfy every invariant above (graceful fallbacks, the sentinel, content-types, live param reads) and are the reference to review a fork against.