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

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/CHANGELOG.md CHANGED
@@ -1,238 +1,24 @@
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.
3
+ ## 0.1.0-alpha.44
39
4
 
40
5
  ### Patch Changes
41
6
 
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.
7
+ - Updated dependencies [3ddba71]
8
+ - Updated dependencies [9065128]
9
+ - @artblocks/abx-sdk@0.1.0-alpha.34
10
+ - @artblocks/abx-token-api@0.1.0-alpha.37
11
+ - @artblocks/abx-storage@0.1.0-alpha.34
12
+ - @artblocks/abx-indexer@0.1.0-alpha.35
104
13
 
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.
14
+ ## 0.1.0-alpha.43
194
15
 
195
16
  ### Patch Changes
196
17
 
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
-
225
- ## 0.1.0-alpha.40
226
-
227
- ### Patch Changes
228
-
229
- - 64248d9: Establish the public source baseline and refresh dependency constraints.
230
- - Updated dependencies [64248d9]
231
- - @artblocks/abx-indexer@0.1.0-alpha.31
232
- - @artblocks/abx-sdk@0.1.0-alpha.30
233
- - @artblocks/abx-storage@0.1.0-alpha.30
234
- - @artblocks/abx-token-api@0.1.0-alpha.33
235
-
236
- ## Unreleased
237
-
238
- Public release history begins here.
18
+ - 9242a05: Prepare package metadata, release notes, and public-facing source comments for the initial public
19
+ source release.
20
+ - Updated dependencies [9242a05]
21
+ - @artblocks/abx-indexer@0.1.0-alpha.34
22
+ - @artblocks/abx-sdk@0.1.0-alpha.33
23
+ - @artblocks/abx-storage@0.1.0-alpha.33
24
+ - @artblocks/abx-token-api@0.1.0-alpha.36
@@ -34,7 +34,7 @@ import { describeSchema, editionSchemaAdvisory, parseSchemaSpecs } from '../sche
34
34
  import { parseSeriesTraits } from '../series-traits.js';
35
35
  import { decodeOnChainJson } from '../served.js';
36
36
  import { openWalletSession, signHotSequence, signTx } from '../signer.js';
37
- // ── plan-object warning capture (issue #123) ─────────────────────────────────────────────────────
37
+ // ── plan-object warning capture ──────────────────────────────────────────────────────────────────
38
38
  // The structured `--json` plan object (deploy-plan.ts) reports "the warnings the lane raised"
39
39
  // alongside every other computed field — but ~400 `warn()` call sites in this file exist purely as
40
40
  // human prose, and rewriting each to ALSO push onto a collector would be exactly the kind of
@@ -926,7 +926,7 @@ export async function cmdDeployBody(flags, serveAfter, emit) {
926
926
  // never disagree. Counts TX signatures only: a storage upload signed by a connected wallet
927
927
  // (Arweave via --storage-signer eth) is a message signature, not a transaction, and is already
928
928
  // named separately (see the `remoteEthUpload` narration) — it does not add to this count.
929
- // Also captures the plan object's `custody.image` file metadata (issue #123 follow-up): the SAME
929
+ // Also captures the plan object's `custody.image` file metadata: the SAME
930
930
  // bytes read here for the tx-count math, hashed/typed locally (no chain read) — never re-derived
931
931
  // at the emit site below.
932
932
  let planImageFile = null;
@@ -1073,7 +1073,7 @@ export async function cmdDeployBody(flags, serveAfter, emit) {
1073
1073
  // could act on that the actual deploy will not land at. `saltPinned` still says why.
1074
1074
  emit(jsonSafe({
1075
1075
  command: 'deploy', dryRun: true, sent: false, address: explicitSalt ? predicted : null, chain: CHAIN, chainId: resolveChain(CHAIN).id, factory, salt, saltPinned: !!explicitSalt, name, symbol,
1076
- // The structured plan (issue #123) — built from the SAME locals the readout above just
1076
+ // The structured plan — built from the SAME locals the readout above just
1077
1077
  // printed; nothing here is re-derived or newly computed. `deployer` is a real wallet address
1078
1078
  // regardless of salt pinning (only the PREDICTED CONTRACT address carries that caveat, and
1079
1079
  // this plan doesn't repeat it — see `address`, above), so roles are safe to report unconditionally.
@@ -1538,7 +1538,7 @@ export async function cmdDeployOneOfOneEditionBody(flags, emit) {
1538
1538
  // The edition paths shipped without this and without the readout line below, so `--copies` previews
1539
1539
  // silently dropped the approval count the skill promises "every preview" prints — leaving an agent
1540
1540
  // with nothing to tell the creator about how many wallet prompts to expect.
1541
- // Also captures `custody.image` file metadata (issue #123 follow-up) — see the 1/1 twin's identical
1541
+ // Also captures `custody.image` file metadata — see the 1/1 twin's identical
1542
1542
  // local for why it's computed here rather than re-derived at the emit site.
1543
1543
  let planImageFile = null;
1544
1544
  const approvals = onchainImage