@artblocks/abx-cli 0.1.0-alpha.32 → 0.1.0-alpha.34
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 +64 -0
- package/dist/capabilities.d.ts +94 -0
- package/dist/capabilities.d.ts.map +1 -0
- package/dist/capabilities.js +135 -0
- package/dist/capabilities.js.map +1 -0
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +13 -17
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/feedback.d.ts +7 -0
- package/dist/commands/feedback.d.ts.map +1 -0
- package/dist/commands/feedback.js +147 -0
- package/dist/commands/feedback.js.map +1 -0
- package/dist/commands/reads.js +1 -1
- package/dist/commands/reads.js.map +1 -1
- package/dist/commands/scaffold.d.ts +9 -1
- package/dist/commands/scaffold.d.ts.map +1 -1
- package/dist/commands/scaffold.js +60 -13
- package/dist/commands/scaffold.js.map +1 -1
- package/dist/commands/service.d.ts.map +1 -1
- package/dist/commands/service.js +5 -4
- package/dist/commands/service.js.map +1 -1
- package/dist/flag-allowlists.d.ts.map +1 -1
- package/dist/flag-allowlists.js +19 -0
- package/dist/flag-allowlists.js.map +1 -1
- package/dist/main.js +45 -11
- package/dist/main.js.map +1 -1
- package/dist/ownerops.d.ts +3 -3
- package/dist/ownerops.js +5 -5
- package/dist/ownerops.js.map +1 -1
- package/dist/remote.d.ts +5 -1
- package/dist/remote.d.ts.map +1 -1
- package/dist/remote.js +31 -2
- package/dist/remote.js.map +1 -1
- package/dist/scaffold.js +1 -1
- package/dist/scaffold.js.map +1 -1
- package/dist/update-check.d.ts +6 -1
- package/dist/update-check.d.ts.map +1 -1
- package/dist/update-check.js +40 -17
- package/dist/update-check.js.map +1 -1
- package/package.json +6 -6
- package/skill/SKILL.md +174 -526
- package/skill/agents/openai.yaml +4 -0
- package/skill/reference/capabilities.md +171 -285
- package/skill/reference/code.md +210 -0
- package/skill/reference/creator-token.md +90 -95
- package/skill/reference/deploy.md +167 -0
- package/skill/reference/diagnose.md +165 -0
- package/skill/reference/hosting.md +148 -126
- package/skill/reference/operate.md +181 -0
- package/skill/reference/services.md +76 -0
- package/skill/reference/setup.md +108 -62
- package/skill/reference/code-projects.md +0 -368
- package/skill/reference/decisions.md +0 -182
- package/skill/reference/operating.md +0 -220
- package/skill/reference/troubleshooting.md +0 -65
package/skill/SKILL.md
CHANGED
|
@@ -1,535 +1,183 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: abx
|
|
3
|
-
description:
|
|
4
|
-
|
|
2
|
+
name: abx
|
|
3
|
+
description: >-
|
|
4
|
+
Use the ABX CLI (`abx`) to plan, launch, host, inspect, and operate ABX NFT projects on supported
|
|
5
|
+
testnets: static 1/1s, image series, editions, JavaScript/code drops, and Solidity-rendered projects.
|
|
6
|
+
Covers on-chain and off-chain content, managed or self-hosted resolvers, storage, minting and sales,
|
|
7
|
+
PostParams, hooks, custom minters, migrations, feedback, locks, and capability questions. Use for
|
|
8
|
+
requests to create, deploy, mint, host, serve, verify, repair, migrate, report ABX feedback, or
|
|
9
|
+
change an ABX collection, or to determine whether ABX supports a mechanic.
|
|
10
|
+
compatibility: Drives @artblocks/abx-cli on Node 22.13+. Co-versioned with the CLI; install or refresh with `abx skill install`.
|
|
5
11
|
metadata:
|
|
6
|
-
version: "0.1.0-alpha.
|
|
12
|
+
version: "0.1.0-alpha.34"
|
|
7
13
|
---
|
|
8
14
|
|
|
9
|
-
# ABX
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
no mainnet (testnet only) · no secondary listings · no post-deploy script replace · `abx` never compiles
|
|
80
|
-
or deploys Solidity (`scaffold-renderer` writes a project, you build it) · and **no retrofitting a
|
|
81
|
-
deploy-time choice** — contract type (hooks need `deploy-code`), `--burnable`, `--copies`, ERC-721C
|
|
82
|
-
enrolment are permanent from the deploy. Ask about those four **before** you deploy; that is the one way
|
|
83
|
-
a creator ends up truly unable to have what they wanted. **Auctions, allowlists, raffles, ERC-20 pricing,
|
|
84
|
-
soulbinding, vesting, escrow, redemption, oracle-fed metadata and a large raster on-chain are NOT on this
|
|
85
|
-
list** — they are seams, below.
|
|
86
|
-
- **The four seams — ABX runs YOUR arbitrary Solidity at all three moments in a token's life.** This is
|
|
87
|
-
the protocol's real power and the thing agents most consistently miss. A token can point at **your own
|
|
88
|
-
minter** (`abx set-minter` — it may do anything before it calls `mint`), and a code project can arm
|
|
89
|
-
**three param hooks** (`abx set-param-hooks`, all optional, one contract can be several):
|
|
90
|
-
**`--configure`** runs *before a param write persists* and its **revert vetoes the write** (the stored
|
|
91
|
-
value is still readable, so "may only go up" / "set once" are expressible); **`--transfer`** runs *after
|
|
92
|
-
every ownership change — mint (`from == 0x0`) and burn (`to == 0x0`) included* and its **revert fails
|
|
93
|
-
the transfer**; **`--augment`** runs *at read time* as a `view` when `tokenData` is assembled, **adding
|
|
94
|
-
and overriding keys** with anything a `view` can reach — block data, an oracle, another contract — for
|
|
95
|
-
**no gas on the token and no ~24 KB blob ceiling** (it is bounded only by `eth_call`). Write-time,
|
|
96
|
-
transfer-time, read-time. Escrow/vault, soulbind, a monotonic ratchet, equip-and-validate,
|
|
97
|
-
burn-to-combine, timed reveal, live-reactive art are each *a controller plus one or two hooks*, and the
|
|
98
|
-
token stays a factory clone the buyer verifies. **Mechanic → seam lookup, the hooks in depth, and the
|
|
99
|
-
`abx predict` recipe that breaks the controller/schema chicken-and-egg:**
|
|
100
|
-
[capabilities.md](reference/capabilities.md). Two caveats: a **transfer hook is a VETO, not a trigger**
|
|
101
|
-
(it can refuse a move, never cause one — and a reverting hook stops **mints** too), and none of this is
|
|
102
|
-
scaffolded, so it is real Foundry engineering.
|
|
103
|
-
- **⚠ Hooks exist ONLY on `deploy-code` projects (`SeriesCode`/`EditionCode`), and the contract type is
|
|
104
|
-
fixed at deploy forever.** A `deploy` 1/1 or a `deploy-series` image collection has no params, so no
|
|
105
|
-
hooks, and `set-param-hooks` refuses it. **If the creator has hinted at any rule at all** — "holders can
|
|
106
|
-
rename it", "it can't be resold for a month", "it levels up", "it reacts to the chain" — **deploy it
|
|
107
|
-
with `deploy-code` even if the art is a plain image** (a script that draws the image is fine; the
|
|
108
|
-
Solidity lane is `--image-renderer`). You can ask before the deploy. You cannot ask after.
|
|
109
|
-
- **Two gates decide everything: (1) demo or real? (2) who signs?** Settle both first — *once there's something to launch*.
|
|
110
|
-
- **Confirm the full config before any on-chain write** ([readout](#confirm-before-sending)); wait for go-ahead. Never invent a field silently (name/symbol from filename, an auto description) — show it, flag it `inferred`.
|
|
111
|
-
- **Never hand-build a service URL — ask the chain.** `abx tokenuri <addr> --fetch` and
|
|
112
|
-
`abx contracturi <addr>` follow the URL the contract itself commits and print what is actually served.
|
|
113
|
-
**A 404 on a URL you constructed is evidence about your URL, never about the service.** Don't infer a
|
|
114
|
-
path from a similar one (`/t/<chain>/<addr>/<id>` minus the id is not collection metadata — that's
|
|
115
|
-
`/c/<chain>/<addr>`). Before calling a service broken, reproduce with a CLI command: a real miss returns
|
|
116
|
-
`invalid_request` · `unknown_route` · `not_registered` · `410 burned` (that token was destroyed —
|
|
117
|
-
permanent, never retry), none of which mean "down".
|
|
118
|
-
- **Safe to explore:** `abx <cmd> --help` and `abx deploy --dry-run` never send. You never run a real write just to learn flags.
|
|
119
|
-
- **`deploy` returns; `demo`/`serve`/`preview` block** (they serve) — background them or warn. Background `abx preview` and relay its URL, then keep working while the creator looks; `--shoot` is the one preview mode that exits on its own.
|
|
120
|
-
|
|
121
|
-
## Which command — what are you launching?
|
|
122
|
-
|
|
123
|
-
Route by the **content** first, then apply the gates below. The three paths differ most in what you have to *keep running* and where the thumbnail comes from:
|
|
124
|
-
|
|
125
|
-
| You have | Command | `tokenURI` resolves | Thumbnail (marketplace still) |
|
|
126
|
-
|---|---|---|---|
|
|
127
|
-
| **one image** (a 1/1) | `abx deploy` | on-chain (tiny content) or off-chain — **no server possible** | the image itself |
|
|
128
|
-
| **a folder of images** | `abx deploy-series` | same — on-chain or off-chain, **no server possible** | each image itself |
|
|
129
|
-
| **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 |
|
|
130
|
-
|
|
131
|
-
**Any row also takes `--copies <n|open>`** — it makes that work/collection an ERC-1155 **edition** (copies, not unique tokens; `open` = an uncapped open edition, the flagship edition product). Drop it for a unique token, exactly as today. Edition owner ops (mint copies, per-id supply cap, per-id sales) → [operating.md](reference/operating.md#edition-owner-ops).
|
|
132
|
-
|
|
133
|
-
**Custody on an edition is now symmetric with the 721 side** — on-chain bytes, off-chain-image-with-on-chain-JSON, inline SVG, or a resolver all work with `--copies`, and `deploy-code --copies` takes on-chain `--dep`s. Two limits remain: **`--onchain-image` can't be signed offline** (refused on `--unsigned` everywhere — each chunk tx feeds the next; use hot or `--sign`), and **`deploy-code --copies` is `--script`-only** (no `--code-dir`, no field renderers). Full matrix, including the O(1) folder trick for a raster edition with no server: [decisions.md → `--copies` custody](reference/decisions.md#--copies-erc-1155-editions--custody-is-not-orthogonal-to-the-shape).
|
|
134
|
-
|
|
135
|
-
> **`--onchain-uri` puts the JSON on-chain — the IMAGE follows one of three routes, and the creator
|
|
136
|
-
> is choosing between them whether they know it or not.** An **SVG** is inlined (bytes on-chain,
|
|
137
|
-
> fully self-contained). A **raster** with `--backend arweave|ipfs|cloud` is uploaded and its URL is
|
|
138
|
-
> baked into the on-chain JSON — no server, permanence is the backend's. A **raster on `fs`** has no
|
|
139
|
-
> public URL to bake, so the renderer holds only a hash and `tokenURI` serves a **placeholder**; the
|
|
140
|
-
> CLI warns before the spend. For the bytes themselves on-chain regardless of format, use
|
|
141
|
-
> `--onchain-image --compress fastlz` (**any format, any size — nothing is refused. ≲117 KB reads on every
|
|
142
|
-
> endpoint; above that the CLI measures your RPC and names who else can. A READ-reach question, not a
|
|
143
|
-
> write limit; see [Quick start](#quick-start)**). Say which one you're giving them: "no server" and
|
|
144
|
-
> "on-chain" are not the same promise.
|
|
145
|
-
|
|
146
|
-
**The dividing line is static content vs a running program.** Static content 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.
|
|
147
|
-
|
|
148
|
-
**Want collector-settable state (a palette a holder picks, a governed dial, an open/communal input)? That's PostParams — a `deploy-code` capability, and the reason to reach for it isn't only "generative."** Any piece that needs typed, on-chain, auth-gated parameters (settable by the creator, the token owner — delegate.xyz honored — or a named address/contract) is a code project: declare them with `--schema key:Type:Auth`, set them later with `abx configure-param`, and every declared key and every set value reads **straight off the contract** — no resolver, no indexer, no metadata JSON in the middle (`abx state` for the schemas, `abx tokens` for the values). They work on the JS lane *and* the in-chain Solidity renderer lane. Full catalog: [Code projects → PostParam schema](reference/code-projects.md#postparam-schema--the-type--auth-catalog).
|
|
149
|
-
|
|
150
|
-
> **⚠ On an edition (`--copies`), a holder-writable param is SHARED — say this before the creator commits.** Params belong to the **id**, so one value serves every holder of it and the **last writer wins**; `TokenOwner` means *any* holder. A "name your copy" schema renames the work for all 1,000. Per-collector state needs **one id per copy** (a 721 Series, or `--copies 1` ids); communal state is what shared params are *good* at. A holder-writable `String`/`Bytes` key also has **no on-chain size cap**, so one holder can bloat that id's `tokenURI` past what RPCs serve, for everyone, permanently if a `lock=` then bites — `deploy-code --copies` warns, relay it. Why it is deliberate, and the full shape → [code-projects.md → shared params](reference/code-projects.md#postparam-schema--the-type--auth-catalog).
|
|
151
|
-
|
|
152
|
-
**Planning a priced primary sale? Decide 1/1 vs Series (or edition) BEFORE deploying — it's irreversible.** The shared fixed-price minter sells a **Series** (mint-on-purchase); a plain `abx deploy` **1/1 has no minter/pause/payee**, so its only post-mint move is `abx transfer` (settle an off-chain sale). To run a native fixed-price sale of even a *single* piece, deploy it as a **1-token Series** (`abx deploy-series --count 1`) — or, if copies of that one piece are fine, as an **edition** (`abx deploy --copies <n|open>`), which ships the full sale stack (minter/pause/payee) on its own, no Series wrapper needed. abx has **no secondary-listing feature** — reselling a held token means an external marketplace or a manual `transfer`. Full detail: [operating.md → Selling](reference/operating.md#selling--the-shared-fixed-price-minter).
|
|
153
|
-
|
|
154
|
-
## Phase 0 — make the work first (skip every gate below until it's good)
|
|
155
|
-
|
|
156
|
-
**If the creator is still making the piece, you are in the studio, not in a deploy. Stay there until they
|
|
157
|
-
say ship.**
|
|
158
|
-
|
|
159
|
-
- **Handed a finished file** (`sketch.js`, a build dir, an image folder) → skip to
|
|
160
|
-
[Gate 1](#gate-1--demo-or-real-launch).
|
|
161
|
-
- **Brought an idea, a reference, a vibe, "let's make one together"** → Phase 0.
|
|
162
|
-
|
|
163
|
-
**OFF the table until they ship** — don't ask, don't "just quickly confirm", don't pre-emptively lay out
|
|
164
|
-
tradeoffs: hosting/lane, thumbnails, traits, storage, names, symbols, royalties, gas, minting.
|
|
165
|
-
|
|
166
|
-
**The loop** (depth → [code-projects.md → Studio loop](reference/code-projects.md#studio-loop--iterate-on-the-work-before-you-deploy-anything)):
|
|
167
|
-
|
|
168
|
-
1. **Write against the real runtime contract from the first draft** — `abx.tokenData.seed` for
|
|
169
|
-
randomness, `abx.traits({…})` for features. Never `Math.random()` "for now"; retrofitting is a rewrite.
|
|
170
|
-
2. **`abx preview --script art.js`, hand them the URL.** Same document the generator serves. This is the
|
|
171
|
-
one place you hand over a link instead of running it for them.
|
|
172
|
-
3. **Edit, tell them to refresh.** The program is re-read from disk per render — no restart, no watcher.
|
|
173
|
-
`--shoot <dir>` gives you frames to check your own work.
|
|
174
|
-
4. **Take feedback, go again.** Several rounds is the point, not scope creep.
|
|
175
|
-
|
|
176
|
-
**Exit only on an explicit ship signal** ("let's deploy this", "I'm happy with it"). Then `abx inspect
|
|
177
|
-
<script>` and open the deploy decisions.
|
|
178
|
-
|
|
179
|
-
## Gate 1 — demo or real launch?
|
|
180
|
-
|
|
181
|
-
| | **Demo** (`abx demo`) | **Real launch** (`abx deploy` → operate) |
|
|
182
|
-
|---|---|---|
|
|
183
|
-
| Art | generative-from-address | the creator's `--image` |
|
|
184
|
-
| Storage | none — the SVG is inlined **on-chain** | a permanence decision |
|
|
185
|
-
| Host URL | none — nothing is hosted, nothing to bake | a public URL baked on-chain (off-chain custody only) |
|
|
186
|
-
| Key | any funded testnet key (the active `ABX_CHAIN`) | the wallet that should **own** it |
|
|
187
|
-
| Decisions | none — just run it | the framework below |
|
|
188
|
-
|
|
189
|
-
Just want to see it work? `abx demo`, skip the rest.
|
|
190
|
-
|
|
191
|
-
## Gate 2 — who signs? (three lanes)
|
|
192
|
-
|
|
193
|
-
Every write builds an unsigned tx; pick the lane by stakes:
|
|
194
|
-
|
|
195
|
-
| Lane | Flag | Signs | Use when |
|
|
196
|
-
|---|---|---|---|
|
|
197
|
-
| **Hot** | default (or `--send`) | env key, in-process | autonomous agent · testnet · low value |
|
|
198
|
-
| **Wallet** | `--sign` | human's own wallet (MetaMask/Ledger) | real value · key shouldn't touch `.env` |
|
|
199
|
-
| **Cold** | `--unsigned` | multisig / offline signer | a Safe / advanced setup |
|
|
200
|
-
|
|
201
|
-
- **Pick it:** you hold the key + low stakes → hot. Human owns the valuable wallet → wallet. Multisig →
|
|
202
|
-
cold. Beyond throwaway testnet, lead with `--sign`.
|
|
203
|
-
- **A missing key is a fork, not a blocker** — offer both: add a funded key, or `--sign` in a browser.
|
|
204
|
-
- **On the wallet lane ALWAYS ask "which wallet will you connect?" and pass `--for <addr>`.** One connect
|
|
205
|
-
assigns **all three roles at once** — owner, royalty receiver, mint recipient — so never offer "connect
|
|
206
|
-
whatever". When you ask, say what you're asking for: **`--for` takes their PUBLIC address (`0x…`), the
|
|
207
|
-
one they'd paste to receive a transfer — never a private key or seed phrase.** A creator nervous about
|
|
208
|
-
crypto hears "give me your address" as "give me your keys" unless you say otherwise.
|
|
209
|
-
- **The sign page connects an INJECTED browser wallet only** (`window.ethereum`) — no WalletConnect, no QR.
|
|
210
|
-
A hardware wallet works through a browser extension that exposes it (MetaMask with a Ledger attached,
|
|
211
|
-
say), not by scanning a code. Say that before they go looking for a QR.
|
|
212
|
-
- **`--for` is a DEPLOY concern only.** Owner ops already sign as the current on-chain owner; passing it
|
|
213
|
-
there is harmless but ignored.
|
|
214
|
-
- **One EOA, serialize every send** — two processes sharing a key pick the same nonce and one dies
|
|
215
|
-
`replacement transaction underpriced`.
|
|
216
|
-
|
|
217
|
-
**⚠ `--sign` BLOCKS until the human signs — ALWAYS background it with `--sign-url-file`, NEVER
|
|
218
|
-
foreground** (a foreground run hangs your whole turn):
|
|
219
|
-
|
|
220
|
-
1. Background `--sign --sign-url-file <path>`.
|
|
221
|
-
2. Read the URL **from that file every time — never assume the port** (each op gets a fresh server).
|
|
222
|
-
3. Relay: "Open `<url>`, connect your wallet, approve." Don't auto-open. Multi-tx → say it's N approvals.
|
|
223
|
-
4. Let the background command finish — it signs, confirms and re-indexes. Don't kill it.
|
|
224
|
-
|
|
225
|
-
**⚠ Wallet-lane ops run ONE AT A TIME** — never start the next `--sign` op until the previous background
|
|
226
|
-
command has finished.
|
|
227
|
-
|
|
228
|
-
- **The sign page is operation-aware** — decoded intent, gated on network + signing wallet + the tx; the
|
|
229
|
-
CLI refuses a mismatched signer.
|
|
230
|
-
- **Multi-tx signs in ONE session** (hot + wallet only): the human connects once and walks the sequence.
|
|
231
|
-
- **Keep tx count low and say it up front** — every preview prints `approvals N wallet approval(s)`, the
|
|
232
|
-
exact signature count.
|
|
233
|
-
|
|
234
|
-
## Quick start
|
|
235
|
-
|
|
236
|
-
**Custody is the master call; resolve it before signing/identity.** The rule, by size:
|
|
237
|
-
|
|
238
|
-
| Content size | Default | Why |
|
|
239
|
-
|---|---|---|
|
|
240
|
-
| **Small** (≲ 40 KB/file) | fully **on-chain** (`--onchain-image --compress fastlz`) | no host, renders forever, cheaper *at this size* |
|
|
241
|
-
| **Bigger / photographic** (most PNG/JPEG) | image **off-chain**, JSON on-chain (`--onchain-uri --backend arweave`) | on-chain is ~200 gas/byte to write, and the READ is what bites (below); Arweave is pay-once permanent |
|
|
242
|
-
| **Bigger, but they want it on-chain anyway** | still **on-chain** (`--onchain-image`) — this row is a *default*, not a limit | **no size is refused**; ≲117 KB renders anywhere, above that the CLI measures your RPC and says who else can read it — quote the gas and let them choose |
|
|
243
|
-
|
|
244
|
-
On-chain's edge past small is self-resolution/permanence, **never cost** — don't call it "cheaper" above the threshold.
|
|
245
|
-
|
|
246
|
-
**Nothing is refused at any size — the question is who can READ it.** The **write** is chunked into 22,000-byte SSTORE2 transactions, so no block limit binds it at any size (~200 gas/byte, money only). The **read** is one `eth_call` at **~360–405k gas per KB** (quote the range, never a flat rate), and whether it succeeds belongs to whoever's endpoint is asking. **≲117 KB (~50M gas) reads on every endpoint measured** — that is the floor: geth's default and what publicnode/drpc serve. Above it the CLI **probes your actual RPC** and reports its real cap. Measured 2026-08-24: `sepolia.base.org`, the default endpoint of our default chain, allows **600M (~729 KB)**. **A 77 KB PNG renders everywhere: ~16M gas to write, ~31M to read.** A 312 KB one ships too — it warns that a 50M-capped provider will show a revert. **We can measure YOUR RPC; we cannot know a marketplace's or an indexer's** — and theirs decide whether the token displays, so never present a measured cap as settling that (it is point-in-time too: pooled endpoints rotate). **Reach is fixable after the fact, and the bytes are permanent either way:** a resolver (`abx deploy-resolver`, or a hosted one) reads on-chain content with **its own** RPC and serves plain HTTP, so a marketplace fetches a URL and never makes the big call — `abx set-renderer <addr> --off` repoints `tokenURI` at it with every byte left where it is. **Storage and serving are separate choices:** on-chain is the strongest storage answer at any size; self-resolving vs a resolver is a serving decision you can change later. `--backend arweave` is the other side of the *storage* trade. **Never quote a BLOCK gas limit as the read ceiling** — three limits share that name and differ by orders of magnitude on one endpoint (measured Base Sepolia: `eth_call` 600M · `eth_estimateGas` 16.7M · block 1,200M); the block limit bounds a *contract* reading inside a tx (~1,100 KB there), not an off-chain read. `--compress fastlz` is cheaper to *write*, not to *read*. Per token, so a 300-piece collection of 5 KB SVGs is fine. Measured table → [decisions.md → The READ cost](reference/decisions.md#the-read-cost--who-can-see-it-and-why-nothing-is-refused).
|
|
247
|
-
|
|
248
|
-
**When the user names off-chain custody for tiny content ("deploy it as an IPFS NFT"), lead with the on-chain recommendation in your *first* reply** — don't bury it, and don't collect resolver-URL details for a path you're about to advise against. "For a 2.4 KB SVG I'd go fully on-chain — no server, renders forever, cheaper. Want that, or IPFS?" Then let them choose (you surface the better default; you don't override the request). Defaulting to "IPFS" for tiny content is what lands it at a broken localhost URI.
|
|
249
|
-
|
|
250
|
-
Tiny-content path:
|
|
251
|
-
1. **Confirm identity** (name, symbol, `--description`, royalty, **royalty cap** (permanent, reduce-only), **burnable** (permanent), owner) via the [readout](#confirm-before-sending).
|
|
252
|
-
2. **Deploy + mint in one go:**
|
|
253
|
-
```bash
|
|
254
|
-
abx deploy --image art.svg --name "…" --symbol … --description "…" --onchain-image --compress fastlz [--sign --for 0x…]
|
|
255
|
-
```
|
|
256
|
-
= staging tx(s) + one deploy-that-mints. **Mint at deploy — no `--no-mint`** (nothing to warm).
|
|
257
|
-
3. **Prove + finish:** `abx tokenuri <addr>` (reads metadata straight from chain) · `abx refresh <addr>` (nudge marketplaces) · lock later once it resolves: `abx lock-field <addr> --field image` then `abx lock-uri <addr>`.
|
|
258
|
-
|
|
259
|
-
For large/dynamic media, off-chain custody, or operating an existing project, use the framework + reference files below.
|
|
260
|
-
|
|
261
|
-
## Series (multi-token drops)
|
|
262
|
-
|
|
263
|
-
One contract, **N tokens**, static creator metadata — a folder of media → a collection. **Everything from the 1/1 applies per token** (custody, on-chain vs off-chain, signing lanes, identity, locking, warming); only the three points below are new. Reach for it when there's more than one piece; a single image is `abx deploy`.
|
|
264
|
-
|
|
265
|
-
```bash
|
|
266
|
-
abx deploy-series --dir <media-dir> --name "…" --symbol … [--onchain-uri --backend arweave|ipfs|cloud | --onchain-image --compress fastlz | --onchain-uri | --public-base-url https://…] [--mint-all | --mint-count N | --no-mint]
|
|
267
|
-
```
|
|
268
|
-
**Quick start — a folder of photos, permanent, no server:**
|
|
269
|
-
```bash
|
|
270
|
-
abx deploy-series --dir ./photos --name "My Series" --symbol MS --onchain-uri --backend arweave --mint-all --sign
|
|
271
|
-
```
|
|
272
|
-
Files natural-sort into **tokens `0…N-1`** (`--count N` uses the first N); a token's metadata is its token id. **Content placement is per token — the same custody call as a 1/1** (see [Decisions](#decisions-real-launch)). The one Series-specific win: a **same-extension folder** uploads as ONE directory → a single collection-scope image field (O(1) on-chain, any size); mixed extensions fall back to per-token fields (still no server). **Per-token traits: `--attributes <file.json>`**, lane-aware exactly like a 1/1's — off-chain by default, inlined on-chain under `--onchain-uri`/`--traits-onchain`. Accepted shapes, and the huge-series `set-field` route → [operating.md → Series-only owner ops](reference/operating.md#series-only-owner-ops). *(Traits computed from a seed are a code project, not a static Series.)*
|
|
273
|
-
|
|
274
|
-
## Code projects (generative / code-based drops)
|
|
275
|
-
|
|
276
|
-
A **program is the content** (`abx deploy-code`): output is a function of live on-chain state
|
|
277
|
-
(`tokenData`: coordinates + `seed` + PostParams), injected at view time. Everything from a
|
|
278
|
-
[Series](#series-multi-token-drops) applies. This section is the **decision tree**; operating depth —
|
|
279
|
-
what to keep running, the resume loop, verify steps, render ops, lane internals, selling — lives in
|
|
280
|
-
**[reference/code-projects.md](reference/code-projects.md)**.
|
|
281
|
-
|
|
282
|
-
**The mint `seed` is pseudorandom, NOT lottery-grade — say so before a creator prices scarcity off it.** Every mint draws it from the canonical `AbxSeedSource` (block values + token id). It replays afterwards (that is what makes the output verifiable) but is **not secret beforehand**: a contract minting in the same tx can compute the seed it would get and revert unless it likes it. Fine when the seed diversifies the work and the distribution *is* the product; **not** fine for a raffle or any drop where one rare outcome is worth materially more than mint price — that needs the creator's own `IAbxSeedSource` (commit-reveal/VRF), a first-class swap at both ends (`deploy-code --seed-source 0x…`, `abx set-seed-source`). Who picks differs by lane, and a `seed` schema lets an authorized party choose the value outright → [code-projects.md → Seeds](reference/code-projects.md#seeds--pseudorandom-not-lottery-grade).
|
|
283
|
-
|
|
284
|
-
**Infra fork FIRST, before any lane talk: a code project's thumbnail is *rendered* off-chain, so it
|
|
285
|
-
ALWAYS needs a PUBLIC home you provide.** There is NO zero-infrastructure code drop, and "fully
|
|
286
|
-
on-chain" does NOT mean "nothing to run". Two shapes — an **off-chain resolver** (`--public-base-url`,
|
|
287
|
-
the default for a drop you'll sell: auto-renders every mint and param change, stays maneuverable; a
|
|
288
|
-
managed provider with `render.attached` covers both halves with one key), or **fully on-chain**
|
|
289
|
-
(`--onchain-uri --image-base <a bucket you own>`: maximal durability, no always-on service, but stills
|
|
290
|
-
are manual, on-chain traits need a deployed renderer, and the whole document rides each `tokenURI` at
|
|
291
|
-
~360–405k gas/KB — `deploy-code --dry-run` prints the figure, relay it). Settle this with the creator
|
|
292
|
-
first. *(The one zero-infra-AND-on-chain exception is the in-chain Solidity lane below.)*
|
|
293
|
-
|
|
294
|
-
**Writing the program yourself? There is ONE runtime contract — get it right or the drop is silently
|
|
295
|
-
broken** (seed never injects → every token identical; traits empty). The program reads state via
|
|
296
|
-
**`abx.tokenData`** (flat: `.seed`, and each `--schema` key) and reports traits via **`abx.traits({…})`**
|
|
297
|
-
— never an invented global, never "defensively across variants". `abx.traits()` is the ONLY thing
|
|
298
|
-
captured into `attributes`, on the resolver lane too. Verify with `abx inspect` before picking a lane:
|
|
299
|
-
its PostParams and Traits lines reflect what the program *actually* reads and reports. Full contract →
|
|
300
|
-
[code-projects.md → Authoring the program](reference/code-projects.md#authoring-the-program--the-abxjs-runtime-contract-get-this-right-first).
|
|
301
|
-
|
|
302
|
-
**Run `abx inspect <script>` before proposing any lane, and adopt the lane it recommends.** A code
|
|
303
|
-
project has surfaces that must each land somewhere public, and the fatal mistake is picking "fully
|
|
304
|
-
on-chain, no server!" then discovering one at a time, after deploy, that it carries no thumbnail, no
|
|
305
|
-
traits, and dropped a PostParam. **Settle these BEFORE you deploy.** They are not impossible to
|
|
306
|
-
change afterwards — the honest cost is an owner-signed **re-point tx** (`set-field image <public url>`)
|
|
307
|
-
plus a re-render, on a collection that has been showing a placeholder in the meantime. `abx inspect` and `deploy-code --dry-run` print a **Surfaces block** grading
|
|
308
|
-
each one; **every ⚠ there is a marketplace-facing hole to close before deploy — trust it over your own
|
|
309
|
-
read.** Resolve them into ONE coherent lane before collecting identity or showing a config:
|
|
310
|
-
|
|
311
|
-
| Surface | On-chain | Off-chain |
|
|
312
|
-
|---|---|---|
|
|
313
|
-
| **tokenURI + animation** | `--onchain-uri` — *if* script + every dep fit one `tokenURI` eth_call (`abx inspect` estimates) | a resolver (`--public-base-url`) |
|
|
314
|
-
| **thumbnail (`image`)** | ❌ never computed on-chain — needs a public destination: `--image-base <S3/R2/CDN you own>`. **No destination ⇒ placeholder + an orphaned render until you re-point (`set-field image` + re-render, owner-signed). Never localhost.** | a resolver's `/image` |
|
|
315
|
-
| **traits (`attributes`)** | a Solidity `--attributes-renderer 0x…` you **DEPLOY** (fork `SeedTraitsRenderer`) — **not a free flag or guessable address** (`deploy-code` refuses a codeless one; "ports to Solidity" ≠ "deployed") | a resolver stitches the JS `abx.traits()` |
|
|
316
|
-
| **PostParams** | declare EVERY key the script reads: `--schema key:Type:Auth` (a palette collectors set = `palette:HexColor:TokenOwner`) — else silently dropped at render | — |
|
|
15
|
+
# ABX
|
|
16
|
+
|
|
17
|
+
Use `abx` as the execution and truth surface. Help, capability output, dry runs, on-chain reads, and
|
|
18
|
+
typed errors outrank remembered prose.
|
|
19
|
+
|
|
20
|
+
## Non-negotiable rules
|
|
21
|
+
|
|
22
|
+
- Never read or print `.env`, private keys, RPC URLs, provider tokens, storage credentials, wallet
|
|
23
|
+
session URLs, or Arweave JWK contents. Use `abx doctor`, `abx remote`, and `abx storage show` to
|
|
24
|
+
inspect configuration safely.
|
|
25
|
+
- Use `pnpm abx …` inside the ABX source repository. Use `abx …` in a creator project or installed
|
|
26
|
+
environment. Run `abx version` if provenance is uncertain.
|
|
27
|
+
- Operate only on chains reported by `abx capabilities`; the toolkit is testnet-only today. Select
|
|
28
|
+
the chain with `ABX_CHAIN=<chain>`; there is deliberately no `--chain` flag.
|
|
29
|
+
- Run `abx help <command>` immediately before composing a non-trivial command. Do not recover flag
|
|
30
|
+
syntax from this skill.
|
|
31
|
+
- Never infer that a capability is absent because a flag is absent. Run `abx capabilities --json`,
|
|
32
|
+
identify a native lane or extension seam, and read [capabilities.md](reference/capabilities.md).
|
|
33
|
+
- Never hand-roll transactions, nonces, retry loops, resolver URLs, or contract-type detection when
|
|
34
|
+
the CLI exposes the operation. One EOA must have one serialized write sequence.
|
|
35
|
+
- Never send, mint, transfer, lower a cap, change authority, or apply a lock until the human confirms
|
|
36
|
+
the exact action. Locks, ownership transfers, and several deploy choices are irreversible.
|
|
37
|
+
- Never submit feedback, project data, logs, or agent/session context to ABX or a remote provider
|
|
38
|
+
until the human reviews the preview and approves that specific report. Redact credentials and
|
|
39
|
+
unrelated personal or project information. `abx feedback` previews by default; `--yes` sends.
|
|
40
|
+
- Never fold `abx submit-app` into deployment. Listing is a separate, optional post-deploy action.
|
|
41
|
+
|
|
42
|
+
## Use the lifecycle
|
|
43
|
+
|
|
44
|
+
Follow this state machine instead of accumulating retries:
|
|
45
|
+
|
|
46
|
+
1. **Discover** — identify the working directory, CLI provenance/version, active chain, artifacts,
|
|
47
|
+
existing contract addresses, configured remote, and signer preference. Run `abx doctor` for a
|
|
48
|
+
deployment or unfamiliar environment.
|
|
49
|
+
2. **Classify surfaces** — decide collection shape, runtime, required public surfaces, custody,
|
|
50
|
+
resolution, authority, mutability, and mint/sale timing. Use the model below.
|
|
51
|
+
3. **Inspect** — run `abx capabilities --json`; for code run `abx inspect` and `abx preview`. For an
|
|
52
|
+
existing collection run `abx state`, `abx tokens`, `abx tokenuri`, and `abx verify` as relevant.
|
|
53
|
+
4. **Plan** — use the selected deploy command with `--dry-run --json`. Read its normalized shape,
|
|
54
|
+
addresses, surface warnings, transaction count, storage activity, and irreversible choices back
|
|
55
|
+
to the creator. A dry run may perform read-only network probes; it must not send or store.
|
|
56
|
+
5. **Confirm** — confirm name, symbol, token standard, code-capable/static type, burnability,
|
|
57
|
+
ERC-721C/ERC-1155C enrollment, edition arithmetic, royalty ceiling, signer, costs, public URLs,
|
|
58
|
+
initial mint, and every requested lock.
|
|
59
|
+
6. **Execute** — let the CLI sign and serialize the operation. Do not start a second write process
|
|
60
|
+
with the same EOA. Honor structured lifecycle states and terminal errors.
|
|
61
|
+
7. **Verify** — verify the contract and each promised surface from its canonical path. Use on-chain
|
|
62
|
+
reads for self-resolving metadata and `abx verify`/remote status for hosted surfaces. Mint token 0
|
|
63
|
+
before expecting token-specific renders.
|
|
64
|
+
8. **Operate** — configure sales, publish renders, migrate, refresh marketplaces, transfer authority,
|
|
65
|
+
or lock only after verification. Record the contract address, chain, deploy block, custody,
|
|
66
|
+
resolution, owner powers, and remaining mutable surfaces.
|
|
67
|
+
|
|
68
|
+
When diagnosing, identify the current state and choose one next transition. Read
|
|
69
|
+
[diagnose.md](reference/diagnose.md); do not build a ladder of speculative retries.
|
|
70
|
+
|
|
71
|
+
## Model the project by independent dimensions
|
|
72
|
+
|
|
73
|
+
Keep these concepts separate. Most bad ABX plans collapse two of them into “hosting.”
|
|
74
|
+
|
|
75
|
+
| Dimension | Decide |
|
|
76
|
+
|---|---|
|
|
77
|
+
| **Collection shape** | one work; N unique works; one or N ids with limited/open copies |
|
|
78
|
+
| **Runtime** | static media; JavaScript program; build directory; Solidity field renderer |
|
|
79
|
+
| **Public surfaces** | metadata, image, animation, traits, attachments, PostParams |
|
|
80
|
+
| **Custody** | on-chain bytes, Arweave, IPFS, cloud, or local development storage |
|
|
81
|
+
| **Resolution** | on-chain renderer, hosted resolver, or on-chain JSON pointing at external media |
|
|
82
|
+
| **Rendering** | no derived render, one-shot stills, continuous effects, or Solidity-computed fields |
|
|
83
|
+
| **Authority** | owner, token holder, delegated address, minter, hook, transfer validator |
|
|
84
|
+
| **Mutability** | editable values/pointers, governed values, and the locks applied after verification |
|
|
317
85
|
|
|
318
|
-
|
|
319
|
-
traits.** (On `--onchain-uri`, an unauthenticated Etherscan "Read Contract" can hit its gas cap on a big
|
|
320
|
-
document and look like a revert — expected; verify with `abx tokenuri`, never `abx index --full` to
|
|
321
|
-
"fix" it. → [troubleshooting.md](reference/troubleshooting.md).)
|
|
86
|
+
Use precise language:
|
|
322
87
|
|
|
323
|
-
**
|
|
88
|
+
- **On-chain bytes** describes custody. **Self-resolving** describes resolution.
|
|
89
|
+
- **Chain-complete** means the requested document has no off-chain dependency. It does not promise
|
|
90
|
+
immutability or that every third-party RPC can execute a large read.
|
|
91
|
+
- **Locked** names a particular stored value or pointer. It does not prove that code behind a proxy
|
|
92
|
+
is immutable or that every output input is frozen.
|
|
93
|
+
- Marketplace refresh re-fetches a projection; it does not mutate canonical state.
|
|
324
94
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
|
330
|
-
| A pre-built app (webpack/vite output) | `--code-dir build/` (+ `--onchain-uri` or `--public-base-url`) | **no server to run**, gateway-served → **never** chain-complete (8KB param budget) |
|
|
331
|
-
| A **Solidity renderer** (SVG on-chain, from seed+params) | `--image-renderer 0x<svg> [--attributes-renderer 0x<traits>] --onchain-uri` (no `--script`) | **truly in-chain** — image + traits computed on-chain, tokenURI on-chain, **zero infra**; no `animation_url` (no program) |
|
|
332
|
-
| **A JS program AND on-chain thumbnail/traits** — the both-worlds shape | `--script f.js --image-renderer 0x<svg> --attributes-renderer 0x<traits> --onchain-uri` | **every surface in-chain, zero infra** — `animation_url` assembles from the script chunks, `image`+`attributes` computed by Solidity. **Nothing to render or host.** |
|
|
333
|
-
|
|
334
|
-
**`--script` and `--image-renderer` are NOT an either-or** — passing both is the strongest shape
|
|
335
|
-
available and the most-missed: the program drives `animation_url` on-chain while Solidity renderers
|
|
336
|
-
supply `image` and `attributes`, so an interactive generative piece gets a real thumbnail and real
|
|
337
|
-
traits with **no resolver, no runner, no bucket**.
|
|
338
|
-
|
|
339
|
-
**⭐ The in-chain Solidity lane — recommend on-chain `tokenURI` without hesitation.** The work is a
|
|
340
|
-
Solidity `IAbxFieldRenderer` returning an SVG from seed+params, wired with no `--script`: image and
|
|
341
|
-
traits computed on-chain, **genuinely nothing to run**. **Not no-code, though** — the renderer is a
|
|
342
|
-
contract the creator compiles and deploys with Foundry (`abx scaffold-renderer <dir>` writes a
|
|
343
|
-
ready-to-build project; `abx` never compiles or deploys Solidity). Not comfortable with Solidity? Steer
|
|
344
|
-
to the resolver, or `--onchain-image` for a tiny static SVG. Depth →
|
|
345
|
-
[code-projects.md](reference/code-projects.md#in-chain-solidity-svg--the-zero-dependency-lane).
|
|
346
|
-
|
|
347
|
-
## Decisions (real launch)
|
|
348
|
-
|
|
349
|
-
**Custody is the master call** — size decides it ([Quick start](#quick-start) has the rule and the READ
|
|
350
|
-
ceiling; do not restate the numbers, they live there). Four patterns, by where bytes live × how
|
|
351
|
-
`tokenURI` resolves — name the one you're proposing, then configure it from
|
|
352
|
-
[decisions.md](reference/decisions.md):
|
|
353
|
-
|
|
354
|
-
1. **Fully on-chain** (`--onchain-image`) — bytes *and* JSON on-chain. Small content only.
|
|
355
|
-
2. **Image off-chain, JSON on-chain, no server** (`--onchain-uri --backend arweave|ipfs|cloud`) — the
|
|
356
|
-
sweet spot for static content.
|
|
357
|
-
3. **Remote resolver** (`--public-base-url` + a node) — mutable/dynamic metadata; self-hosted or managed.
|
|
358
|
-
4. **Inline SVG on-chain** — self-contained vector. 1/1 → `--onchain-uri`; a Series of SVGs →
|
|
359
|
-
`--onchain-image --compress fastlz`.
|
|
360
|
-
|
|
361
|
-
The second axis is **mutability**: any pattern stays editable until you freeze it, so ship unlocked,
|
|
362
|
-
confirm it resolves, then lock (see *Store ≠ lock* below).
|
|
363
|
-
|
|
364
|
-
**IPFS/Arweave is NOT a server.** Pattern 2 commits the bare CID/txid on-chain and the renderer joins it
|
|
365
|
-
to the collection's gateway prefix at read time — nothing to keep running, and the gateway is a one-tx
|
|
366
|
-
repoint (`abx set-gateway`), not a value welded into the field. Only pattern 3 needs a resolver. Never
|
|
367
|
-
tell a creator IPFS is blocked on "a public URL" or "a server always online".
|
|
368
|
-
|
|
369
|
-
**The six decisions** — storage permanence · public host URL · identity · image placement · on-chain
|
|
370
|
-
vs off-chain resolution · when to mint. Full detail, tradeoffs and failure modes:
|
|
371
|
-
**[decisions.md](reference/decisions.md)**. The four that can go permanently wrong, in brief:
|
|
372
|
-
|
|
373
|
-
- **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.
|
|
374
|
-
- **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).
|
|
375
|
-
- **Store ≠ lock; lock last.** Deploy unlocked, confirm it resolves in production, *then* freeze (`lock-field` / `lock-uri`; a code drop also needs `lock-script` + `lock-dependencies`). A deliberate follow-up, never the first deploy.
|
|
376
|
-
- **Say "locked metadata", never "immutable work".** Locks freeze what the contract *stores* — and every one freezes a **pointer or a value, never behavior** (a locked renderer can still be a proxy that is upgraded later). An **ungoverned PostParam has no lock at all**; a schema'd one can be welded. The lock a **buyer** actually asks about is `lock-param-hooks`, because a `--transfer` hook is a **veto** over whether they can ever sell. A live-adapting token is a fine thing to build — just never sell a frozen one as frozen unless it is. Rules, exceptions, and what to check before any permanence claim → [decisions.md → Locks](reference/decisions.md#locks--what-actually-freezes-and-what-a-buyer-is-really-asking).
|
|
377
|
-
- **Tunnels (ngrok/cloudflared) are preview-only** — never bake one on-chain.
|
|
378
|
-
|
|
379
|
-
## Confirm before sending
|
|
380
|
-
|
|
381
|
-
`abx deploy --dry-run` for real values (pin the salt it prints with a second `--dry-run --salt …`).
|
|
382
|
-
**No key in `.env`? `--dry-run` still needs a deployer — pass `--for 0x<the creator's wallet>`.**
|
|
383
|
-
|
|
384
|
-
```
|
|
385
|
-
Deploy config — confirm before I send (everything below is written on-chain):
|
|
386
|
-
|
|
387
|
-
Name Donuts & Cake ⚠ inferred from filename — confirm or rename
|
|
388
|
-
Symbol DONUTS ⚠ inferred — confirm
|
|
389
|
-
Description "<the creator's words>" ⚠ I have nothing from you — give me a line, or I deploy with none
|
|
390
|
-
Traits none ⚠ none written — add --traits "Key=Value" or skip
|
|
391
|
-
Image donuts-cake.svg · 2.4 KB → reader (fastlz, 1 chunk) · on-chain
|
|
392
|
-
Resolution on-chain via renderer 0x5F36…1829 — no server, no localhost
|
|
393
|
-
Royalty 5% (500 bps) → 0x0248…b13C (default; confirm rate + receiver)
|
|
394
|
-
Owner 0x0248…b13C (the deploying wallet)
|
|
395
|
-
Mint token #0 → owner, at deploy
|
|
396
|
-
Address 0x2619…9Da9 (salt-pinned: --salt 0x…)
|
|
397
|
-
Locking deploying UNLOCKED — lock later, after verifying it resolves
|
|
398
|
-
Transactions stage image (1) + deploy + mint (1) = 2
|
|
399
|
-
|
|
400
|
-
Reply to change anything, or say go.
|
|
401
|
-
```
|
|
402
|
-
|
|
403
|
-
Rules:
|
|
404
|
-
- **The readout is a contract: what's shown is *exactly* what deploys.** Every value is a flag you pass;
|
|
405
|
-
anything not going on-chain says so.
|
|
406
|
-
- **Every line is verified, never aspirational.** A value depending on a contract that must already exist
|
|
407
|
-
(`--attributes-renderer`, a minter) is only claimed once checked.
|
|
408
|
-
- **Flag every inferred or defaulted value** with `⚠` and where it came from.
|
|
409
|
-
- **The description is the one people forget** — never deploy an auto-written or empty one quietly.
|
|
410
|
-
- **Traits are the creator's** — ask; never invent them.
|
|
411
|
-
- **Show real values**: real name, description, address + pinned salt, chunk/tx counts from the dry run.
|
|
412
|
-
- Adapt rows to the config (off-chain shows backend + host URL instead of the renderer; `--no-mint` shows
|
|
413
|
-
a deferred mint) — but always show what is written on-chain.
|
|
414
|
-
|
|
415
|
-
## Deploy strategy — when to mint
|
|
416
|
-
|
|
417
|
-
The deploy address is **deterministic** — a pure function of `(factory, salt)`, knowable before signing
|
|
418
|
-
(`abx predict`). So you can warm a resolver at that exact address first, and the moment a marketplace
|
|
419
|
-
sees the mint it fetches live metadata rather than a cached blank. Minting at deploy is optional
|
|
420
|
-
(`--no-mint`); `abx mint` is the one-shot.
|
|
421
|
-
|
|
422
|
-
| Path | When | Flow |
|
|
95
|
+
## Choose the native deployment family
|
|
96
|
+
|
|
97
|
+
Run `abx capabilities --json` for the current matrix, then load [deploy.md](reference/deploy.md).
|
|
98
|
+
|
|
99
|
+
| Intent | Command | Default contract shape |
|
|
423
100
|
|---|---|---|
|
|
424
|
-
|
|
|
425
|
-
|
|
|
426
|
-
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
Full command, the multi-tx write, and the humans-use-`/submit` alternative →
|
|
447
|
-
[operating.md → App Store](reference/operating.md#listing-in-the-abx-app-store--abx-submit-app).
|
|
448
|
-
|
|
449
|
-
## What a token carries — files beyond the image (the data plane)
|
|
450
|
-
|
|
451
|
-
A token is **not "just a picture."** It anchors **named, typed files**, and the served JSON carries an
|
|
452
|
-
**`artifacts`** list — the *complete* set, each `{key, mimeType, uri}`. `image`/`animation_url` are
|
|
453
|
-
reserved members of that same set; alongside them a token can carry a hi-res master, a certificate,
|
|
454
|
-
source files, a README.
|
|
455
|
-
|
|
456
|
-
- **Attach:** `abx attach <addr> <key> <ipfs://… | ar://… | https://…>` — `<key>` is any name you pick.
|
|
457
|
-
Representation is auto-detected from the scheme; `mimeType` comes from the file **extension**, so
|
|
458
|
-
point the URI at the file itself. Tiny bytes with no host can go on-chain with `--file`. One file per
|
|
459
|
-
call, after deploy.
|
|
460
|
-
- **No URL yet?** `abx storage upload <path> --backend arweave|ipfs` prints the locator `attach` wants
|
|
461
|
-
(and the ready-to-run `attach` line). Hand `attach` the `ipfs://`/`ar://` form, never a gateway URL —
|
|
462
|
-
an `https://` locator is stored as an opaque `url` with the host welded in.
|
|
463
|
-
- **`artifacts` is COMPUTED, never a field you set** — the manifest builds itself from your fields.
|
|
464
|
-
- **Say the honest limit up front:** no mainstream marketplace shows a files tab **today**. Verify an
|
|
465
|
-
attach with `abx tokenuri <addr> --fetch`, not by refreshing OpenSea.
|
|
466
|
-
|
|
467
|
-
Resolver-vs-on-chain reach, effect outputs, reserved keys, and the params exception →
|
|
468
|
-
[operating.md → Attaching files](reference/operating.md#attaching-files--the-data-plane).
|
|
469
|
-
|
|
470
|
-
## After launch — tell the creator (durability + owner care)
|
|
471
|
-
|
|
472
|
-
Cover these in plain language once it's live; don't wait to be asked.
|
|
473
|
-
|
|
474
|
-
- **Durability is the backend's, and they differ.** Arweave = pay once, kept for centuries, nothing to
|
|
475
|
-
renew. IPFS = **only as durable as the pin** — if pinning lapses the bytes can go. `cloud`/`fs` = they
|
|
476
|
-
maintain it. Say which one this drop uses and what it implies.
|
|
477
|
-
- **Gateway ≠ backend, and the sizes differ.** A slow or dead gateway for ipfs/arweave content is **one
|
|
478
|
-
tx** (`abx set-gateway`), no re-upload, and it works on locked fields. Changing the **backend** is a
|
|
479
|
-
real migration: re-upload, then re-point. Both are owner-signed.
|
|
480
|
-
- **Owner-wallet hygiene** (offer as follow-ons): the owner wallet controls mint, royalties, URIs and
|
|
481
|
-
ownership itself — recommend a hardware/dedicated wallet over a hot key, a multisig
|
|
482
|
-
(`abx set-admin`) for anything valuable, and backing up `.abx-self-host/arweave-key.json` if Arweave
|
|
483
|
-
credits live there.
|
|
484
|
-
|
|
485
|
-
## Setup + environment
|
|
486
|
-
|
|
487
|
-
`abx` needs **Node ≥ 22.5**. Resolve the binary **local first, then global** — `./node_modules/.bin/abx`
|
|
488
|
-
(preferred; invoke as `npx abx …`), else a global `abx`, else install **`@artblocks/abx-cli`** (never
|
|
489
|
-
`@artblocks/abx-sdk`, which ships no binary). **Never probe with a bare `npx abx`** — that name on npm is
|
|
490
|
-
an unrelated squatted package, and `--no-install` does not make it safe. Ask before installing globally;
|
|
491
|
-
keep one invocation for the whole session. In the abx source repo: `pnpm abx <cmd>`.
|
|
492
|
-
|
|
493
|
-
`.env` is **secrets only** — `ABX_DEPLOYER_PK` (hot lane only; prefer `--sign` and no key at all),
|
|
494
|
-
`ABX_RPC_URLS`, `ABX_PUBLIC_BASE_URL`, backend secrets, and the one client credential grammar
|
|
495
|
-
`ABX_REMOTE_<NAME>_URL` + `ABX_REMOTE_<NAME>_TOKEN` (a node you run is the name `self`).
|
|
496
|
-
|
|
497
|
-
Install matrix, the npx-cache trap in full, every env var, RPC range caps and pruned log history →
|
|
498
|
-
[reference/setup.md](reference/setup.md).
|
|
499
|
-
|
|
500
|
-
**If indexing is slow, or a hosted resolver won't serve, ASK IT: `abx status <addr> [--remote <name>]`**
|
|
501
|
-
reports the lifecycle (`queued`→`backfilling`→`live`, plus `stale`/`failed` with a machine-readable
|
|
502
|
-
cause), so "still catching up" and "broken" stop looking alike. **Check the scan floor (is it scanning
|
|
503
|
-
from block 0?) before blaming the RPC tier** — that mis-diagnosis is a known trap.
|
|
504
|
-
|
|
505
|
-
## Reference files
|
|
506
|
-
|
|
507
|
-
Load one when the decision tree above sends you there — each is the depth behind a routing line here.
|
|
508
|
-
|
|
509
|
-
| File | Holds |
|
|
101
|
+
| One static work | `abx deploy` | ERC-721 1/1 |
|
|
102
|
+
| Folder of distinct static works | `abx deploy-series` | ERC-721 Series |
|
|
103
|
+
| Program or state-derived work | `abx deploy-code` | ERC-721 SeriesCode |
|
|
104
|
+
| Copies of any family | add `--copies <n|open>` | corresponding ERC-1155 edition |
|
|
105
|
+
|
|
106
|
+
Important boundaries:
|
|
107
|
+
|
|
108
|
+
- `deploy-code --copies` supports `--script`, dependencies, and Solidity image/attributes renderers.
|
|
109
|
+
It does not currently support `--code-dir`, `--image-base`, or `--resume`.
|
|
110
|
+
- `--onchain-image` works for static 721s and editions in hot or wallet-signing lanes. It cannot be
|
|
111
|
+
prepared as one cold `--unsigned` bundle because staged transactions depend on prior receipts.
|
|
112
|
+
- A code project may need no public host when its image/traits are computed by Solidity renderers.
|
|
113
|
+
A JavaScript program still needs a deliberate marketplace-image plan even when its animation is
|
|
114
|
+
chain-complete.
|
|
115
|
+
- Content size is not a fixed refusal. The CLI measures write cost and the active RPC's read reach.
|
|
116
|
+
State the measured reach; never generalize it to every marketplace endpoint.
|
|
117
|
+
|
|
118
|
+
## Treat public surfaces as an acceptance test
|
|
119
|
+
|
|
120
|
+
Before deploying, write down the promised value for each applicable row:
|
|
121
|
+
|
|
122
|
+
| Surface | Verify with |
|
|
510
123
|
|---|---|
|
|
511
|
-
|
|
|
512
|
-
|
|
|
513
|
-
|
|
|
514
|
-
|
|
|
515
|
-
|
|
|
516
|
-
|
|
|
517
|
-
|
|
|
518
|
-
|
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
-
|
|
532
|
-
|
|
533
|
-
-
|
|
534
|
-
|
|
535
|
-
|
|
124
|
+
| Contract identity and owner powers | `abx state <addr>` and the deploy readout |
|
|
125
|
+
| Token metadata | `abx tokenuri <addr> --token <id>` |
|
|
126
|
+
| Collection metadata | `abx contracturi <addr>` |
|
|
127
|
+
| Image | decoded metadata plus a successful fetch or on-chain field provenance |
|
|
128
|
+
| Animation/live view | the decoded `animation_url`, loaded with a real minted token |
|
|
129
|
+
| Marketplace traits | decoded `attributes`, not merely console output from the program |
|
|
130
|
+
| Parameters and values | `abx state` for schemas; `abx tokens --json` for token values |
|
|
131
|
+
| Attached artifacts | resolver metadata and `/data/<key>`; attachments are not enumerable in bare on-chain metadata |
|
|
132
|
+
| Byte integrity | `abx verify <addr>` |
|
|
133
|
+
| Hosted lifecycle | `abx status --remote <name> --watch` or provider status |
|
|
134
|
+
|
|
135
|
+
Do not call a launch complete because the transaction mined. Complete it when every promised surface
|
|
136
|
+
has the expected provenance and is retrievable through the path collectors will use.
|
|
137
|
+
|
|
138
|
+
## Confirm irreversible and shared-state choices
|
|
139
|
+
|
|
140
|
+
Before any real deploy, say these choices explicitly when relevant:
|
|
141
|
+
|
|
142
|
+
- The contract family and ERC-721 versus ERC-1155 edition shape cannot be changed later.
|
|
143
|
+
- Hooks and PostParams require a code-capable contract. A static image contract cannot gain them.
|
|
144
|
+
- `--burnable` and creator-token enrollment are deploy-time choices.
|
|
145
|
+
- A royalty cap only moves downward.
|
|
146
|
+
- Edition arithmetic is **number of ids × copies per id**. For one work with 100 copies, use one id;
|
|
147
|
+
do not accidentally create the code default's multiple-id space.
|
|
148
|
+
- An ERC-721 Series cap is lifetime minted ids: burning never reopens a slot. An ERC-1155 edition's
|
|
149
|
+
per-id cap is live supply: when burnable, a burned copy may be minted again.
|
|
150
|
+
- PostParams on an edition are stored per id, not per physical copy. A holder-authorized value is
|
|
151
|
+
shared by all holders of that id, and the last valid writer wins.
|
|
152
|
+
- Metadata, URI, script, dependency, hook, schema/value, and authority locks are distinct. Verify
|
|
153
|
+
first and lock last.
|
|
154
|
+
|
|
155
|
+
## Use capability classification, not optimism or refusal
|
|
156
|
+
|
|
157
|
+
Classify an unusual request as exactly one of:
|
|
158
|
+
|
|
159
|
+
1. **Native** — a documented CLI lane performs it.
|
|
160
|
+
2. **Extension** — a custom minter, configure/transfer/augment hook, field renderer, or seed source
|
|
161
|
+
performs it while the token remains a canonical factory clone.
|
|
162
|
+
3. **Unsupported or foreclosed** — the capability contract lists it, or the existing collection's
|
|
163
|
+
irreversible type/flags already exclude it.
|
|
164
|
+
4. **Unknown** — no route has been proven. Inspect code/help/contracts and report uncertainty; do not
|
|
165
|
+
turn absence from a no-list into a promise.
|
|
166
|
+
|
|
167
|
+
Custom Solidity is built and deployed outside `abx`; `abx scaffold-renderer` supplies a Foundry
|
|
168
|
+
starting point. Read [capabilities.md](reference/capabilities.md) before designing a custom mechanic.
|
|
169
|
+
|
|
170
|
+
## Load only the reference needed
|
|
171
|
+
|
|
172
|
+
- Environment, installation, signer lanes, and safe setup → [setup.md](reference/setup.md)
|
|
173
|
+
- Static projects, editions, placement, costs, and deploy confirmation → [deploy.md](reference/deploy.md)
|
|
174
|
+
- Programs, renderers, thumbnails, traits, PostParams, seeds, and dependencies → [code.md](reference/code.md)
|
|
175
|
+
- First-party hosted services, API-key signup, and core/provider feedback → [services.md](reference/services.md)
|
|
176
|
+
- Generic remotes, self-hosted resolvers/effects, storage, lifecycle, and migration → [hosting.md](reference/hosting.md)
|
|
177
|
+
- Existing-project reads, mint/sales, fields, transfers, authority, and locks → [operate.md](reference/operate.md)
|
|
178
|
+
- Failure classification, resume, RPC/storage/rendering faults, and retry discipline → [diagnose.md](reference/diagnose.md)
|
|
179
|
+
- Capability questions, extension seams, mechanics, and hard boundaries → [capabilities.md](reference/capabilities.md)
|
|
180
|
+
- ERC-721C/ERC-1155C enrollment and validator operations → [creator-token.md](reference/creator-token.md)
|
|
181
|
+
|
|
182
|
+
Read every reference applicable to the requested workflow before sending a real transaction. Do not
|
|
183
|
+
load unrelated references merely because they exist.
|