@artblocks/abx-cli 0.1.0-alpha.31 → 0.1.0-alpha.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +196 -0
  2. package/dist/capabilities.d.ts +94 -0
  3. package/dist/capabilities.d.ts.map +1 -0
  4. package/dist/capabilities.js +135 -0
  5. package/dist/capabilities.js.map +1 -0
  6. package/dist/commands/deploy.d.ts.map +1 -1
  7. package/dist/commands/deploy.js +25 -29
  8. package/dist/commands/deploy.js.map +1 -1
  9. package/dist/commands/scaffold.d.ts +9 -1
  10. package/dist/commands/scaffold.d.ts.map +1 -1
  11. package/dist/commands/scaffold.js +59 -12
  12. package/dist/commands/scaffold.js.map +1 -1
  13. package/dist/flag-allowlists.d.ts.map +1 -1
  14. package/dist/flag-allowlists.js +2 -1
  15. package/dist/flag-allowlists.js.map +1 -1
  16. package/dist/flags.d.ts +0 -4
  17. package/dist/flags.d.ts.map +1 -1
  18. package/dist/flags.js +0 -6
  19. package/dist/flags.js.map +1 -1
  20. package/dist/main.js +36 -20
  21. package/dist/main.js.map +1 -1
  22. package/dist/ownerops.d.ts +33 -26
  23. package/dist/ownerops.d.ts.map +1 -1
  24. package/dist/ownerops.js +85 -56
  25. package/dist/ownerops.js.map +1 -1
  26. package/dist/update-check.d.ts +6 -1
  27. package/dist/update-check.d.ts.map +1 -1
  28. package/dist/update-check.js +40 -17
  29. package/dist/update-check.js.map +1 -1
  30. package/package.json +6 -6
  31. package/skill/SKILL.md +164 -499
  32. package/skill/agents/openai.yaml +4 -0
  33. package/skill/reference/capabilities.md +187 -0
  34. package/skill/reference/code.md +210 -0
  35. package/skill/reference/creator-token.md +90 -95
  36. package/skill/reference/deploy.md +167 -0
  37. package/skill/reference/diagnose.md +165 -0
  38. package/skill/reference/hosting.md +144 -126
  39. package/skill/reference/operate.md +181 -0
  40. package/skill/reference/setup.md +105 -62
  41. package/skill/reference/code-projects.md +0 -368
  42. package/skill/reference/decisions.md +0 -174
  43. package/skill/reference/operating.md +0 -220
  44. package/skill/reference/troubleshooting.md +0 -65
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "ABX"
3
+ short_description: "Launch and operate ABX NFT projects"
4
+ default_prompt: "Use $abx to plan and safely execute this ABX project workflow."
@@ -0,0 +1,187 @@
1
+ # Capability questions and extension seams
2
+
3
+ Use this reference before answering whether ABX can support an unusual mechanic. The goal is neither
4
+ automatic optimism nor reflexive refusal; it is a proven route with explicit cost and limits.
5
+
6
+ ## Contents
7
+
8
+ - [Use the four-way classification](#use-the-four-way-classification)
9
+ - [Inspect the machine-readable contract](#inspect-the-machine-readable-contract)
10
+ - [Use canonical extension seams](#use-canonical-extension-seams)
11
+ - [Map mechanics to seams](#map-mechanics-to-seams)
12
+ - [Respect deploy-time prerequisites](#respect-deploy-time-prerequisites)
13
+ - [Know the supported boundary](#know-the-supported-boundary)
14
+
15
+ ## Use the four-way classification
16
+
17
+ Classify the request as one of:
18
+
19
+ 1. **Native** — a current CLI command/flag combination performs it directly.
20
+ 2. **Extension** — a custom minter, hook, field renderer, seed source, or transfer validator performs
21
+ it while the token remains a canonical factory clone.
22
+ 3. **Unsupported/foreclosed** — the capability contract lists it as unsupported, or the existing
23
+ contract's immutable type/options exclude the prerequisite.
24
+ 4. **Unknown** — no supported route has been demonstrated. Inspect help, implementation/contracts,
25
+ and state; report uncertainty if it remains unproven.
26
+
27
+ Never infer “unsupported” from the absence of a flag. Never infer “possible” merely because an item is
28
+ absent from a short no-list. A capability claim needs a native lane or an exact extension seam.
29
+
30
+ Give the creator the route, engineering required, authority model, gas/hosting/reach tradeoff,
31
+ irreversible prerequisites, and verification plan. “Possible” without those qualifiers is not useful.
32
+
33
+ ## Inspect the machine-readable contract
34
+
35
+ Run:
36
+
37
+ ```bash
38
+ abx capabilities --json
39
+ abx help <relevant-command>
40
+ ```
41
+
42
+ The capability contract reports native deployment lanes, EditionCode/static edition differences,
43
+ extension seams, deploy-time choices, and currently unsupported product boundaries. For an existing
44
+ collection, also run `abx state`; capability depends on the contract already deployed, not only on
45
+ what the newest CLI could deploy today.
46
+
47
+ Use a deploy command's `--dry-run --json` for a concrete plan. It is the source of truth for the
48
+ active chain, artifacts, signer, storage, addresses, transaction count, and measured warnings.
49
+
50
+ ## Use canonical extension seams
51
+
52
+ A custom mechanic normally lives beside a canonical token rather than replacing it.
53
+
54
+ | Seam | Wired with | Runs | Can veto? |
55
+ |---|---|---|---|
56
+ | Custom minter | `abx set-minter --minter 0x…` | before/calling issuance | it controls whether it calls mint |
57
+ | Configure hook | `abx set-param-hooks --configure 0x…` | before a governed parameter write persists | yes |
58
+ | Transfer hook | `abx set-param-hooks --transfer 0x…` | on mint, transfer, and burn | yes |
59
+ | Augment hook | `abx set-param-hooks --augment 0x…` | while token data is assembled | no; computes/adds/overrides data |
60
+ | Image/traits renderer | deploy-code renderer flags | while on-chain metadata fields render | a revert can break that read; design never-revert |
61
+ | Seed source | `abx set-seed-source` | future code-token mints | supplies mint-time seed input |
62
+ | Transfer validator | `--721c` then `set-transfer-validator` | standards-track transfer validation | yes, according to validator |
63
+
64
+ One external contract may implement several hook/minter roles. Test it against a real deployed clone,
65
+ not a mock that approximates ABX callbacks.
66
+
67
+ ABX scaffolds a Foundry renderer project but does not compile or deploy custom Solidity. The creator
68
+ or their contract engineer owns code review, deployment, verification, upgrade policy, and audits.
69
+
70
+ ### Custom minter
71
+
72
+ Series and editions can authorize one minter contract. Use it for pricing/allocation rules that do not
73
+ fit the shared fixed-price minter: auctions, allowlists, raffles, free claims, ERC-20 payment, escrowed
74
+ issuance, or other pre-mint logic. The minter eventually calls the token's canonical mint entry point.
75
+
76
+ A plain 1/1 has no Series minter seam. Decide whether the requested issuance model actually requires
77
+ a Series/edition before deploying.
78
+
79
+ ### Configure hook
80
+
81
+ The configure hook receives the proposed typed parameter write before it persists. Its revert rejects
82
+ the write. It can enforce monotonicity, one-time writes, cross-contract authorization, payload shape,
83
+ or size bounds. For blob-backed strings/bytes, validate length before reading large data and read the
84
+ provided data pointer using the documented SSTORE2 convention.
85
+
86
+ The previously stored value remains visible during validation, enabling comparisons. A rejected
87
+ write may still have paid for preparatory blob storage; front ends should simulate before asking for a
88
+ signature.
89
+
90
+ ### Transfer hook
91
+
92
+ The transfer hook runs for mints (`from == 0`), ordinary transfers, and burns (`to == 0`). Reverting
93
+ vetoes the entire operation. It can implement vesting, soulbinding, redemption, escrow settlement,
94
+ provenance counters, and lifecycle rules.
95
+
96
+ It cannot initiate a transfer; it only observes or rejects one. Burn-based mechanics require the
97
+ collection to have been deployed burnable. On editions, ids may have many holders, so shared per-id
98
+ state cannot model a single current owner.
99
+
100
+ ### Augment hook
101
+
102
+ The augment hook is a read-time view seam. It may read other contracts, an oracle, block state, or
103
+ stored params and return final token-data strings. Use it for live/derived state or computed data that
104
+ should not be stored.
105
+
106
+ Volatile augmentation makes the live view change without an event or stored write. A marketplace still
107
+ remains a snapshot until it is rendered again. If a custom Solidity field renderer needs augmented
108
+ state, it must read/call the relevant hook/state itself; field-renderer calls do not receive a prepared
109
+ token-data object.
110
+
111
+ ## Map mechanics to seams
112
+
113
+ | Request | Primary route | Prerequisites/limits |
114
+ |---|---|---|
115
+ | Auction, allowlist, raffle, free claim | custom minter | Series or edition mint authority |
116
+ | ERC-20 priced mint | custom minter | payment logic/audit outside ABX |
117
+ | Soulbound or timed transfer lock | transfer hook | deploy-code; hook also sees mint |
118
+ | Burn-to-redeem/combine | external controller/minter + burnable; optional transfer/augment hooks | ABX provides seams, not the atomic combine implementation |
119
+ | Escrow tied to token lifecycle | minter + transfer hook | external value-holding contract |
120
+ | Monotonic level/high-water mark | governed param + configure hook | schema and old-value comparison |
121
+ | Structured collector configuration | governed param + configure hook | typed payload and bounded size |
122
+ | Holder of another token may configure | schema address auth or configure hook | cross-contract read |
123
+ | Art reacts to oracle/block/other contract | augment hook or renderer direct read | disclose live/non-deterministic behavior |
124
+ | Timed reveal | augment hook or renderer logic | live view versus still refresh distinction |
125
+ | On-chain SVG and coherent traits | image + attributes renderers | never-revert Solidity implementations |
126
+ | Large raster stored on-chain | `--onchain-image` | measured write cost and endpoint-dependent read reach |
127
+ | Royalty-aware transfer validation | ERC-721C/ERC-1155C validator | opt-in at deploy; marketplace compatibility varies |
128
+
129
+ When several routes work, prefer the smallest authority surface. Use the stock fixed-price minter
130
+ instead of custom Solidity for an ordinary sale; use a schema without a hook when static authorization
131
+ is sufficient; use an on-chain renderer only when its durability/reach/cost trade is desired.
132
+
133
+ A transfer hook only observes or vetoes a burn; it does not initiate two burns or mint a replacement.
134
+ For combine mechanics, prove the controller's burn authorization and canonical mint call against a
135
+ real clone, make the transition atomic and replay-safe, and define pair/history storage. On ERC-721,
136
+ `--max` is a lifetime id cap and burns do not reopen slots, so reserve replacement-id headroom or use
137
+ a supply policy that does not require new ids. On a burnable edition, a burn frees live per-id supply,
138
+ but every copy of an id shares its id-level seed and PostParams.
139
+
140
+ ## Respect deploy-time prerequisites
141
+
142
+ Ask about mechanics before deployment. These decisions cannot be retrofitted:
143
+
144
+ - static versus code-capable contract type; hooks/PostParams require SeriesCode or EditionCode;
145
+ - ERC-721 versus ERC-1155 edition shape through `--copies`;
146
+ - burnability;
147
+ - ERC-721C/ERC-1155C enrollment.
148
+
149
+ Other choices may be mutable but become irreversible when locked: URI configuration, fields, script,
150
+ dependencies, hooks, governed values/schema, royalty ceiling, and owner authority. An existing project
151
+ may therefore be capable in protocol terms but foreclosed by its current type or locks. Say that
152
+ specifically instead of saying ABX as a whole cannot do it.
153
+
154
+ Use `abx predict` to break address cycles where an external controller needs the token address at its
155
+ own construction and the token must reference the controller during deployment. Confirm the guarded
156
+ salt/deployer and predicted address before deploying either side.
157
+
158
+ ## Know the supported boundary
159
+
160
+ The toolkit currently does not provide:
161
+
162
+ - mainnet deployment or unsupported-chain recipes;
163
+ - a secondary-market listing/order-book feature;
164
+ - Solidity compilation/deployment through `abx`;
165
+ - CLI replacement of a deployed code project's script;
166
+ - retrofitting a deploy-time contract type, burnability, token standard, or creator-token enrollment.
167
+
168
+ Do not recommend another protocol automatically when one of these applies. State the boundary and
169
+ stop unless the creator asks for alternatives.
170
+
171
+ Also distinguish unsupported tooling from possible external engineering. For example, ABX does not
172
+ compile a custom hook, but a hook is an intentional supported seam once independently built and
173
+ deployed. Conversely, “arbitrary Solidity exists” is not proof that every behavior is safe or
174
+ compatible: analyze callback timing, authority, reverts, reentrancy, shared edition state, gas, and
175
+ upgradeability.
176
+
177
+ Before finalizing a custom mechanic, document:
178
+
179
+ 1. canonical token family and deploy-time prerequisites;
180
+ 2. external contracts and their roles/owners/upgrade paths;
181
+ 3. callback inputs, state transitions, and every veto path;
182
+ 4. mint/transfer/burn behavior including editions;
183
+ 5. parameter schema and authorization;
184
+ 6. live versus settled/rendered state;
185
+ 7. locks and the exact guarantee they create;
186
+ 8. unit, fork, and end-to-end test plan;
187
+ 9. collector-facing disclosure of remaining powers.
@@ -0,0 +1,210 @@
1
+ # Code projects, renderers, and PostParams
2
+
3
+ Use this reference for `preview`, `inspect`, `deploy-code`, JavaScript/build projects, Solidity field
4
+ renderers, marketplace stills and traits, seeds, dependencies, parameters, and code-project locks.
5
+
6
+ ## Contents
7
+
8
+ - [Choose the runtime lane](#choose-the-runtime-lane)
9
+ - [Design every public surface](#design-every-public-surface)
10
+ - [Preview and inspect honestly](#preview-and-inspect-honestly)
11
+ - [Plan JavaScript projects](#plan-javascript-projects)
12
+ - [Plan Solidity field renderers](#plan-solidity-field-renderers)
13
+ - [Use PostParams and hooks](#use-postparams-and-hooks)
14
+ - [Handle seeds and dependencies](#handle-seeds-and-dependencies)
15
+ - [Verify and freeze](#verify-and-freeze)
16
+
17
+ ## Choose the runtime lane
18
+
19
+ `deploy-code` selects a code-capable canonical contract. It supports four useful input shapes:
20
+
21
+ | Shape | Core flags | Typical surfaces |
22
+ |---|---|---|
23
+ | On-chain JavaScript template | `--script <file>` | on-chain program; hosted or on-chain assembled live document |
24
+ | Build directory | `--code-dir <dir>` | uploaded application bundle; resolver/live view |
25
+ | Solidity-computed fields | `--image-renderer` and/or `--attributes-renderer` | on-chain SVG image and/or traits |
26
+ | Hybrid | script plus field renderers | program animation plus Solidity image/traits |
27
+
28
+ Without `--copies`, the contract is SeriesCode (ERC-721). With `--copies <n|open>`, it is EditionCode
29
+ (ERC-1155): N generated ids, each with multiple copies. EditionCode currently supports scripts,
30
+ dependencies, and field renderers. It does not support `--code-dir`, `--image-base`, or `--resume`.
31
+ Run `abx capabilities --json` immediately before planning.
32
+
33
+ For one generated work with 100 copies, use `--max 1 --copies 100`. Omitting `--max 1` leaves the
34
+ default multi-id space, producing multiple generated ids with 100 copies available for each id.
35
+
36
+ A creator who needs parameters or hooks must use a code-capable contract even if the output is a
37
+ static-looking SVG or image. This is a deploy-time type decision.
38
+
39
+ ## Design every public surface
40
+
41
+ A code project is not one URL. Decide each surface separately:
42
+
43
+ - **Program/animation** — the live JavaScript document or absence of one.
44
+ - **Marketplace image** — a rendered still, a deterministic image URL, an on-chain Solidity SVG, or
45
+ an explicit placeholder during development.
46
+ - **Marketplace traits** — renderer-computed JSON, resolver/effects output, or intentionally omitted.
47
+ - **PostParams** — canonical typed state on the token contract, consumed by the program/renderers.
48
+ - **Attachments** — named files served through a resolver's artifacts/data surface.
49
+
50
+ “The program is on-chain” does not prove that image and traits are on-chain. “The animation works”
51
+ does not prove a marketplace thumbnail exists. Write a surface matrix before deployment and verify
52
+ each row after minting.
53
+
54
+ ## Preview and inspect honestly
55
+
56
+ Use `abx preview` while authoring and `abx inspect` before choosing a deployment lane.
57
+
58
+ Preview uses the canonical runtime envelope, dependency order, and token-data shape with synthetic
59
+ inputs. It is a high-fidelity authoring preview, not an end-to-end deployment proof. It does not prove:
60
+
61
+ - that a chosen dependency resolves on the target chain;
62
+ - that the deployed generator or renderer fits an RPC's read allowance;
63
+ - that real minted seeds and PostParams are consumed correctly in every state;
64
+ - that marketplace metadata contains image and attributes;
65
+ - that a hosted resolver/effects/storage path is reachable.
66
+
67
+ Use `--shoot` for representative frames. Exercise more than the default seed and every user-facing
68
+ parameter. Then run `abx inspect` to analyze dependencies, deterministic seed usage, declared traits,
69
+ document size, and lane fit. Treat findings as evidence and the deploy dry run/testnet verification as
70
+ the final proof.
71
+
72
+ Avoid unseeded randomness, wall-clock dependence, environment-only assets, and network fetches when
73
+ claiming reproducibility. A live-data design is valid; label it live rather than deterministic.
74
+
75
+ ## Plan JavaScript projects
76
+
77
+ ### On-chain program, hosted resolution
78
+
79
+ Use `--script` with `--public-base-url` when a resolver should assemble the live document and expose
80
+ mutable metadata/render surfaces. The script remains on-chain; the public metadata path is HTTP.
81
+ This is normally the most interoperable lane for a sale where thumbnails must update continuously.
82
+
83
+ Run an effects service for derived stills and traits:
84
+
85
+ - `abx effects` runs locally and blocks; use it for development or a co-located operator.
86
+ - `abx deploy-effects --resolver-url <url>` scaffolds a continuously running service.
87
+ - `abx render <addr> [ids] --remote <resolver>` performs a one-shot/backfill render.
88
+
89
+ The renderer must store its bytes in a backend the resolver can retrieve. A hosted resolver cannot
90
+ read a laptop-local `fs` store. Managed providers may advertise managed rendering; confirm with
91
+ `abx remote <name>` rather than assuming it.
92
+
93
+ ### On-chain program and on-chain live document
94
+
95
+ Use `--script --onchain-uri` when the generator can assemble the animation document entirely from
96
+ on-chain program/dependency bytes. This can remove an always-on resolver for the live program.
97
+
98
+ Check the deploy dependency report and `abx verify` before calling it chain-complete: a registry
99
+ dependency may resolve through a CDN instead of on-chain bytes. Large assembled documents may exceed
100
+ some endpoints' `eth_call` allowance; report the measured reach, not “any RPC forever.”
101
+
102
+ For a JavaScript lane, the marketplace image remains a separate decision. With no resolver watcher,
103
+ a still published to a deterministic public `--image-base` is a manual/backfill surface: rerun render
104
+ after relevant parameter changes. An on-chain animation plus automatically updating off-chain still
105
+ requires an operator watching state.
106
+
107
+ EditionCode does not currently accept `--image-base`. Give it an on-chain image renderer, or run a
108
+ resolver/effects path (`deploy-effects` for continuous rendering; `render --remote` for one-shot
109
+ publication). Do not treat its on-chain animation as a marketplace still.
110
+
111
+ ### Build directory
112
+
113
+ Use `--code-dir` for an application bundle whose files are uploaded and addressed as a code artifact.
114
+ It requires external storage and public resolution. Inspect the built output, not only the source
115
+ tree, and verify that every referenced asset is included. `--code-dir` is not yet supported with
116
+ `--copies`.
117
+
118
+ ## Plan Solidity field renderers
119
+
120
+ `--image-renderer <address>` stores an `IAbxFieldRenderer` pointer for the metadata image field;
121
+ `--attributes-renderer <address>` does the same for traits. With `--onchain-uri`, the canonical
122
+ metadata renderer calls them on-chain. A renderer-only project needs no JavaScript program and no
123
+ effects runner.
124
+
125
+ Start with `abx scaffold-renderer`, then build, test, and deploy the Solidity project using Foundry.
126
+ ABX does not compile or deploy custom Solidity. A real deploy refuses a renderer address with no
127
+ code.
128
+
129
+ Enforce these invariants in renderer tests:
130
+
131
+ - `render(token, tokenId, field)` must not revert for unminted ids, missing params, boundary values,
132
+ unexpected callers, or retired schema state.
133
+ - Return the correct media type and valid complete content: SVG for image, JSON attributes array for
134
+ traits.
135
+ - Derive image and traits from the same seed/state model.
136
+ - Bound loops and output. Test realistic worst cases through an RPC call, not only local unit gas.
137
+ - Treat a renderer or hook address lock as a pointer lock. Use immutable deployments for stronger
138
+ permanence claims; an upgradeable proxy can change behavior behind a locked address.
139
+
140
+ Solidity image/attributes renderers work on both SeriesCode and EditionCode, including renderer-only
141
+ editions. They eliminate off-chain stills only for the fields they compute; a separate JavaScript
142
+ animation may still exist.
143
+
144
+ ## Use PostParams and hooks
145
+
146
+ PostParams are typed, schema-governed state stored on-chain. Use `--schema` at deployment or
147
+ `abx set-schema` later, then `abx configure-param` through the governed path. Inspect current type,
148
+ authorization, and lock grammar with command help instead of memorizing it.
149
+
150
+ Model parameters deliberately:
151
+
152
+ - Define a stable key and type; do not change a key's meaning across versions.
153
+ - Choose creator, token-owner/holder, or address authorization to match the actual state model.
154
+ - Validate input in the UI and again in a configure hook when the rule must be enforced on-chain.
155
+ - Treat string/bytes values as potentially large and price/limit them appropriately.
156
+ - Retire or weld a governed parameter only after the current value and defaults are verified.
157
+
158
+ ### Edition shared state
159
+
160
+ On EditionCode, parameters belong to an **id**, not an individual physical copy. If token id 3 has
161
+ 100 holders, they all read the same value for id 3. With holder authorization any holder may write it;
162
+ the last valid writer wins. This is good for communal state and wrong for “name my personal copy.”
163
+ Use one id per personalized work when per-holder state is required.
164
+
165
+ A holder-writable large string/bytes parameter can also expand the shared id's metadata beyond common
166
+ RPC read reach. State this before deployment and use schema validation/hooks to bound it when needed.
167
+
168
+ ### Hooks
169
+
170
+ SeriesCode and EditionCode expose three configurable hook addresses:
171
+
172
+ - configure hook: validates/vetoes governed writes before they persist;
173
+ - transfer hook: observes every mint, transfer, and burn and may veto the operation;
174
+ - augment hook: computes additional/overriding token data during reads.
175
+
176
+ Hooks are extension seams, not ordinary CLI flags. Build and deploy them outside ABX, wire them with
177
+ `abx set-param-hooks`, test against a real clone, and read [capabilities.md](capabilities.md). A
178
+ transfer-hook revert fails mints as well as secondary transfers. Freeze the addresses with
179
+ `abx lock-param-hooks` only after testing every lifecycle transition.
180
+
181
+ ## Handle seeds and dependencies
182
+
183
+ Seeds are generated at mint and drive reproducible variation. `abx inspect` identifies common seed
184
+ misuse, but test multiple real token-data fixtures. A custom seed source affects future mints and is
185
+ an external contract pointer; verify its code/interface and disclose who can change its behavior.
186
+
187
+ Dependencies are ordered; index 0 is the runtime. A `name@version` reference resolves through the
188
+ collection's dependency-registry pointer, while a `0x…` reference reads a data contract directly.
189
+ Registry availability is chain-specific. Read the deploy dependency report: a named dependency can
190
+ be valid yet served from a CDN, which means the document is not chain-complete.
191
+
192
+ `lock-dependencies` freezes the reference list and registry pointer, not necessarily the bytes a live
193
+ registry entry returns. Use immutable on-chain data contracts for a stronger frozen-dependency claim.
194
+
195
+ ## Verify and freeze
196
+
197
+ After deploying and minting representative ids:
198
+
199
+ 1. Read `abx state`, `abx tokens --json`, and `abx tokenuri`.
200
+ 2. Open the animation/live view using actual minted token data.
201
+ 3. Fetch the marketplace image and inspect `attributes` from token metadata.
202
+ 4. Run `abx verify` and resolve placeholder, chain-complete, dependency, or render warnings.
203
+ 5. Change every intended parameter through its authorized path; confirm still refresh behavior.
204
+ 6. Exercise mint, transfer, and burn paths if hooks or burnability are involved.
205
+ 7. Verify dependency and renderer addresses and whether their code is upgradeable.
206
+ 8. Lock only the surfaces the creator has explicitly chosen to freeze.
207
+
208
+ A fully frozen code-project posture may involve URI/field locks, `lock-script`,
209
+ `lock-dependencies`, `lock-param-hooks`, and governed parameter locks. Those locks cover different
210
+ state. Describe exactly what each freezes; never summarize them as “the output can never change.”
@@ -1,99 +1,94 @@
1
- # Royalty enforcement — opt-in creator token (ERC-721C / ERC-1155C)
2
-
3
- [← back to SKILL.md](../SKILL.md)
4
-
5
- **Read this ONLY because the creator brought it up** (royalty enforcement, "make OpenSea pay my
6
- royalties", ERC-721C/ERC-1155C, transfer restrictions, a transfer validator). If they didn't, this file
7
- has no business in the conversation: **plain ERC-721 (or plain ERC-1155, for an edition) is the default
8
- and the recommendation**, every deploy flow already does the right thing with zero `--721c` flags, and
9
- offering enforcement unprompted reads as a nudge toward a restricted asset. Never present `--721c` as a
10
- checklist item, a "should we also…", or a row in the deploy readout for a creator who never asked.
11
-
12
- **Same flag, both standards.** `--721c` is the one flag for creator-token enrollment everywhere — on a
13
- 721 deploy (`deploy`/`deploy-series`/`deploy-code` with no `--copies`) it enrolls **ERC-721C**; on the
14
- same commands with `--copies` (an edition) it enrolls **ERC-1155C** instead. Same validator registry,
15
- same recommended validator, same permanence rule, same UX only the ERC-165 discovery ids and the
16
- per-transfer call differ, both invisible to a creator (below).
17
-
18
- ## The stance (how to frame it when asked)
19
-
20
- - **Plain ERC-721 or plain ERC-1155 for an edition — is the more sovereign asset (the default)**:
21
- no third-party contract on the transfer path, tradeable everywhere, nothing anyone — creator
22
- included — can later switch off. ABX royalties are already on-chain via ERC-2981
23
- (`abx set-royalty`); marketplaces *choose* whether to honor them.
24
- - **721C/1155C is enforcement for creators who specifically want it**: transfers are checked by a
25
- validator contract, and sales that don't route through an authorized venue revert. It is a real
26
- trade-off, decided at deploy, **permanently** present it transparently, recommend it only when
27
- the creator's stated goal is enforcement, and get an explicit yes before enrolling.
28
- - **The honest market picture (2026) say it, don't oversell**: enforcement via 721C effectively
29
- means **OpenSea** plus venues on Limit Break's Payment Processor. OpenSea's own help docs say
30
- enforcement limits sales to those venues; Magic Eden's EVM marketplace shut down March 2026, and
31
- Blur never honored 721C. The trade: enforced royalties on OpenSea, in exchange for not trading on
32
- venues the validator doesn't authorize.
33
-
34
- ## What enrolling does (the facts to relay)
35
-
36
- - **Deploy-time, permanent, both directions.** A plain ABX token (721 or 1155) can **never** grow
37
- transfer restrictions later (that's a feature collectors of unenrolled tokens keep that promise
38
- forever), and an enrolled one never sheds the standard. No retrofit exists; the only path to
39
- enrollment for a live plain collection is a redeploy.
40
- - **Suspend un-enroll.** The owner can re-point the validator or set it to zero (enforcement off,
41
- token **stays** enrolled — the owner can re-enable any time). Collectors can see enrollment via
42
- ERC-165, suspended or not.
43
- - **Mints and burns are NEVER validated** — no validator policy can brick minting, the shared
44
- fixed-price minter (721 or edition), or a delegated minter.
45
- - **The recommended validator** (`--721c recommended`, or bare `--721c`) is OpenSea's
46
- StrictAuthorizedTransferSecurityRegistry the same registry, same address, for both standards.
47
- Under it, owner-initiated wallet-to-wallet transfers pass; non-authorized operators revert. One
48
- decision, done.
49
- - **On an edition, validation is per `(id, amount)`, not per token.** ERC-1155C's validator call
50
- carries the transferred amount and isn't a view (unlike 721C's), and a batch transfer loops one
51
- validator call per id — invisible to a creator, but the reason a large batch transfer on an
52
- enrolled edition costs more gas than an unenrolled one.
53
-
54
- ## Commands
1
+ # ERC-721C / ERC-1155C transfer validation
2
+
3
+ Use this reference only when the creator asks about creator-token standards, transfer validation,
4
+ royalty-enforcement compatibility, validator selection, or changing/suspending validation.
5
+
6
+ ## Separate three mechanisms
7
+
8
+ - **Royalties** declare a receiver and basis points through the token's royalty interface. They do
9
+ not force a marketplace to pay.
10
+ - **Creator-token enrollment** opts the collection into ERC-721C or ERC-1155C validation at deploy.
11
+ Transfers consult a validator selected by the owner.
12
+ - **ABX transfer hooks** are code-project extension callbacks and may implement arbitrary project
13
+ lifecycle rules. They are not creator-token validators.
14
+
15
+ These mechanisms can coexist and may each reject a transfer for a different reason. Diagnose the
16
+ actual contract state and revert path.
17
+
18
+ ## Enrollment is deploy-time
19
+
20
+ Pass `--721c recommended|0x…` on the selected deploy command to create the creator-token variant. The
21
+ same flag chooses the ERC-1155C twin when `--copies` selects an edition. Absence creates the ordinary
22
+ ERC-721/ERC-1155 family.
23
+
24
+ Enrollment cannot be added or removed after deployment. Ask before spending:
25
+
26
+ - Does the creator actually want standards-track transfer validation?
27
+ - Which validator and security policy should govern transfers?
28
+ - Is the intended marketplace/wallet flow compatible on the target chain today?
29
+ - Who may later change or suspend the validator?
30
+ - Is the stronger restriction worth the interoperability and owner-power tradeoff?
31
+
32
+ Do not default into enrollment merely because the creator set a royalty. Do not present it as a
33
+ guarantee of payment across all marketplaces.
34
+
35
+ ## Select and validate the validator
36
+
37
+ `recommended` resolves the toolkit's current recommended creator-fee validator for the active chain.
38
+ An explicit address must be a deployed validator contract that actually implements the expected
39
+ interface and rejects unsupported calls. A Safe, EOA, empty proxy, or permissive fallback is not an
40
+ enforcement policy even if it has code.
41
+
42
+ Let the CLI probe the address. Do not bypass a refusal with a raw transaction. For a custom validator,
43
+ review and test:
44
+
45
+ - transfer behavior for owner, approved operator, marketplace conduit, and ordinary recipient;
46
+ - mint and burn behavior where the standard invokes validation;
47
+ - upgrade/administration powers and who controls them;
48
+ - failure behavior when external registries are unavailable;
49
+ - ERC-721 versus ERC-1155 amount/batch semantics;
50
+ - interaction with an ABX transfer hook.
51
+
52
+ Marketplace allowlists, registry addresses, and supported flows change. Use current command output,
53
+ the validator's primary documentation, and a testnet transaction rather than a dated compatibility
54
+ table in this skill.
55
+
56
+ ## Operate an enrolled collection
57
+
58
+ Read current enrollment and validator state with `abx state`. Use:
55
59
 
56
60
  ```bash
57
- # Enroll at deploy — all three deploy commands take the flag (absent = plain, forever):
58
- abx deploy|deploy-series|deploy-code --721c [recommended|0x<validator>]
59
- # On an edition deploy (--copies), the SAME flag enrolls ERC-1155C instead — nothing else changes.
60
- abx deploy --copies <n|open> … --721c [recommended|0x<validator>]
61
-
62
- # Operate an ENROLLED collection (owner-only, any signing lane, --dry-run works):
63
- abx set-transfer-validator <addr> 0x<validator> # re-point enforcement
64
- abx set-transfer-validator <addr> none # suspend (stays enrolled)
65
- abx set-transfer-validator <addr> recommended # the chain's recommended validator
66
-
67
- abx state <addr> # shows a "721C validator" row ONLY when enrolled ("suspended" when zero);
68
- # an enrolled EDITION shows the same row labeled "1155C validator" — same
69
- # ERC-165 id + getter on both standards, so detection is identical
61
+ abx set-transfer-validator <address> recommended
62
+ abx set-transfer-validator <address> 0x...
63
+ abx set-transfer-validator <address> none
70
64
  ```
71
65
 
72
- Enrolling prints one plain statement of what enforcement means relay it, don't embellish. An
73
- un-enrolled deploy prints nothing about 721C/1155C.
74
-
75
- **One exception to "owner-only", worth knowing before you tell a collector they're stuck:** once a
76
- collection's `owner()` is the zero address (renounced), **anyone** may send the `none` (suspend) form,
77
- and **nobody** may ever arm a validator again. It's the release valve for an abandoned collection whose
78
- validator reverts every transfer — the only thing a stranger can do is make the tokens transferable, never
79
- the reverse. So a creator who plans to renounce should hear the trade: "renounced **and** still enforcing
80
- royalties forever" is not a state this protocol offers.
81
-
82
- ## Refusals the CLI enforces (don't fight them; relay the reason)
83
-
84
- - **`--721c none`/zero at deploy** refused: a zero validator never enrolls, and "enrolled but
85
- suspended" is not a deploy-time state. Plain (721 or 1155) is already the default; drop the flag.
86
- - **`--721c recommended` on a chain with no known validator** — refused, naming the chains that have
87
- one. Pass an explicit deployed validator address instead; never guess one.
88
- - **A validator address that isn't a validator** — refused before any gas at deploy AND at re-point
89
- (the contract reverts `InvalidTransferValidator()`); a mixed-case address must pass its EIP-55
90
- checksum. **Two shapes are refused, not one:** no code at all, and an address that answers *any*
91
- call successfully — a **Safe**, an uninitialised proxy, or a 7702-delegated EOA. `validateTransfer`
92
- returns nothing, so there's no decode to fail and such an address would enforce nothing while
93
- `getTransferValidator()` and ERC-165 both reported enforcement as ON. If a creator offers their Safe
94
- address, that's the refusal you'll get — relay it as "that's a wallet, not a validator", and point at
95
- `recommended`. A real deploy also refuses to enroll blind when the RPC can't answer (a dry-run
96
- defers it).
97
- - **`set-transfer-validator` on a plain, unenrolled collection** — refused up front (721 or 1155):
98
- enrollment is a deploy-time decision and this collection didn't enroll. Do not retry with different
99
- flags; if the creator truly needs enforcement, that's a redeploy conversation.
66
+ Run command help for current syntax and a dry run before writing. Setting `none` suspends the active
67
+ validator where supported; it does not convert the contract back to a plain non-C token. Enrollment
68
+ and the associated owner power remain part of the contract's permanent type.
69
+
70
+ Before changing the validator:
71
+
72
+ 1. Read the current validator, owner, royalty, minter, and transfer-hook state.
73
+ 2. Explain whether the change tightens, loosens, or suspends transfer policy.
74
+ 3. Test representative transfers using the intended marketplace/operator on testnet.
75
+ 4. Receive exact human confirmation.
76
+ 5. Execute once and re-read state.
77
+
78
+ If a transfer fails, do not clear the validator as a generic repair. Determine whether the failure
79
+ comes from the creator-token validator, an ABX transfer hook, token ownership/approval, pause/mint
80
+ rules, or the receiving contract. Changing enforcement is a policy decision, not troubleshooting.
81
+
82
+ ## Disclose owner powers precisely
83
+
84
+ Collectors should know:
85
+
86
+ - the collection is permanently enrolled in the creator-token variant;
87
+ - the current validator address and whether it is upgradeable;
88
+ - who can change or suspend that validator;
89
+ - whether a separate ABX transfer hook can veto transfers/mints;
90
+ - whether hook addresses are locked;
91
+ - the royalty rate, receiver, and permanent ceiling.
92
+
93
+ A locked ABX hook set does not lock the creator-token validator, and creator-token enrollment does not
94
+ freeze royalties. List each power separately.