@artblocks/abx-cli 0.1.0-alpha.40 → 0.1.0-alpha.41
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 +145 -0
- package/assets/renderer-scaffold/README.md +12 -0
- package/assets/renderer-scaffold/foundry.toml +4 -0
- package/assets/renderer-scaffold/script/Preview.s.sol +99 -0
- package/dist/capabilities.d.ts +9 -4
- package/dist/capabilities.d.ts.map +1 -1
- package/dist/capabilities.js +13 -4
- package/dist/capabilities.js.map +1 -1
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +731 -65
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/maintenance.d.ts +4 -0
- package/dist/commands/maintenance.d.ts.map +1 -0
- package/dist/commands/maintenance.js +114 -0
- package/dist/commands/maintenance.js.map +1 -0
- package/dist/commands/project.d.ts +175 -3
- package/dist/commands/project.d.ts.map +1 -1
- package/dist/commands/project.js +333 -27
- package/dist/commands/project.js.map +1 -1
- package/dist/commands/reads.d.ts +21 -0
- package/dist/commands/reads.d.ts.map +1 -1
- package/dist/commands/reads.js +171 -4
- package/dist/commands/reads.js.map +1 -1
- package/dist/commands/scaffold.d.ts.map +1 -1
- package/dist/commands/scaffold.js +5 -0
- package/dist/commands/scaffold.js.map +1 -1
- package/dist/commands/service.d.ts.map +1 -1
- package/dist/commands/service.js +7 -0
- package/dist/commands/service.js.map +1 -1
- package/dist/commands/storage.d.ts.map +1 -1
- package/dist/commands/storage.js +32 -3
- package/dist/commands/storage.js.map +1 -1
- package/dist/commands/submit-app.d.ts +43 -0
- package/dist/commands/submit-app.d.ts.map +1 -1
- package/dist/commands/submit-app.js +115 -6
- package/dist/commands/submit-app.js.map +1 -1
- package/dist/config.d.ts +16 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +73 -7
- package/dist/config.js.map +1 -1
- package/dist/deploy-plan.d.ts +150 -0
- package/dist/deploy-plan.d.ts.map +1 -0
- package/dist/deploy-plan.js +31 -0
- package/dist/deploy-plan.js.map +1 -0
- package/dist/flag-allowlists.d.ts.map +1 -1
- package/dist/flag-allowlists.js +5 -1
- package/dist/flag-allowlists.js.map +1 -1
- package/dist/flags.d.ts +6 -0
- package/dist/flags.d.ts.map +1 -1
- package/dist/flags.js +14 -0
- package/dist/flags.js.map +1 -1
- package/dist/jsonout.d.ts.map +1 -1
- package/dist/jsonout.js +11 -0
- package/dist/jsonout.js.map +1 -1
- package/dist/main.js +46 -7
- package/dist/main.js.map +1 -1
- package/dist/ownerops.d.ts +69 -0
- package/dist/ownerops.d.ts.map +1 -1
- package/dist/ownerops.js +221 -17
- package/dist/ownerops.js.map +1 -1
- package/dist/script-chunks.d.ts +1 -1
- package/dist/script-chunks.d.ts.map +1 -1
- package/dist/script-chunks.js +2 -2
- package/dist/script-chunks.js.map +1 -1
- package/package.json +6 -6
- package/skill/SKILL.md +6 -4
- package/skill/reference/code.md +17 -8
- package/skill/reference/deploy.md +9 -2
- package/skill/reference/diagnose.md +15 -2
- package/skill/reference/hosting.md +26 -0
- package/skill/reference/operate.md +43 -4
- package/skill/reference/setup.md +14 -0
package/skill/SKILL.md
CHANGED
|
@@ -9,7 +9,7 @@ description: >-
|
|
|
9
9
|
change an ABX collection, or to determine whether ABX supports a mechanic.
|
|
10
10
|
compatibility: Drives @artblocks/abx-cli on Node 22.13+. Co-versioned with the CLI; install or refresh with `abx skill install`.
|
|
11
11
|
metadata:
|
|
12
|
-
version: "0.1.0-alpha.
|
|
12
|
+
version: "0.1.0-alpha.41"
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
# ABX
|
|
@@ -106,8 +106,10 @@ Run `abx capabilities --json` for the current matrix, then load [deploy.md](refe
|
|
|
106
106
|
|
|
107
107
|
Important boundaries:
|
|
108
108
|
|
|
109
|
-
- `deploy-code --copies` supports `--script`, dependencies,
|
|
110
|
-
|
|
109
|
+
- `deploy-code --copies` supports `--script`, `--code-dir`, dependencies, Solidity image/attributes
|
|
110
|
+
renderers, `--image-base` (a deterministic per-id off-chain still, mutually exclusive with
|
|
111
|
+
`--image-renderer`), and `--resume` (a per-id mint diff — pass the same content flags plus
|
|
112
|
+
`--mint-amount` if the original deploy premint ids).
|
|
111
113
|
- `--onchain-image` works for static 721s and editions in hot or wallet-signing lanes. It cannot be
|
|
112
114
|
prepared as one cold `--unsigned` bundle because staged transactions depend on prior receipts.
|
|
113
115
|
- A code project may need no public host when its image/traits are computed by Solidity renderers.
|
|
@@ -129,7 +131,7 @@ Before deploying, write down the promised value for each applicable row:
|
|
|
129
131
|
| Animation/live view | the decoded `animation_url`, loaded with a real minted token |
|
|
130
132
|
| Marketplace traits | decoded `attributes`, not merely console output from the program |
|
|
131
133
|
| Parameters and values | `abx state` for schemas; `abx tokens --json` for token values |
|
|
132
|
-
| Attached artifacts |
|
|
134
|
+
| Attached artifacts | `abx artifacts <addr> --token <id>` (entries + current/stale effect rows); attachments are not enumerable in bare on-chain metadata |
|
|
133
135
|
| Byte integrity | `abx verify <addr>` |
|
|
134
136
|
| Hosted lifecycle | `abx status --remote <name> --watch` or provider status |
|
|
135
137
|
|
package/skill/reference/code.md
CHANGED
|
@@ -28,8 +28,11 @@ renderers, marketplace stills and traits, seeds, dependencies, parameters, and c
|
|
|
28
28
|
|
|
29
29
|
Without `--copies`, the contract is SeriesCode (ERC-721). With `--copies <n|open>`, it is EditionCode
|
|
30
30
|
(ERC-1155): N generated ids, each with multiple copies. EditionCode currently supports scripts,
|
|
31
|
-
dependencies,
|
|
32
|
-
|
|
31
|
+
directory builds (`--code-dir`), dependencies, field renderers, deterministic per-id off-chain stills
|
|
32
|
+
(`--image-base`), and `--resume` for an incomplete deployment (see
|
|
33
|
+
[diagnose.md](diagnose.md#incomplete-deployments) — the mint leg diffs per id, with a new
|
|
34
|
+
`--mint-amount` naming each premint id's intended copy count). Run `abx capabilities --json`
|
|
35
|
+
immediately before planning.
|
|
33
36
|
|
|
34
37
|
For one generated work with 100 copies, use `--max 1 --copies 100`. Omitting `--max 1` leaves the
|
|
35
38
|
default multi-id space, producing multiple generated ids with 100 copies available for each id.
|
|
@@ -105,16 +108,22 @@ a still published to a deterministic public `--image-base` is a manual/backfill
|
|
|
105
108
|
after relevant parameter changes. An on-chain animation plus automatically updating off-chain still
|
|
106
109
|
requires an operator watching state.
|
|
107
110
|
|
|
108
|
-
EditionCode
|
|
109
|
-
|
|
110
|
-
|
|
111
|
+
EditionCode now accepts `--image-base` too: the same `{base}/{id}.png` url-template, one id space
|
|
112
|
+
finer — `{id}` is the EditionCode id, and every copy of that id shares the one image (there is no
|
|
113
|
+
per-copy addressing). The effect runner never renders an id with zero live copies (no mint-time seed
|
|
114
|
+
has been drawn yet for it), so an unminted premint id is skipped, not errored — it renders once the
|
|
115
|
+
first copy mints. `--image-base` stays mutually exclusive with `--image-renderer` on both lanes.
|
|
111
116
|
|
|
112
117
|
### Build directory
|
|
113
118
|
|
|
114
119
|
Use `--code-dir` for an application bundle whose files are uploaded and addressed as a code artifact.
|
|
115
|
-
It requires external storage and public resolution
|
|
116
|
-
|
|
117
|
-
|
|
120
|
+
It requires external storage and public resolution — a backend without directory upload (`fs`, the
|
|
121
|
+
local default) is refused; pick `--backend ipfs` or `--backend arweave`. Inspect the built output, not
|
|
122
|
+
only the source tree, and verify that every referenced asset is included. The live view 302s through
|
|
123
|
+
the gateway, so the gateway must serve HTML (the shared Pinata public gateway does not — use a
|
|
124
|
+
dedicated gateway or Arweave). `--code-dir` works with `--copies` too (EditionCode): the same upload,
|
|
125
|
+
the same on-chain `code` field, the same gateway rules — `--script` and `--code-dir` remain mutually
|
|
126
|
+
exclusive on both lanes.
|
|
118
127
|
|
|
119
128
|
## Plan Solidity field renderers
|
|
120
129
|
|
|
@@ -51,7 +51,9 @@ Use `--onchain-uri --backend arweave|ipfs|cloud`. The CLI uploads media, bakes i
|
|
|
51
51
|
on-chain JSON, and does not require an ABX resolver. This is often the simplest durable path for
|
|
52
52
|
static collections:
|
|
53
53
|
|
|
54
|
-
- Arweave provides pay-once permanent custody through the configured uploader
|
|
54
|
+
- Arweave provides pay-once permanent custody through the configured uploader, but needs the
|
|
55
|
+
optional `@artblocks/abx-storage-arweave` package installed alongside the CLI first (see
|
|
56
|
+
[hosting.md](hosting.md#arweave)) — it is not part of the default install.
|
|
55
57
|
- IPFS requires maintained pinning and a public gateway; a local kubo gateway is development-only.
|
|
56
58
|
- Cloud requires an authenticated upload endpoint and a distinct public read base/CDN URL.
|
|
57
59
|
|
|
@@ -154,7 +156,12 @@ Do not import code-edition limits into static editions or vice versa. Use the ca
|
|
|
154
156
|
1. Run `abx doctor`, storage/remote checks needed by the selected path, and command help.
|
|
155
157
|
2. Run the exact command with `--dry-run --json` and a known `--for` address when needed.
|
|
156
158
|
3. Read back contract family, id/copy arithmetic, custody, resolution, public URLs, signer lane,
|
|
157
|
-
initial mint, transaction count, cost/reach warnings, and irreversible options.
|
|
159
|
+
initial mint, transaction count, cost/reach warnings, and irreversible options. The JSON payload's
|
|
160
|
+
`plan` object (every `deploy`/`deploy-series`/`deploy-code` emit, including `--resume`) carries
|
|
161
|
+
most of this pre-structured — `transactions`, `roles`, `royalty`, `custody`, `mint`, `estimate`,
|
|
162
|
+
`warnings`, and (code lanes) `surfaces`/`dependencies` — versioned via `plan.schemaVersion`. Prefer
|
|
163
|
+
it over parsing the human prose for anything it covers; a field it has no answer for is `null`, not
|
|
164
|
+
absent.
|
|
158
165
|
4. Receive explicit confirmation.
|
|
159
166
|
5. Run the same normalized command without `--dry-run`; do not start another write using the EOA.
|
|
160
167
|
6. Capture the chain, contract address, deploy block, owner, storage locators, and resolver/remote.
|
|
@@ -76,8 +76,15 @@ Before resume:
|
|
|
76
76
|
- read the resume dry run and confirm every proposed transaction;
|
|
77
77
|
- ensure no second writer is operating the same EOA.
|
|
78
78
|
|
|
79
|
-
EditionCode
|
|
80
|
-
|
|
79
|
+
EditionCode (`--copies`) targets are supported too — pass the exact same content flags the original
|
|
80
|
+
deploy used, minus `--copies` itself (the standard was fixed at creation and is read from chain, not
|
|
81
|
+
re-specified). The one difference from a 721 resume: name the intended premint plan with
|
|
82
|
+
`--mint-count`/`--mint-amount` if the original deploy premint any ids — the mint leg diffs **per id**
|
|
83
|
+
against that id's own on-chain copy count, not a single whole-contract total, and each shortfall sends
|
|
84
|
+
as one transaction regardless of how many copies are missing. Getting `--mint-count`/`--mint-amount`
|
|
85
|
+
wrong under-reports (an id you meant to premint stays at zero) rather than over-mints (a token cannot
|
|
86
|
+
be un-minted, so the diff only ever tops up a shortfall) — but confirm the intended plan with the
|
|
87
|
+
human before sending if there is any doubt about what the original deploy meant to premint.
|
|
81
88
|
|
|
82
89
|
## RPC and chain failures
|
|
83
90
|
|
|
@@ -154,6 +161,12 @@ idempotently skip an existing current artifact. A PostParam change produces a ne
|
|
|
154
161
|
the watcher or run the explicit one-shot path. Solidity image renderers have no effects job—diagnose
|
|
155
162
|
their on-chain call instead.
|
|
156
163
|
|
|
164
|
+
`abx artifacts <addr> --token <id> --json` is the direct check for steps 5–7: it reports every
|
|
165
|
+
registered effect row (current and stale) against the token's active `inputsHash`, without fetching
|
|
166
|
+
and parsing the whole served document. A row present but labeled `stale` means a param changed since
|
|
167
|
+
it rendered — re-render, don't assume it's missing. Add `--remote <name|url>` for a hosted project;
|
|
168
|
+
the real artifact set lives on the resolver that serves it, not in this node's local projection.
|
|
169
|
+
|
|
157
170
|
## Secret-safe reporting
|
|
158
171
|
|
|
159
172
|
Include command name, CLI version, chain key, redacted host labels, contract address, transaction hash,
|
|
@@ -128,6 +128,13 @@ change that prefix without changing the content.
|
|
|
128
128
|
|
|
129
129
|
### Arweave
|
|
130
130
|
|
|
131
|
+
`--backend arweave` (the default `turbo` provider) needs the optional
|
|
132
|
+
`@artblocks/abx-storage-arweave` package installed alongside the CLI — it is not part of the
|
|
133
|
+
default install, deliberately, so a default `abx` install stays free of Turbo's browser
|
|
134
|
+
wallet-connector dependency tree. If it is missing, the CLI names the exact install command
|
|
135
|
+
(`npm install @artblocks/abx-storage-arweave`) rather than failing unhelpfully; run that command
|
|
136
|
+
once, then retry. `--provider http-bundler` needs neither this package nor any of its dependencies.
|
|
137
|
+
|
|
131
138
|
The accepted upload and a retrievable gateway object are separate lifecycle states. Use
|
|
132
139
|
`abx storage status <locator> --json`; wait for `ready` instead of uploading duplicates during
|
|
133
140
|
propagation. Upload deduplication is success, not an instruction to top up or switch backends.
|
|
@@ -165,6 +172,25 @@ Verify the operational graph:
|
|
|
165
172
|
5. Token metadata exposes the resulting image/attributes.
|
|
166
173
|
6. A PostParam change reaches the watcher and creates the next inputs-hash render.
|
|
167
174
|
|
|
175
|
+
### SQLite maintenance for a long-running node
|
|
176
|
+
|
|
177
|
+
The self-hosted store is one SQLite file. `abx serve` already reclaims freed pages automatically in
|
|
178
|
+
small bounded passes between chain-watch ticks — never inline with a request, so it never adds
|
|
179
|
+
latency to a metadata read. Nothing to schedule for that half.
|
|
180
|
+
|
|
181
|
+
The other half is explicit and never automatic: a store created before this maintenance shipped
|
|
182
|
+
needs a one-time conversion.
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
abx vacuum # status: auto_vacuum mode, page count, freelist size
|
|
186
|
+
abx vacuum convert # one-time full VACUUM — only when abx vacuum says the store needs it
|
|
187
|
+
abx vacuum incremental [--pages n] # one bounded reclaim pass on demand (not running abx serve? use this)
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Run `abx vacuum convert` deliberately, not on a schedule: it rewrites the entire file and can briefly
|
|
191
|
+
need up to ~2x its on-disk size. Check `abx vacuum` first; if it already reports `auto_vacuum:
|
|
192
|
+
incremental`, there is nothing to convert.
|
|
193
|
+
|
|
168
194
|
## Use lifecycle states
|
|
169
195
|
|
|
170
196
|
Prefer status over retries. Typical nonterminal states include deployment accepted, indexing,
|
|
@@ -22,8 +22,17 @@ abx tokens <address> --json
|
|
|
22
22
|
abx contracturi <address>
|
|
23
23
|
abx tokenuri <address> --token <id>
|
|
24
24
|
abx verify <address> --json
|
|
25
|
+
abx artifacts <address> --token <id> --json
|
|
25
26
|
```
|
|
26
27
|
|
|
28
|
+
`abx artifacts` reads a token's `artifacts` manifest directly, without fetching and parsing the whole
|
|
29
|
+
served document — entries plus every registered effect row (current and stale, labeled against the
|
|
30
|
+
token's active `inputsHash`). Report which surface answered: this node's local projection, or (with
|
|
31
|
+
`--remote <name|url>`) the hosted resolver that actually owns a hosted project's real artifact set.
|
|
32
|
+
Neither "not registered here" nor "not registered on that remote" is an error — both return a stable
|
|
33
|
+
`{surface, registered, available, reason, entries, effects}` shape. Nothing it reports is onchain data
|
|
34
|
+
itself; every entry is a resolver-published projection.
|
|
35
|
+
|
|
27
36
|
Use `abx status` or its remote form for projection/render lifecycle. Record active chain, detected
|
|
28
37
|
family, owner/admin, supply and pause state, minter/payee, royalty/cap, URI renderer/pointers, code
|
|
29
38
|
dependencies, schemas/hooks, and lock state.
|
|
@@ -116,15 +125,29 @@ repoint is not a re-upload and does not change the committed CID/transaction id.
|
|
|
116
125
|
|
|
117
126
|
### Attachments versus parameters
|
|
118
127
|
|
|
119
|
-
`abx attach <addr> <key> <locator>` records a named artifact.
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
128
|
+
`abx attach <addr> <key> <locator>` records a named artifact. It prints the CANONICAL fetch URL for
|
|
129
|
+
every key (`{base}/{chainId}/{address}[/<id>]/data/<key>`) directly — never hand-build that route.
|
|
130
|
+
It also distinguishes the on-chain field write from off-chain SERVING: an on-chain write can succeed
|
|
131
|
+
while nothing can serve it. With no resolver base baked in at all, it warns there is no serving path
|
|
132
|
+
whatsoever. With one baked in, it probes whether a resolver actually answers for this token right
|
|
133
|
+
now (before the write, since the key itself doesn't exist yet) and warns if not — "the on-chain
|
|
134
|
+
document carries reserved fields only" is a real gap creators hit; the write landing is not proof
|
|
135
|
+
anything can serve it. Bare on-chain metadata cannot enumerate arbitrary field keys, so consumers
|
|
136
|
+
need a resolver to discover all attachments even when each locator is durable and hash-anchored.
|
|
123
137
|
|
|
124
138
|
PostParams are different: the parameter store enumerates schemas and values on-chain. Read schemas
|
|
125
139
|
with `state` and values with `tokens --json`. Parameters do not require a resolver merely to be
|
|
126
140
|
canonical or enumerable.
|
|
127
141
|
|
|
142
|
+
### Replacing an unlocked script
|
|
143
|
+
|
|
144
|
+
`abx replace-script <addr> --script <file>` ships a fix to a code project's on-chain program any
|
|
145
|
+
time before `abx lock-script`. It refuses outright — never warns and proceeds — on a locked script
|
|
146
|
+
or a target that isn't SeriesCode/EditionCode. It diffs by content against what's on-chain (an index
|
|
147
|
+
that already matches is never re-sent), folds every write and remove into ONE atomic transaction (so
|
|
148
|
+
a revert can never leave a half-applied script), and reads the completed script back to verify exact
|
|
149
|
+
reassembly before reporting success. Prefer this over hand-encoding `setScriptChunk` calls.
|
|
150
|
+
|
|
128
151
|
### Refresh and URI events
|
|
129
152
|
|
|
130
153
|
`abx refresh` asks external marketplaces to fetch metadata again; it does not fix the metadata or
|
|
@@ -179,3 +202,19 @@ Important qualifications:
|
|
|
179
202
|
Use `abx verify` and direct state reads to enumerate what remains mutable. Describe the guarantee as
|
|
180
203
|
specific stored values and addresses that can no longer change; do not promise immutable output unless
|
|
181
204
|
every live input and external implementation has actually been bounded.
|
|
205
|
+
|
|
206
|
+
`abx state <address> --json` reports every lock above in one `locks` object — token/contract URI,
|
|
207
|
+
script, dependencies, param hooks, and the standard `METADATA_FIELD` set — each as `true` (frozen),
|
|
208
|
+
`false` (open), or `null` (unread; never report an unread lock as off). A project's own custom field
|
|
209
|
+
keys are real and independently lockable but are not enumerable from a bare head read; say so rather
|
|
210
|
+
than implying the field scan is exhaustive. Every lock is independent: never infer one lock's state
|
|
211
|
+
from another's.
|
|
212
|
+
|
|
213
|
+
`abx verify --json` separates two verdicts that must not be conflated: `ok`/`contentIntegrity` is
|
|
214
|
+
content-integrity ONLY (a hash mismatch, or none to check) and is the only field the exit code
|
|
215
|
+
reflects; `availability` is a sibling verdict for render/serve readiness (`available` / `partial` /
|
|
216
|
+
`unavailable` / `unknown`) that a missing render or an un-refetched `ipfs`/`arweave`/`url` locator
|
|
217
|
+
moves, while `ok` stays unaffected by design. Report both, never collapse one into the other.
|
|
218
|
+
`abx verify` also flags whether the project's stored `tokenURIRenderer`/generator pointers are the
|
|
219
|
+
CURRENT canonical singletons — a `false` here means an older-but-working deployment (or a fully
|
|
220
|
+
custom one), never "broken".
|
package/skill/reference/setup.md
CHANGED
|
@@ -70,6 +70,20 @@ The local projection and managed Arweave identity remain in `.abx-self-host/` un
|
|
|
70
70
|
`ABX_DATA_DIR` overrides it. That runtime directory is separate from the renamed `abx` skill and is
|
|
71
71
|
not being renamed. Back up the managed Arweave key with `abx storage backup-key`; never print it.
|
|
72
72
|
|
|
73
|
+
Every WRITE command (`deploy*`, `add`, `index`, `mint`, `set-*`, …) resolves `.abx-self-host`
|
|
74
|
+
strictly relative to the current directory — it never searches upward, so it never creates a
|
|
75
|
+
project's state somewhere unexpected. A handful of READ commands (`status`, `state`, `verify`,
|
|
76
|
+
`doctor`, `capabilities`, `tokens`, `tokenuri`, `contracturi`, `inspect`, `minter show`) DO search
|
|
77
|
+
upward, git-style, for an already-existing `.abx-self-host` if the current directory doesn't have
|
|
78
|
+
one of its own — bounded at the home directory, a `.git` root, or the filesystem root. Practical
|
|
79
|
+
consequence: `cd`-ing into a project's `contracts/` subdirectory before `abx status` still finds
|
|
80
|
+
that project; the same `cd` before `abx add`/`abx deploy*` creates a NEW, empty node right there
|
|
81
|
+
instead. If a status/verify/etc. answer looks emptier than expected, or a write seems to have
|
|
82
|
+
landed in the wrong place, run bare `abx status` — its `data: <path>` line names the exact
|
|
83
|
+
directory that answered, including a note when it was found by searching upward — or set
|
|
84
|
+
`ABX_DATA_DIR` explicitly rather than guessing. See [Local data
|
|
85
|
+
directory](https://docs.abx.io/docs/using-abx/self-hosting#local-data-directory) for the full rule.
|
|
86
|
+
|
|
73
87
|
## Choose one signing lane
|
|
74
88
|
|
|
75
89
|
Every write uses one of three lanes:
|