@artblocks/abx-cli 0.1.0-alpha.40 → 0.1.0-alpha.42

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.
Files changed (77) hide show
  1. package/CHANGELOG.md +222 -0
  2. package/assets/renderer-scaffold/README.md +12 -0
  3. package/assets/renderer-scaffold/foundry.toml +4 -0
  4. package/assets/renderer-scaffold/script/Preview.s.sol +99 -0
  5. package/dist/capabilities.d.ts +9 -4
  6. package/dist/capabilities.d.ts.map +1 -1
  7. package/dist/capabilities.js +13 -4
  8. package/dist/capabilities.js.map +1 -1
  9. package/dist/commands/deploy.d.ts +51 -1
  10. package/dist/commands/deploy.d.ts.map +1 -1
  11. package/dist/commands/deploy.js +1008 -172
  12. package/dist/commands/deploy.js.map +1 -1
  13. package/dist/commands/maintenance.d.ts +4 -0
  14. package/dist/commands/maintenance.d.ts.map +1 -0
  15. package/dist/commands/maintenance.js +114 -0
  16. package/dist/commands/maintenance.js.map +1 -0
  17. package/dist/commands/project.d.ts +175 -3
  18. package/dist/commands/project.d.ts.map +1 -1
  19. package/dist/commands/project.js +359 -29
  20. package/dist/commands/project.js.map +1 -1
  21. package/dist/commands/reads.d.ts +21 -0
  22. package/dist/commands/reads.d.ts.map +1 -1
  23. package/dist/commands/reads.js +171 -4
  24. package/dist/commands/reads.js.map +1 -1
  25. package/dist/commands/scaffold.d.ts.map +1 -1
  26. package/dist/commands/scaffold.js +5 -0
  27. package/dist/commands/scaffold.js.map +1 -1
  28. package/dist/commands/service.d.ts.map +1 -1
  29. package/dist/commands/service.js +7 -0
  30. package/dist/commands/service.js.map +1 -1
  31. package/dist/commands/storage.d.ts.map +1 -1
  32. package/dist/commands/storage.js +32 -3
  33. package/dist/commands/storage.js.map +1 -1
  34. package/dist/commands/submit-app.d.ts +43 -0
  35. package/dist/commands/submit-app.d.ts.map +1 -1
  36. package/dist/commands/submit-app.js +115 -6
  37. package/dist/commands/submit-app.js.map +1 -1
  38. package/dist/config.d.ts +16 -1
  39. package/dist/config.d.ts.map +1 -1
  40. package/dist/config.js +73 -7
  41. package/dist/config.js.map +1 -1
  42. package/dist/deploy-plan.d.ts +221 -0
  43. package/dist/deploy-plan.d.ts.map +1 -0
  44. package/dist/deploy-plan.js +20 -0
  45. package/dist/deploy-plan.js.map +1 -0
  46. package/dist/flag-allowlists.d.ts.map +1 -1
  47. package/dist/flag-allowlists.js +5 -1
  48. package/dist/flag-allowlists.js.map +1 -1
  49. package/dist/flags.d.ts +6 -0
  50. package/dist/flags.d.ts.map +1 -1
  51. package/dist/flags.js +14 -0
  52. package/dist/flags.js.map +1 -1
  53. package/dist/jsonout.d.ts.map +1 -1
  54. package/dist/jsonout.js +11 -0
  55. package/dist/jsonout.js.map +1 -1
  56. package/dist/main.js +62 -13
  57. package/dist/main.js.map +1 -1
  58. package/dist/ownerops.d.ts +139 -1
  59. package/dist/ownerops.d.ts.map +1 -1
  60. package/dist/ownerops.js +382 -19
  61. package/dist/ownerops.js.map +1 -1
  62. package/dist/riskgate.d.ts +36 -0
  63. package/dist/riskgate.d.ts.map +1 -1
  64. package/dist/riskgate.js +91 -17
  65. package/dist/riskgate.js.map +1 -1
  66. package/dist/script-chunks.d.ts +1 -1
  67. package/dist/script-chunks.d.ts.map +1 -1
  68. package/dist/script-chunks.js +2 -2
  69. package/dist/script-chunks.js.map +1 -1
  70. package/package.json +6 -6
  71. package/skill/SKILL.md +6 -4
  72. package/skill/reference/code.md +31 -8
  73. package/skill/reference/deploy.md +9 -2
  74. package/skill/reference/diagnose.md +15 -2
  75. package/skill/reference/hosting.md +26 -0
  76. package/skill/reference/operate.md +55 -4
  77. package/skill/reference/setup.md +14 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,227 @@
1
1
  # @artblocks/abx-cli
2
2
 
3
+ ## 0.1.0-alpha.42
4
+
5
+ ### Minor Changes
6
+
7
+ - 0fed512: `deploy-code`'s post-deploy setup (script chunks, PostParam schemas, dependency declarations,
8
+ on-chain-URI legs, reserve mints) no longer rides one atomic multicall no matter how large the
9
+ on-chain script is. A 60KB script (3 chunks) produced a setup transaction wanting 17,307,586 gas
10
+ against the ~16,777,216 (2^24) `eth_estimateGas` ceiling — not the block gas limit — and failed with
11
+ a useless "gas limit too high", leaving a verifiably half-configured contract on chain.
12
+
13
+ The setup now splits into gas-bounded transactions when it doesn't fit one: every script-chunk batch,
14
+ then every config (schema/dependency/on-chain-URI) batch, then every mint batch, in that order and
15
+ never mixed. Script-chunk writes and config setters are idempotent, so an interruption at any split
16
+ point is finished by the existing `deploy-code --resume` (which now also gas-batches whatever it
17
+ finds missing); mints ride strictly last because a mint is the one non-idempotent leg. A setup that
18
+ already fit one transaction is unaffected — same single combined multicall as before. There is no new
19
+ size-based refusal; the dry run's `transactions`/`approvals` reports the real transaction count and
20
+ cost for the whole plan.
21
+
22
+ `@artblocks/abx-sdk` exports the reusable pieces: `packCallsByGas` (a generic gas-bounded bin packer,
23
+ the call-level sibling of `planContentTxs`'s own batching), `estimateChunkGasForBytes`, and
24
+ `SETUP_LEG_GAS` (flat gas estimates for a schema/dependency/on-chain-URI/mint call).
25
+
26
+ - 0fed512: Fixed three omissions in the structured deploy `--json` `plan` object (a cold-agent regression sweep
27
+ of issue #123's plan surfaced all three): `plan.custody` now carries the on-chain renderer address
28
+ (the same one the "On-chain renderer" step prints) and, on the single-file image lanes
29
+ (`deploy`/`deploy` `--copies`), file metadata for a staged `--onchain-image` (raw bytes, staged/
30
+ compressed bytes, sniffed MIME type, and a keccak256 of the local file) — both were visible in the
31
+ human dry-run/confirm prose but entirely absent from the JSON payload. `plan.transactions.legs` now
32
+ always ends with `'deploy'` when non-null, naming the deploy transaction itself instead of silently
33
+ omitting it from its own leg list (the `--resume` lane, which never deploys, is unaffected). The
34
+ `estimate` field's `null` on lanes that compute no cost figure was investigated and confirmed
35
+ genuinely absent — not fabricated, no new RPC calls added.
36
+
37
+ `DEPLOY_PLAN_SCHEMA_VERSION` is bumped to `2` for this shape change. The human dry-run/confirm output
38
+ is unchanged, byte for byte; this is additive to the JSON only.
39
+
40
+ ### Patch Changes
41
+
42
+ - 0fed512: `--dry-run` used to report `"status": "would-succeed"` from an unconstrained `eth_call` that never
43
+ checked whether the signer could actually PAY for the send — a funded on-chain sweep hit a
44
+ `replace-script --dry-run` that said "would succeed" for a send whose real gas need was 49% higher
45
+ and then failed. The simulation now reuses `pinGas` (the exact gas selection the real send makes),
46
+ prices it against the signer's current balance, and reports one of three honest states — `would-
47
+ succeed` (state check passed AND affordable), `would-revert` (a proven failure, including
48
+ "insufficient funds" with the actual numbers), or `unknown` (neither could be established — never
49
+ collapsed into either of the others). `simulation.estimatedGas`/`estimatedCostWei`/`balanceWei` carry
50
+ the real numbers; `transaction.gasFloor` remains a proven MINIMUM used to detect an implausible
51
+ estimate, never a prediction of total cost.
52
+
53
+ `abx replace-script`'s own `gasFloor` (restated for its batched multicall) was 49% below what a real
54
+ send needed — not wrong about what it claimed, but incomplete: it counted only SSTORE2's 200
55
+ gas/byte code-deposit cost, omitting the CREATE opcode's fixed 32,000 gas per chunk write and the
56
+ transaction's own intrinsic calldata cost (both unconditional, provable physics, unlike a simulated
57
+ estimate). It now includes both, computed from the real encoded calldata rather than approximated —
58
+ still a lower bound, never an invented number.
59
+
60
+ - 0fed512: `abx lock-field` now checks which scope (token or collection) actually serves a field's value before
61
+ locking — a token-scope value wins over collection when both are set, so locking the scope that
62
+ ISN'T serving the value used to report "would succeed" (and would succeed) while freezing an empty
63
+ or overridden slot, not what a viewer sees. It's refused by default, naming the correct command
64
+ (`--collection` or `--token <id>`); `--force-field` proceeds anyway with a loud warning instead of a
65
+ silent no-op, for the legitimate case of deliberately locking an empty slot forever. `--dry-run` and
66
+ a real send see this identically.
67
+
68
+ `abx verify` (no `--remote`) already failed fast when a project wasn't registered on this node, but
69
+ its message didn't say a resolver-served project could skip local registration entirely — an agent
70
+ following it literally (`abx add <addr>`) could walk into a full historical log scan and repeated
71
+ rate limits on a project actually meant to be checked with `abx verify <addr> --remote <name>`. The
72
+ message now names both options.
73
+
74
+ - Updated dependencies [0fed512]
75
+ - @artblocks/abx-sdk@0.1.0-alpha.32
76
+ - @artblocks/abx-indexer@0.1.0-alpha.33
77
+ - @artblocks/abx-storage@0.1.0-alpha.32
78
+ - @artblocks/abx-token-api@0.1.0-alpha.35
79
+
80
+ ## 0.1.0-alpha.41
81
+
82
+ ### Minor Changes
83
+
84
+ - c068a0f: `abx artifacts <address> [--token <id>]` reads a token's `artifacts` manifest directly, instead of
85
+ fetching and parsing the whole served tokenURI document. Reports every entry plus every
86
+ producer-registered effect row — current AND stale — each labeled against the token's active
87
+ `inputsHash`, so a param change that re-addressed a render is diagnosable rather than silently
88
+ absent. `--remote <name|url>` reads what a hosted resolver actually reports (the surface that owns a
89
+ hosted project's real artifact set), mirroring the existing `abx verify` / `abx verify --remote`
90
+ split. Neither "not registered here" nor "not registered on that remote" fails the command — both
91
+ return a stable `{surface, registered, available, reason, entries, effects}` JSON shape.
92
+ `@artblocks/abx-token-api` exports the underlying `tokenArtifacts()` read for direct SDK/server use.
93
+ - c068a0f: `abx attach` now distinguishes the on-chain field write from off-chain SERVING — the write can
94
+ succeed while nothing is able to serve it. It prints the canonical, directly-fetchable URL for every
95
+ attached key (`{base}/{chainId}/{address}[/<id>]/data/<key>`) so nobody hand-assembles the route, and
96
+ probes whether a resolver actually answers for the project right now, warning when none does (with
97
+ no resolver base baked in at all, or with one baked in that isn't currently reachable). `--collection`
98
+ now correctly reads `contractURIBase` (it previously always read `tokenURIBase`, even for a
99
+ collection-scope attach).
100
+ - c068a0f: Local data-directory resolution (`.abx-self-host` / `ABX_DATA_DIR`) is now centralized in one SDK
101
+ resolver (`resolveDataDir` from `@artblocks/abx-sdk/node`) instead of five independent copies of the
102
+ same fallback across the CLI, indexer, and storage packages — the setup that could silently split a
103
+ project's SQLite projection from its managed Arweave key into two different directories.
104
+
105
+ A handful of READ commands (`status`, `state`, `verify`, `doctor`, `capabilities`, `tokens`,
106
+ `tokenuri`, `contracturi`, `inspect`, `minter show`) now search upward from the current directory,
107
+ git-style, for an already-existing `.abx-self-host` before falling back to creating one at cwd —
108
+ bounded at the home directory, a `.git` repository root, or the filesystem root, and never crossing
109
+ into an unrelated directory tree. Running one of these from a project subdirectory (e.g. a
110
+ `contracts/` folder) now finds the same node a run from the project root would, instead of quietly
111
+ reporting an empty one. `abx status`'s existing `data: <path>` line — and a new one-line notice —
112
+ name the directory whenever it was found this way. Every WRITE command is unaffected: it always
113
+ resolves strictly to the current directory, exactly as before, so nothing is ever created somewhere
114
+ you didn't `cd` into. `ABX_DATA_DIR`, when set, still always wins outright and disables the search
115
+ entirely.
116
+
117
+ - c068a0f: Every `deploy` / `deploy-series` / `deploy-code` `--json` emit — dry-run and real send, across every
118
+ product lane and `deploy-code --resume` — now carries a versioned, structured `plan` object alongside
119
+ the existing fields: wallet transaction/approval count, expected signer/owner/royalty/minter/payee
120
+ roles, custody and URI-resolution choices, the mint plan, a cost estimate where one is computed, every
121
+ warning that run raised, and (code lanes) the per-surface thumbnail/traits/postParams disposition plus
122
+ dependency-registry info. A field a lane has no answer for is reported as `null`, never silently
123
+ absent. The human dry-run/confirm output is unchanged, byte for byte.
124
+ - c068a0f: `deploy-code --copies --code-dir <dir>` now works: an EditionCode project can point `code` at a
125
+ hosted directory build (index.html + assets uploaded to ipfs/arweave/cloud), the same as the
126
+ existing SeriesCode (721) lane.
127
+ - c068a0f: `deploy-code --copies --image-base <url>` now works: an EditionCode project can bake a
128
+ deterministic per-id off-chain still (`{base}/{id}.png`), the same field write as the existing
129
+ SeriesCode (721) lane, mutually exclusive with an on-chain `--image-renderer`. The effect runner's
130
+ render sweep excludes an id with zero live copies (no mint-time seed drawn yet), mirroring how a
131
+ burned 721 token is already excluded.
132
+ - c068a0f: `deploy-code --resume <address>` now works against an EditionCode (`--copies`) target, not just
133
+ SeriesCode. The mint leg diffs per id against that id's own `totalSupply(id)` — pass the same
134
+ content flags the original deploy used, plus `--mint-count`/`--mint-amount` if it premint any ids.
135
+ - c068a0f: `reconstructProject()` and `reconstructIncremental()` accept `toBlock: 'safe' | 'finalized'` in
136
+ addition to a literal block number and the existing `'latest'` default. The tag is resolved to a
137
+ concrete inclusive block number (via the new `resolveBlockTag()`) before any `eth_getLogs` scan
138
+ starts, and that number — never the tag — is what lands in the persisted `ProjectState.toBlock`. An
139
+ RPC that doesn't support the requested tag throws the new `BlockTagUnavailableError` instead of
140
+ silently falling back to `latest`. `SelfHostIndexer#reindex` gained a matching `blockTag` option.
141
+ Existing callers (the `'latest'`/unset default) are unaffected.
142
+
143
+ `abx index --to-block safe|finalized` stops a re-index at a reorg-safe boundary.
144
+
145
+ - c068a0f: The Solidity renderer scaffold (`abx scaffold renderer` / `abx scaffold solidity`) now ships
146
+ `script/Preview.s.sol`: a Forge script that runs the actual `IAbxFieldRenderer.render` interface
147
+ against representative token id / seed / PostParam inputs (all overridable via env vars) and writes
148
+ the SVG/JSON output to `preview-out/` for human inspection — `forge test` proves the renderer
149
+ behaves, but never let you look at what it drew. Reverts are surfaced clearly; the script is explicit
150
+ that its gas output is a local-EVM sanity check, not a production gas measurement.
151
+ - c068a0f: Add `abx replace-script <address> --script <file>` — a safe, first-class way to replace an UNLOCKED
152
+ code project's on-chain program (`SeriesCode`/`EditionCode`, before `abx lock-script`). It refuses
153
+ outright on a locked script or a non-code target, diffs the replacement by content against what's
154
+ on-chain (an index that already matches is never re-sent), handles a smaller replacement by queuing
155
+ the trailing `removeLastScriptChunk` calls it needs, folds every write and remove into ONE atomic
156
+ transaction (a revert can never leave a half-applied script), and reads the completed script back to
157
+ verify it reassembles exactly to the file before reporting success. Supports `--dry-run` and every
158
+ signing lane.
159
+
160
+ The SDK gains the primitives this is built on: `prepareSetScriptChunk`/`prepareRemoveLastScriptChunk`
161
+ (no `prepare*` wrapper existed for `OnChainScript.sol`'s writers before this — every caller hand-
162
+ encoded `encodeFunctionData`), plus `planScriptReplace`/`verifyScriptReplace`, which take a small
163
+ reader interface (mirroring `resume.ts`'s own reader seam) so the diff and post-write verification
164
+ are testable without a chain.
165
+
166
+ - c068a0f: SQLite maintenance for existing and long-running self-hosted stores (issue #113). `SqliteStore`
167
+ gains `autoVacuumMode`/`vacuumStats` (detection), `vacuumConvert` (a one-time, explicit full
168
+ `VACUUM` for a store that predates incremental auto-vacuum), and `runIncrementalVacuum` (a bounded
169
+ reclaim pass). `SelfHostIndexer.startVacuumMaintenance` runs that bounded reclaim automatically
170
+ between chain-watch ticks — never inline with a request. The new `abx vacuum [status|convert|
171
+ incremental]` CLI command exposes both halves to an operator. Also fixes a pragma-ordering bug that
172
+ left EVERY store — not just pre-existing ones — stuck at `auto_vacuum='none'` despite the earlier
173
+ incremental auto-vacuum fix (`PRAGMA auto_vacuum` must precede `PRAGMA journal_mode = WAL`, not just
174
+ the schema's first `CREATE TABLE`).
175
+ - c068a0f: `abx state` now reports every irreversible lock a collection can carry — token/contract URI, script,
176
+ dependencies, param hooks, and the standard `METADATA_FIELD` set — for both ERC-721 and ERC-1155
177
+ families, not just `paramHooks.locked`. Each lock is a distinct `true` (frozen) / `false` (open) /
178
+ `null` (unread — never collapsed into `false`) reading, in both human and `--json` output, alongside
179
+ the exact owner command that freezes it.
180
+ - c068a0f: `abx verify --json` gains a sibling `availability` field (render/serve-readiness: `available` /
181
+ `partial` / `unavailable` / `unknown`), kept separate from the integrity-only `ok`/`contentIntegrity`
182
+ that the command's exit status still reflects exactly as before. A locator-committed `image` field
183
+ (ipfs/arweave/url/url-template) this command doesn't re-fetch now reports as a `verified: null`
184
+ content check instead of silently reading as no commitment at all. Fixes a side-bug: `abx verify
185
+ --remote <r> --json` used to route around `--json` entirely and emit no payload — it now emits the
186
+ same shape as the local lane, plus a `"not-checked"` `contentIntegrity` state for when byte
187
+ integrity genuinely wasn't asked (no credential, rejected token, or an older resolver).
188
+ - c068a0f: Additive for SDK consumers — a new exported function, nothing existing changed shape or behavior.
189
+
190
+ `abx verify` now compares a collection's actual `tokenURIRenderer` and `animation_url` generator
191
+ pointers against the current canonical singletons for its chain, reporting each as current or
192
+ not-current (never treating an older-but-working deployment as broken). Adds the SDK helper
193
+ `isCurrentGenerator` alongside the existing `isCurrentRenderer` probe.
194
+
195
+ ### Patch Changes
196
+
197
+ - c068a0f: `abx storage upload <path>` now stats the path before reading it, so a directory, a missing file, or
198
+ an unreadable file gets an actionable error instead of a raw Node errno (`EISDIR: illegal operation
199
+ on a directory, read`, a bare `ENOENT` stack). The directory message points at the commands that
200
+ actually upload folder content — `abx deploy-series --dir` and `abx deploy-code --code-dir` — since
201
+ `storage upload` only ever handles a single file.
202
+ - c068a0f: `abx submit-app` no longer fails silently on RPC catch-up: the mint's token id is now recoverable
203
+ even under `--json` if metadata configuration can't proceed, the first metadata write after a fresh
204
+ mint retries a few times with backoff before giving up, and a caller who exhausts that bound gets an
205
+ explicit message naming the token id and confirming a re-run picks up exactly where it left off
206
+ (never a duplicate mint — the collection is already `claimed`). `--json`'s `withJson` helper also now
207
+ flushes whatever payload a command already `emit()`-ed before a later step throws, instead of leaving
208
+ `--json` callers with nothing on stdout when a command fails partway through.
209
+ - Updated dependencies [c068a0f]
210
+ - Updated dependencies [c068a0f]
211
+ - Updated dependencies [c068a0f]
212
+ - Updated dependencies [c068a0f]
213
+ - Updated dependencies [c068a0f]
214
+ - Updated dependencies [c068a0f]
215
+ - Updated dependencies [c068a0f]
216
+ - Updated dependencies [c068a0f]
217
+ - Updated dependencies [c068a0f]
218
+ - Updated dependencies [c068a0f]
219
+ - Updated dependencies [c068a0f]
220
+ - @artblocks/abx-token-api@0.1.0-alpha.34
221
+ - @artblocks/abx-sdk@0.1.0-alpha.31
222
+ - @artblocks/abx-indexer@0.1.0-alpha.32
223
+ - @artblocks/abx-storage@0.1.0-alpha.31
224
+
3
225
  ## 0.1.0-alpha.40
4
226
 
5
227
  ### Patch Changes
@@ -24,6 +24,9 @@ Foundry, then hand the deployed address(es) to `abx deploy-code`, which verifies
24
24
  collection surface, and a fuzz over every seed/tokenId) and that image ↔ traits stay coherent.
25
25
  - `script/Deploy.s.sol` deploys renderers; `script/DeployHooks.s.sol` deploys the three hook examples
26
26
  after a token address exists.
27
+ - `script/Preview.s.sol` — a **local preview**, not a test: runs `render()` with representative
28
+ inputs and writes the actual output to `preview-out/` so you can look at it (open the `.svg` in a
29
+ browser). `forge test` proves render() behaves; this script is the only way to see what it drew.
27
30
 
28
31
  ## Build, test, deploy
29
32
 
@@ -32,6 +35,11 @@ forge soldeer install # fetch solady + forge-std (pinned in foundry.tom
32
35
  forge build
33
36
  forge test # MUST pass — especially the never-revert cases
34
37
 
38
+ # look at what the renderer actually produces (writes preview-out/image.svg + attributes.json):
39
+ forge script script/Preview.s.sol
40
+ # override the representative token id / seed / palette without editing the script:
41
+ PREVIEW_TOKEN_ID=42 PREVIEW_SEED=0x00...abc PREVIEW_PALETTE=0x00...ff3366 forge script script/Preview.s.sol
42
+
35
43
  # deploy to your testnet, then copy the printed addresses:
36
44
  forge script script/Deploy.s.sol --rpc-url <your-rpc-url> --private-key <key> --broadcast
37
45
 
@@ -40,6 +48,10 @@ forge script script/DeployHooks.s.sol --sig "run(address,uint256)" <token> 1024
40
48
  --rpc-url <your-rpc-url> --private-key <key> --broadcast
41
49
  ```
42
50
 
51
+ `script/Preview.s.sol`'s gas numbers are a local-EVM sanity check, not a production gas measurement —
52
+ see the disclaimer in that file. For real gas numbers, deploy (above) and read `tokenURI` on the
53
+ actual chain you're targeting.
54
+
43
55
  ## Wire it into a drop
44
56
 
45
57
  ```bash
@@ -9,6 +9,10 @@ evm_version = "paris" # broad multi-chain compatibility (no PUSH0/cancun
9
9
  optimizer = true
10
10
  optimizer_runs = 1_000_000 # a renderer is deployed once and called forever → optimize runtime
11
11
 
12
+ # script/Preview.s.sol writes rendered output here for human inspection (vm.writeFileBinary).
13
+ # Foundry denies filesystem writes by default; this is the narrowest grant that lets it work.
14
+ fs_permissions = [{ access = "read-write", path = "./preview-out" }]
15
+
12
16
  # Dependencies are fetched with soldeer (`forge soldeer install`), pinned here.
13
17
  [dependencies]
14
18
  abx-contracts = "2.0.0"
@@ -0,0 +1,99 @@
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity ^0.8.20;
3
+
4
+ import {Script, console2} from "forge-std/Script.sol";
5
+ import {IAbxFieldRenderer} from "abx-contracts/src/uri/IAbxFieldRenderer.sol";
6
+ import {MyRenderer} from "../src/MyRenderer.sol";
7
+ import {MyTraits} from "../src/MyTraits.sol";
8
+ import {MockParams} from "../test/MyRenderer.t.sol";
9
+
10
+ /// @notice A human-inspection harness, not a test. `forge test` is what proves render() behaves
11
+ /// (never reverts, traits agree with the image, etc) — this script exists ONLY because
12
+ /// assertions don't let a person actually LOOK at the SVG/JSON a renderer produces. It
13
+ /// calls the exact same `IAbxFieldRenderer.render(token, tokenId, field)` interface the
14
+ /// deployed ABX token calls at read time, against a `MockParams` standing in for the
15
+ /// token (the same stand-in `test/MyRenderer.t.sol` uses), and writes the raw output to
16
+ /// disk so it can be opened in a browser or editor.
17
+ ///
18
+ /// GAS DISCLAIMER — read before trusting any number this script prints: a local
19
+ /// `forge script` run executes against an in-memory EVM with no real chain's calldata
20
+ /// pricing, contract-size/warm-storage state, or congestion. The gas this script reports
21
+ /// (and even a real `--broadcast` dry run) is NOT a production gas measurement. If you
22
+ /// need real numbers, deploy with `script/Deploy.s.sol` and read `tokenURI` on the actual
23
+ /// chain you're targeting.
24
+ ///
25
+ /// Usage (from this scaffold's directory, after `forge soldeer install`):
26
+ /// forge script script/Preview.s.sol
27
+ /// Every input has a representative default and is overridable via env vars, so you can preview
28
+ /// a specific token without editing this file:
29
+ /// PREVIEW_TOKEN_ID=42 PREVIEW_SEED=0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee \
30
+ /// PREVIEW_PALETTE=0xff3366 forge script script/Preview.s.sol
31
+ /// Set PREVIEW_TOKEN_ID to `115792089237316195423570985008687907853269984665640564039457584007913129639935`
32
+ /// (type(uint256).max) to preview the collection surface (contractURI) instead of a token.
33
+ /// Output lands in `preview-out/` at the repo root of this scaffold — open `preview-out/image.svg`
34
+ /// in a browser, `preview-out/attributes.json` in an editor.
35
+ contract Preview is Script {
36
+ function run() external {
37
+ uint256 tokenId = vm.envOr("PREVIEW_TOKEN_ID", uint256(7));
38
+ bytes32 seed = vm.envOr("PREVIEW_SEED", bytes32(uint256(0x1234)));
39
+ // `palette` is a HexColor PostParam: the RGB value packed into the low 3 bytes.
40
+ bytes32 palette = vm.envOr("PREVIEW_PALETTE", bytes32(uint256(0xff3366)));
41
+
42
+ // vm.writeFileBinary does not create parent directories; make sure ours exists.
43
+ vm.createDir("preview-out", true);
44
+
45
+ MyRenderer image = new MyRenderer();
46
+ MyTraits traits = new MyTraits();
47
+ MockParams params = new MockParams();
48
+ params.setToken(tokenId, "seed", seed);
49
+ params.setToken(tokenId, "palette", palette);
50
+
51
+ console2.log("== NOT a gas measurement (see script comment) ==");
52
+ console2.log("== preview inputs ==");
53
+ console2.log("tokenId:", tokenId);
54
+ console2.log("seed :", vm.toString(seed));
55
+ console2.log("palette:", vm.toString(palette));
56
+
57
+ _renderAndDump(image, address(params), tokenId, "image", "image", "preview-out/image");
58
+ _renderAndDump(traits, address(params), tokenId, "attributes", "attributes", "preview-out/attributes");
59
+ }
60
+
61
+ /// @dev Runs the ACTUAL renderer interface — the same call the resolver/on-chain metadata
62
+ /// renderer makes — and surfaces a revert instead of swallowing it, so a miswired field
63
+ /// or a broken invariant shows up here instead of silently bricking `tokenURI` later.
64
+ function _renderAndDump(
65
+ IAbxFieldRenderer renderer,
66
+ address token,
67
+ uint256 tokenId,
68
+ bytes32 field,
69
+ string memory fieldLabel,
70
+ string memory pathNoExt
71
+ ) private {
72
+ console2.log(string.concat("== field: ", fieldLabel, " =="));
73
+ try renderer.render(token, tokenId, field) returns (string memory contentType, bytes memory data) {
74
+ string memory path = string.concat(pathNoExt, ".", _extFor(contentType));
75
+ vm.writeFileBinary(path, data);
76
+ console2.log("contentType:", contentType);
77
+ console2.log("bytes :", data.length);
78
+ console2.log("written to :", path);
79
+ } catch Error(string memory reason) {
80
+ console2.log("REVERTED:", reason);
81
+ } catch Panic(uint256 code) {
82
+ console2.log("REVERTED, panic code:", code);
83
+ } catch (bytes memory lowLevelData) {
84
+ // A custom error (e.g. MyRenderer.UnsupportedField) has no ABI-decoded reason string —
85
+ // this is the raw revert data, selector first, so you can tell which error fired.
86
+ console2.log("REVERTED, raw data:", vm.toString(lowLevelData));
87
+ }
88
+ }
89
+
90
+ /// @dev Extension purely for local viewing convenience — not part of the on-chain contract.
91
+ function _extFor(string memory contentType) private pure returns (string memory) {
92
+ bytes32 ct = keccak256(bytes(contentType));
93
+ if (ct == keccak256("image/svg+xml")) return "svg";
94
+ if (ct == keccak256("application/json")) return "json";
95
+ if (ct == keccak256("text/html")) return "html";
96
+ if (ct == keccak256("text/plain")) return "txt";
97
+ return "bin";
98
+ }
99
+ }
@@ -49,9 +49,9 @@ export declare const ABX_CAPABILITIES: {
49
49
  readonly edition: {
50
50
  readonly contract: "EditionCode (ERC-1155)";
51
51
  readonly selector: "--copies <n|open>";
52
- readonly summary: "N generated ids × copies per id; supports scripts, dependencies, and Solidity image/trait renderers";
53
- readonly supported: readonly ["--script", "--dep", "--dep-registry", "--image-renderer", "--attributes-renderer", "--onchain-uri", "--public-base-url"];
54
- readonly unsupported: readonly ["--code-dir", "--image-base", "--resume", "--no-delegation"];
52
+ readonly summary: "N generated ids × copies per id; supports scripts, directory builds, dependencies, deterministic per-id off-chain stills, and Solidity image/trait renderers";
53
+ readonly supported: readonly ["--script", "--code-dir", "--dep", "--dep-registry", "--image-renderer", "--attributes-renderer", "--image-base", "--onchain-uri", "--public-base-url"];
54
+ readonly unsupported: readonly ["--no-delegation"];
55
55
  };
56
56
  };
57
57
  };
@@ -80,9 +80,14 @@ export declare const ABX_CAPABILITIES: {
80
80
  readonly command: "abx deploy-code --image-renderer/--attributes-renderer";
81
81
  readonly availableOn: "SeriesCode and EditionCode";
82
82
  readonly useFor: readonly ["on-chain SVG images", "on-chain computed traits"];
83
+ }, {
84
+ readonly route: "replace an unlocked script";
85
+ readonly command: "abx replace-script";
86
+ readonly availableOn: "SeriesCode and EditionCode, before `abx lock-script`";
87
+ readonly useFor: readonly ["shipping a fix to a live generative program", "iterating pre-lock without a full redeploy"];
83
88
  }];
84
89
  readonly deployTimeChoices: readonly ["contract shape and token standard (--copies)", "code-capable versus static contract type", "burnability (--burnable)", "ERC-721C/ERC-1155C enrollment (--721c)"];
85
- readonly unsupportedToday: readonly ["mainnet deployment through the toolkit", "unsupported chains", "secondary-market listings or an order book", "compiling or deploying custom Solidity through abx", "replacing a deployed code project script through the CLI", "retrofitting a deploy-time choice on an existing collection"];
90
+ readonly unsupportedToday: readonly ["mainnet deployment through the toolkit", "unsupported chains", "secondary-market listings or an order book", "compiling or deploying custom Solidity through abx", "retrofitting a deploy-time choice on an existing collection"];
86
91
  readonly interpretation: {
87
92
  readonly native: "A documented command/flag combination performs the request directly.";
88
93
  readonly extension: "A canonical extension seam performs it while the token remains a factory clone.";
@@ -1 +1 @@
1
- {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AAEtC;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmGnB,CAAC;AAEX,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAyBlD"}
1
+ {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AAEtC;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4GnB,CAAC;AAEX,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAyBlD"}
@@ -49,9 +49,13 @@ export const ABX_CAPABILITIES = {
49
49
  edition: {
50
50
  contract: 'EditionCode (ERC-1155)',
51
51
  selector: '--copies <n|open>',
52
- summary: 'N generated ids × copies per id; supports scripts, dependencies, and Solidity image/trait renderers',
53
- supported: ['--script', '--dep', '--dep-registry', '--image-renderer', '--attributes-renderer', '--onchain-uri', '--public-base-url'],
54
- unsupported: ['--code-dir', '--image-base', '--resume', '--no-delegation'],
52
+ summary: 'N generated ids × copies per id; supports scripts, directory builds, dependencies, deterministic per-id off-chain stills, and Solidity image/trait renderers',
53
+ supported: ['--script', '--code-dir', '--dep', '--dep-registry', '--image-renderer', '--attributes-renderer', '--image-base', '--onchain-uri', '--public-base-url'],
54
+ // `--resume` isn't listed in `supported`/`unsupported` at all (neither lane lists it — it's a
55
+ // REPAIR verb against an EXISTING contract, not a deploy-time flag): `abx deploy-code --resume
56
+ // <address>` now diffs an EditionCode target's per-id mint shortfall exactly as it always has
57
+ // for a 721 SeriesCode target (see resume.ts's `planEditionResume`).
58
+ unsupported: ['--no-delegation'],
55
59
  },
56
60
  },
57
61
  },
@@ -86,6 +90,12 @@ export const ABX_CAPABILITIES = {
86
90
  availableOn: 'SeriesCode and EditionCode',
87
91
  useFor: ['on-chain SVG images', 'on-chain computed traits'],
88
92
  },
93
+ {
94
+ route: 'replace an unlocked script',
95
+ command: 'abx replace-script',
96
+ availableOn: 'SeriesCode and EditionCode, before `abx lock-script`',
97
+ useFor: ['shipping a fix to a live generative program', 'iterating pre-lock without a full redeploy'],
98
+ },
89
99
  ],
90
100
  deployTimeChoices: [
91
101
  'contract shape and token standard (--copies)',
@@ -98,7 +108,6 @@ export const ABX_CAPABILITIES = {
98
108
  'unsupported chains',
99
109
  'secondary-market listings or an order book',
100
110
  'compiling or deploying custom Solidity through abx',
101
- 'replacing a deployed code project script through the CLI',
102
111
  'retrofitting a deploy-time choice on an existing collection',
103
112
  ],
104
113
  interpretation: {
@@ -1 +1 @@
1
- {"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAGpD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,aAAa,EAAE,CAAC;IAChB,eAAe,EAAE,CAAC,GAAG,gBAAgB,CAAC;IACtC,kBAAkB,EAAE;QAClB,MAAM,EAAE;YACN,QAAQ,EAAE,iBAAiB;YAC3B,MAAM,EAAE;gBACN,QAAQ,EAAE,yBAAyB;gBACnC,MAAM,EAAE,CAAC,SAAS,CAAC;aACpB;YACD,OAAO,EAAE;gBACP,QAAQ,EAAE,4BAA4B;gBACtC,QAAQ,EAAE,mBAAmB;gBAC7B,OAAO,EAAE,8FAA8F;gBACvG,SAAS,EAAE,CAAC,yCAAyC,EAAE,eAAe,EAAE,WAAW,EAAE,mBAAmB,CAAC;gBACzG,WAAW,EAAE,CAAC,iCAAiC,CAAC;aACjD;SACF;QACD,YAAY,EAAE;YACZ,QAAQ,EAAE,mCAAmC;YAC7C,MAAM,EAAE;gBACN,QAAQ,EAAE,uBAAuB;gBACjC,MAAM,EAAE,CAAC,OAAO,CAAC;aAClB;YACD,OAAO,EAAE;gBACP,QAAQ,EAAE,yBAAyB;gBACnC,QAAQ,EAAE,mBAAmB;gBAC7B,OAAO,EAAE,2GAA2G;gBACpH,SAAS,EAAE,CAAC,yCAAyC,EAAE,eAAe,EAAE,WAAW,EAAE,mBAAmB,CAAC;gBACzG,WAAW,EAAE,CAAC,iCAAiC,CAAC;aACjD;SACF;QACD,UAAU,EAAE;YACV,QAAQ,EAAE,iEAAiE;YAC3E,MAAM,EAAE;gBACN,QAAQ,EAAE,sBAAsB;gBAChC,MAAM,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,kB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AAG,CAAC,sGAAsG,CAAC,CAAC;AACtH,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { SelfHostIndexer } from '@artblocks/abx-indexer';
2
- import { type Address, type OnChainFieldInput, type OpenSeaAttribute, type ProjectState, type PublicClient, type SeriesTokenFieldInput } from '@artblocks/abx-sdk';
2
+ import { type Address, type OnChainFieldInput, type OpenSeaAttribute, type ProjectState, type PublicClient, type SeriesTokenFieldInput, type SetupLegsCore, type PreparedTx } from '@artblocks/abx-sdk';
3
3
  import { type Hex } from 'viem';
4
4
  import { type StorageOverrides } from '../config.js';
5
5
  import { type Flags } from '../flags.js';
@@ -190,6 +190,56 @@ export declare const DEPLOY_FLAGS: Set<string>;
190
190
  export declare const DEPLOY_SERIES_FLAGS: Set<string>;
191
191
  export declare const DEPLOY_EDITION_FLAGS: Set<string>;
192
192
  export declare const DEPLOY_SERIES_EDITION_FLAGS: Set<string>;
193
+ /** One leg of a code-project setup multicall — enough to (a) estimate its own gas conservatively,
194
+ * (b) label an indivisible-leg refusal, and (c) let a batch rebuild `prepareCodeSetup`'s own
195
+ * labeling args after a leg group gets split. `calls` carries more than one entry only for a leg
196
+ * that must always land in the SAME transaction as its siblings (the dependency group, the
197
+ * on-chain-URI group) — see resume.ts's `planCoreLegs` for why those two ride as one atomic unit
198
+ * apiece; every other leg (a script chunk, a param schema, a reserve mint) is exactly one call. */
199
+ export interface SetupLeg {
200
+ calls: Hex[];
201
+ gas: number;
202
+ label: string;
203
+ kind: 'chunk' | 'schema' | 'deps' | 'uri' | 'mint';
204
+ chunkBytes?: number[];
205
+ schemaKey?: string;
206
+ }
207
+ export declare const chunkSetupLeg: (index: number, hex: Hex, data: Hex) => SetupLeg;
208
+ export declare const schemaSetupLeg: (key: string, data: Hex) => SetupLeg;
209
+ export declare const depsSetupLeg: (calls: Hex[]) => SetupLeg;
210
+ export declare const uriSetupLeg: (calls: Hex[]) => SetupLeg;
211
+ export declare const mintSetupLeg: (data: Hex) => SetupLeg;
212
+ /** `SetupLegsCore` (resume.ts's id-agnostic four leg groups, shared by both 721 and EditionCode) →
213
+ * the gas-batching shape above — schemas individually (resume diffs them per-key too), deps and
214
+ * on-chain-URI as one atomic leg apiece (resume diffs them as one group too — see resume.ts's
215
+ * `planCoreLegs`). Mints are NOT included here: their shape differs by lane (721 whole-total vs
216
+ * EditionCode per-id vs a `--resume` shortfall) — every caller builds its own mint legs. */
217
+ export declare function coreSetupLegs(legs: SetupLegsCore): {
218
+ chunks: SetupLeg[];
219
+ config: SetupLeg[];
220
+ };
221
+ /**
222
+ * Split three ordered leg groups into gas-bounded batches — chunks, then config, then mints, NEVER
223
+ * mixed (see the module note above). Refuses BEFORE building anything if a single leg's own gas
224
+ * estimate alone exceeds the binding `eth_estimateGas` ceiling: batching only helps when the problem
225
+ * is too MANY legs, not one leg too big, and that case must never reach a raw "gas limit too high".
226
+ * Deterministic in the legs' `.gas` values alone (never their `.calls`), so calling this once early
227
+ * (to size `approvals`, before an owner is even known) and again later with the real calldata
228
+ * produces the IDENTICAL batch shape both times — no drift between what's previewed and what's sent.
229
+ */
230
+ export declare function planCodeSetupBatches(groups: {
231
+ chunks: SetupLeg[];
232
+ config: SetupLeg[];
233
+ mints: SetupLeg[];
234
+ }): SetupLeg[][];
235
+ /** Turn ordered setup-leg batches into the actual `prepareCodeSetup` transactions — rebuilding each
236
+ * batch's chunk/schema/dependency/on-chain-URI labeling from its OWN legs, since a batch born from
237
+ * the split may carry only part of a group (see {@link planCodeSetupBatches}). */
238
+ export declare function codeSetupTxsFromBatches(batches: SetupLeg[][], args: {
239
+ contract: Address;
240
+ chainId: number;
241
+ deps: string[];
242
+ }): PreparedTx[];
193
243
  export declare function cmdDeployCode(flags: Flags): Promise<void>;
194
244
  export declare function cmdDeployCodeBody(flags: Flags, emit: (p: Record<string, unknown>) => void): Promise<void>;
195
245
  export declare const DEPLOY_CODE_EDITION_FLAGS: Set<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources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