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

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 (180) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/assets/renderer-scaffold/README.md +29 -11
  3. package/assets/renderer-scaffold/foundry.toml +1 -0
  4. package/assets/renderer-scaffold/remappings.txt +1 -1
  5. package/assets/renderer-scaffold/script/DeployHooks.s.sol +24 -0
  6. package/assets/renderer-scaffold/src/MyHooks.sol +20 -0
  7. package/assets/renderer-scaffold/src/MyRenderer.sol +4 -4
  8. package/assets/renderer-scaffold/src/MyTraits.sol +2 -2
  9. package/assets/renderer-scaffold/test/MyRenderer.t.sol +60 -3
  10. package/dist/bin.d.ts +26 -0
  11. package/dist/bin.d.ts.map +1 -0
  12. package/dist/bin.js +63 -0
  13. package/dist/bin.js.map +1 -0
  14. package/dist/capabilities.d.ts +94 -0
  15. package/dist/capabilities.d.ts.map +1 -0
  16. package/dist/capabilities.js +135 -0
  17. package/dist/capabilities.js.map +1 -0
  18. package/dist/commands/auth.d.ts +54 -0
  19. package/dist/commands/auth.d.ts.map +1 -0
  20. package/dist/commands/auth.js +447 -0
  21. package/dist/commands/auth.js.map +1 -0
  22. package/dist/commands/deploy.d.ts +242 -0
  23. package/dist/commands/deploy.d.ts.map +1 -0
  24. package/dist/commands/deploy.js +4763 -0
  25. package/dist/commands/deploy.js.map +1 -0
  26. package/dist/commands/feedback.d.ts +7 -0
  27. package/dist/commands/feedback.d.ts.map +1 -0
  28. package/dist/commands/feedback.js +147 -0
  29. package/dist/commands/feedback.js.map +1 -0
  30. package/dist/commands/project.d.ts +257 -0
  31. package/dist/commands/project.d.ts.map +1 -0
  32. package/dist/commands/project.js +1414 -0
  33. package/dist/commands/project.js.map +1 -0
  34. package/dist/commands/reads.d.ts +64 -0
  35. package/dist/commands/reads.d.ts.map +1 -0
  36. package/dist/commands/reads.js +701 -0
  37. package/dist/commands/reads.js.map +1 -0
  38. package/dist/commands/scaffold.d.ts +89 -0
  39. package/dist/commands/scaffold.d.ts.map +1 -0
  40. package/dist/commands/scaffold.js +733 -0
  41. package/dist/commands/scaffold.js.map +1 -0
  42. package/dist/commands/service.d.ts +67 -0
  43. package/dist/commands/service.d.ts.map +1 -0
  44. package/dist/commands/service.js +741 -0
  45. package/dist/commands/service.js.map +1 -0
  46. package/dist/commands/storage.d.ts +51 -0
  47. package/dist/commands/storage.d.ts.map +1 -0
  48. package/dist/commands/storage.js +370 -0
  49. package/dist/commands/storage.js.map +1 -0
  50. package/dist/commands/submit-app.d.ts +59 -0
  51. package/dist/commands/submit-app.d.ts.map +1 -0
  52. package/dist/commands/submit-app.js +513 -0
  53. package/dist/commands/submit-app.js.map +1 -0
  54. package/dist/config.d.ts +90 -2
  55. package/dist/config.d.ts.map +1 -1
  56. package/dist/config.js +284 -11
  57. package/dist/config.js.map +1 -1
  58. package/dist/conformance.d.ts +31 -0
  59. package/dist/conformance.d.ts.map +1 -0
  60. package/dist/conformance.js +390 -0
  61. package/dist/conformance.js.map +1 -0
  62. package/dist/contract-read-error.d.ts +5 -0
  63. package/dist/contract-read-error.d.ts.map +1 -0
  64. package/dist/contract-read-error.js +37 -0
  65. package/dist/contract-read-error.js.map +1 -0
  66. package/dist/deps.d.ts +6 -39
  67. package/dist/deps.d.ts.map +1 -1
  68. package/dist/deps.js +4 -68
  69. package/dist/deps.js.map +1 -1
  70. package/dist/errors.d.ts +20 -0
  71. package/dist/errors.d.ts.map +1 -0
  72. package/dist/errors.js +25 -0
  73. package/dist/errors.js.map +1 -0
  74. package/dist/flag-allowlists.d.ts +53 -0
  75. package/dist/flag-allowlists.d.ts.map +1 -0
  76. package/dist/flag-allowlists.js +180 -0
  77. package/dist/flag-allowlists.js.map +1 -0
  78. package/dist/flags.d.ts +41 -0
  79. package/dist/flags.d.ts.map +1 -1
  80. package/dist/flags.js +111 -1
  81. package/dist/flags.js.map +1 -1
  82. package/dist/jsonout.d.ts +37 -0
  83. package/dist/jsonout.d.ts.map +1 -0
  84. package/dist/jsonout.js +68 -0
  85. package/dist/jsonout.js.map +1 -0
  86. package/dist/kind.d.ts +57 -0
  87. package/dist/kind.d.ts.map +1 -0
  88. package/dist/kind.js +122 -0
  89. package/dist/kind.js.map +1 -0
  90. package/dist/main.js +747 -4838
  91. package/dist/main.js.map +1 -1
  92. package/dist/mintpage.d.ts +17 -2
  93. package/dist/mintpage.d.ts.map +1 -1
  94. package/dist/mintpage.js +241 -54
  95. package/dist/mintpage.js.map +1 -1
  96. package/dist/output.d.ts +179 -0
  97. package/dist/output.d.ts.map +1 -0
  98. package/dist/output.js +780 -0
  99. package/dist/output.js.map +1 -0
  100. package/dist/ownerops.d.ts +312 -57
  101. package/dist/ownerops.d.ts.map +1 -1
  102. package/dist/ownerops.js +1808 -357
  103. package/dist/ownerops.js.map +1 -1
  104. package/dist/preview.d.ts +23 -5
  105. package/dist/preview.d.ts.map +1 -1
  106. package/dist/preview.js +95 -43
  107. package/dist/preview.js.map +1 -1
  108. package/dist/prompt.d.ts +17 -0
  109. package/dist/prompt.d.ts.map +1 -0
  110. package/dist/prompt.js +19 -0
  111. package/dist/prompt.js.map +1 -0
  112. package/dist/provision.d.ts +3 -13
  113. package/dist/provision.d.ts.map +1 -1
  114. package/dist/provision.js +19 -21
  115. package/dist/provision.js.map +1 -1
  116. package/dist/remote.d.ts +157 -52
  117. package/dist/remote.d.ts.map +1 -1
  118. package/dist/remote.js +435 -46
  119. package/dist/remote.js.map +1 -1
  120. package/dist/riskgate.d.ts +62 -0
  121. package/dist/riskgate.d.ts.map +1 -0
  122. package/dist/riskgate.js +234 -0
  123. package/dist/riskgate.js.map +1 -0
  124. package/dist/scaffold.d.ts +12 -0
  125. package/dist/scaffold.d.ts.map +1 -0
  126. package/dist/scaffold.js +56 -0
  127. package/dist/scaffold.js.map +1 -0
  128. package/dist/schema.d.ts +36 -1
  129. package/dist/schema.d.ts.map +1 -1
  130. package/dist/schema.js +121 -26
  131. package/dist/schema.js.map +1 -1
  132. package/dist/script-chunks.d.ts +8 -0
  133. package/dist/script-chunks.d.ts.map +1 -0
  134. package/dist/script-chunks.js +35 -0
  135. package/dist/script-chunks.js.map +1 -0
  136. package/dist/served.d.ts +30 -0
  137. package/dist/served.d.ts.map +1 -0
  138. package/dist/served.js +112 -0
  139. package/dist/served.js.map +1 -0
  140. package/dist/signer.d.ts +13 -0
  141. package/dist/signer.d.ts.map +1 -1
  142. package/dist/signer.js +84 -15
  143. package/dist/signer.js.map +1 -1
  144. package/dist/update-check.d.ts +86 -5
  145. package/dist/update-check.d.ts.map +1 -1
  146. package/dist/update-check.js +161 -20
  147. package/dist/update-check.js.map +1 -1
  148. package/package.json +13 -12
  149. package/skill/SKILL.md +179 -347
  150. package/skill/agents/openai.yaml +4 -0
  151. package/skill/reference/capabilities.md +188 -0
  152. package/skill/reference/code.md +211 -0
  153. package/skill/reference/creator-token.md +94 -0
  154. package/skill/reference/deploy.md +167 -0
  155. package/skill/reference/diagnose.md +165 -0
  156. package/skill/reference/hosting.md +161 -94
  157. package/skill/reference/operate.md +181 -0
  158. package/skill/reference/services.md +121 -0
  159. package/skill/reference/setup.md +140 -36
  160. package/assets/renderer-scaffold/src/interfaces/IAbxFieldRenderer.sol +0 -32
  161. package/assets/renderer-scaffold/src/interfaces/IAbxParams.sol +0 -26
  162. package/dist/inspect.d.ts +0 -48
  163. package/dist/inspect.d.ts.map +0 -1
  164. package/dist/inspect.js +0 -184
  165. package/dist/inspect.js.map +0 -1
  166. package/dist/migrate.d.ts +0 -65
  167. package/dist/migrate.d.ts.map +0 -1
  168. package/dist/migrate.js +0 -180
  169. package/dist/migrate.js.map +0 -1
  170. package/dist/onchain-uri.d.ts +0 -97
  171. package/dist/onchain-uri.d.ts.map +0 -1
  172. package/dist/onchain-uri.js +0 -243
  173. package/dist/onchain-uri.js.map +0 -1
  174. package/dist/upload.d.ts +0 -28
  175. package/dist/upload.d.ts.map +0 -1
  176. package/dist/upload.js +0 -41
  177. package/dist/upload.js.map +0 -1
  178. package/skill/reference/code-projects.md +0 -246
  179. package/skill/reference/operating.md +0 -116
  180. package/skill/reference/troubleshooting.md +0 -28
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "ABX"
3
+ short_description: "Launch, host, and operate ABX NFT projects"
4
+ default_prompt: "Use $abx to plan and safely execute this ABX project workflow."
@@ -0,0 +1,188 @@
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
+ | One program, each token carries its own data | `deploy-code --script` + `<key>:Bytes:Creator` | mint, then set the creator payload with `configure-param --file`; no on-chain size budget on the param itself |
128
+ | Royalty-aware transfer validation | ERC-721C/ERC-1155C validator | opt-in at deploy; marketplace compatibility varies |
129
+
130
+ When several routes work, prefer the smallest authority surface. Use the stock fixed-price minter
131
+ instead of custom Solidity for an ordinary sale; use a schema without a hook when static authorization
132
+ is sufficient; use an on-chain renderer only when its durability/reach/cost trade is desired.
133
+
134
+ A transfer hook only observes or vetoes a burn; it does not initiate two burns or mint a replacement.
135
+ For combine mechanics, prove the controller's burn authorization and canonical mint call against a
136
+ real clone, make the transition atomic and replay-safe, and define pair/history storage. On ERC-721,
137
+ `--max` is a lifetime id cap and burns do not reopen slots, so reserve replacement-id headroom or use
138
+ a supply policy that does not require new ids. On a burnable edition, a burn frees live per-id supply,
139
+ but every copy of an id shares its id-level seed and PostParams.
140
+
141
+ ## Respect deploy-time prerequisites
142
+
143
+ Ask about mechanics before deployment. These decisions cannot be retrofitted:
144
+
145
+ - static versus code-capable contract type; hooks/PostParams require SeriesCode or EditionCode;
146
+ - ERC-721 versus ERC-1155 edition shape through `--copies`;
147
+ - burnability;
148
+ - ERC-721C/ERC-1155C enrollment.
149
+
150
+ Other choices may be mutable but become irreversible when locked: URI configuration, fields, script,
151
+ dependencies, hooks, governed values/schema, royalty ceiling, and owner authority. An existing project
152
+ may therefore be capable in protocol terms but foreclosed by its current type or locks. Say that
153
+ specifically instead of saying ABX as a whole cannot do it.
154
+
155
+ Use `abx predict` to break address cycles where an external controller needs the token address at its
156
+ own construction and the token must reference the controller during deployment. Confirm the guarded
157
+ salt/deployer and predicted address before deploying either side.
158
+
159
+ ## Know the supported boundary
160
+
161
+ The toolkit currently does not provide:
162
+
163
+ - mainnet deployment or unsupported-chain recipes;
164
+ - a secondary-market listing/order-book feature;
165
+ - Solidity compilation/deployment through `abx`;
166
+ - CLI replacement of a deployed code project's script;
167
+ - retrofitting a deploy-time contract type, burnability, token standard, or creator-token enrollment.
168
+
169
+ Do not recommend another protocol automatically when one of these applies. State the boundary and
170
+ stop unless the creator asks for alternatives.
171
+
172
+ Also distinguish unsupported tooling from possible external engineering. For example, ABX does not
173
+ compile a custom hook, but a hook is an intentional supported seam once independently built and
174
+ deployed. Conversely, “arbitrary Solidity exists” is not proof that every behavior is safe or
175
+ compatible: analyze callback timing, authority, reverts, reentrancy, shared edition state, gas, and
176
+ upgradeability.
177
+
178
+ Before finalizing a custom mechanic, document:
179
+
180
+ 1. canonical token family and deploy-time prerequisites;
181
+ 2. external contracts and their roles/owners/upgrade paths;
182
+ 3. callback inputs, state transitions, and every veto path;
183
+ 4. mint/transfer/burn behavior including editions;
184
+ 5. parameter schema and authorization;
185
+ 6. live versus settled/rendered state;
186
+ 7. locks and the exact guarantee they create;
187
+ 8. unit, fork, and end-to-end test plan;
188
+ 9. collector-facing disclosure of remaining powers.
@@ -0,0 +1,211 @@
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
+ | Shared program + per-token payload | `--script` + `--schema <key>:Bytes:Creator` | one chunked engine; after mint, set each token's `Bytes` PostParam with `configure-param --file` |
25
+ | Build directory | `--code-dir <dir>` | uploaded application bundle; resolver/live view |
26
+ | Solidity-computed fields | `--image-renderer` and/or `--attributes-renderer` | on-chain SVG image and/or traits |
27
+ | Hybrid | script plus field renderers | program animation plus Solidity image/traits |
28
+
29
+ Without `--copies`, the contract is SeriesCode (ERC-721). With `--copies <n|open>`, it is EditionCode
30
+ (ERC-1155): N generated ids, each with multiple copies. EditionCode currently supports scripts,
31
+ dependencies, and field renderers. It does not support `--code-dir`, `--image-base`, or `--resume`.
32
+ Run `abx capabilities --json` immediately before planning.
33
+
34
+ For one generated work with 100 copies, use `--max 1 --copies 100`. Omitting `--max 1` leaves the
35
+ default multi-id space, producing multiple generated ids with 100 copies available for each id.
36
+
37
+ A creator who needs parameters or hooks must use a code-capable contract even if the output is a
38
+ static-looking SVG or image. This is a deploy-time type decision.
39
+
40
+ ## Design every public surface
41
+
42
+ A code project is not one URL. Decide each surface separately:
43
+
44
+ - **Program/animation** — the live JavaScript document or absence of one.
45
+ - **Marketplace image** — a rendered still, a deterministic image URL, an on-chain Solidity SVG, or
46
+ an explicit placeholder during development.
47
+ - **Marketplace traits** — renderer-computed JSON, resolver/effects output, or intentionally omitted.
48
+ - **PostParams** — canonical typed state on the token contract, consumed by the program/renderers.
49
+ - **Attachments** — named files served through a resolver's artifacts/data surface.
50
+
51
+ “The program is on-chain” does not prove that image and traits are on-chain. “The animation works”
52
+ does not prove a marketplace thumbnail exists. Write a surface matrix before deployment and verify
53
+ each row after minting.
54
+
55
+ ## Preview and inspect honestly
56
+
57
+ Use `abx preview` while authoring and `abx inspect` before choosing a deployment lane.
58
+
59
+ Preview uses the canonical runtime envelope, dependency order, and token-data shape with synthetic
60
+ inputs. It is a high-fidelity authoring preview, not an end-to-end deployment proof. It does not prove:
61
+
62
+ - that a chosen dependency resolves on the target chain;
63
+ - that the deployed generator or renderer fits an RPC's read allowance;
64
+ - that real minted seeds and PostParams are consumed correctly in every state;
65
+ - that marketplace metadata contains image and attributes;
66
+ - that a hosted resolver/effects/storage path is reachable.
67
+
68
+ Use `--shoot` for representative frames. Exercise more than the default seed and every user-facing
69
+ parameter. Then run `abx inspect` to analyze dependencies, deterministic seed usage, declared traits,
70
+ document size, and lane fit. Treat findings as evidence and the deploy dry run/testnet verification as
71
+ the final proof.
72
+
73
+ Avoid unseeded randomness, wall-clock dependence, environment-only assets, and network fetches when
74
+ claiming reproducibility. A live-data design is valid; label it live rather than deterministic.
75
+
76
+ ## Plan JavaScript projects
77
+
78
+ ### On-chain program, hosted resolution
79
+
80
+ Use `--script` with `--public-base-url` when a resolver should assemble the live document and expose
81
+ mutable metadata/render surfaces. The script remains on-chain; the public metadata path is HTTP.
82
+ This is normally the most interoperable lane for a sale where thumbnails must update continuously.
83
+
84
+ Run an effects service for derived stills and traits:
85
+
86
+ - `abx effects` runs locally and blocks; use it for development or a co-located operator.
87
+ - `abx deploy-effects --resolver-url <url>` scaffolds a continuously running service.
88
+ - `abx render <addr> [ids] --remote <resolver>` performs a one-shot/backfill render.
89
+
90
+ The renderer must store its bytes in a backend the resolver can retrieve. A hosted resolver cannot
91
+ read a laptop-local `fs` store. Managed providers may advertise managed rendering; confirm with
92
+ `abx remote <name>` rather than assuming it.
93
+
94
+ ### On-chain program and on-chain live document
95
+
96
+ Use `--script --onchain-uri` when the generator can assemble the animation document entirely from
97
+ on-chain program/dependency bytes. This can remove an always-on resolver for the live program.
98
+
99
+ Check the deploy dependency report and `abx verify` before calling it chain-complete: a registry
100
+ dependency may resolve through a CDN instead of on-chain bytes. Large assembled documents may exceed
101
+ some endpoints' `eth_call` allowance; report the measured reach, not “any RPC forever.”
102
+
103
+ For a JavaScript lane, the marketplace image remains a separate decision. With no resolver watcher,
104
+ a still published to a deterministic public `--image-base` is a manual/backfill surface: rerun render
105
+ after relevant parameter changes. An on-chain animation plus automatically updating off-chain still
106
+ requires an operator watching state.
107
+
108
+ EditionCode does not currently accept `--image-base`. Give it an on-chain image renderer, or run a
109
+ resolver/effects path (`deploy-effects` for continuous rendering; `render --remote` for one-shot
110
+ publication). Do not treat its on-chain animation as a marketplace still.
111
+
112
+ ### Build directory
113
+
114
+ Use `--code-dir` for an application bundle whose files are uploaded and addressed as a code artifact.
115
+ It requires external storage and public resolution. Inspect the built output, not only the source
116
+ tree, and verify that every referenced asset is included. `--code-dir` is not yet supported with
117
+ `--copies`.
118
+
119
+ ## Plan Solidity field renderers
120
+
121
+ `--image-renderer <address>` stores an `IAbxFieldRenderer` pointer for the metadata image field;
122
+ `--attributes-renderer <address>` does the same for traits. With `--onchain-uri`, the canonical
123
+ metadata renderer calls them on-chain. A renderer-only project needs no JavaScript program and no
124
+ effects runner.
125
+
126
+ Start with `abx scaffold-renderer`, then build, test, and deploy the Solidity project using Foundry.
127
+ ABX does not compile or deploy custom Solidity. A real deploy refuses a renderer address with no
128
+ code.
129
+
130
+ Enforce these invariants in renderer tests:
131
+
132
+ - `render(token, tokenId, field)` must not revert for unminted ids, missing params, boundary values,
133
+ unexpected callers, or retired schema state.
134
+ - Return the correct media type and valid complete content: SVG for image, JSON attributes array for
135
+ traits.
136
+ - Derive image and traits from the same seed/state model.
137
+ - Bound loops and output. Test realistic worst cases through an RPC call, not only local unit gas.
138
+ - Treat a renderer or hook address lock as a pointer lock. Use immutable deployments for stronger
139
+ permanence claims; an upgradeable proxy can change behavior behind a locked address.
140
+
141
+ Solidity image/attributes renderers work on both SeriesCode and EditionCode, including renderer-only
142
+ editions. They eliminate off-chain stills only for the fields they compute; a separate JavaScript
143
+ animation may still exist.
144
+
145
+ ## Use PostParams and hooks
146
+
147
+ PostParams are typed, schema-governed state stored on-chain. Use `--schema` at deployment or
148
+ `abx set-schema` later, then `abx configure-param` through the governed path. Inspect current type,
149
+ authorization, and lock grammar with command help instead of memorizing it.
150
+
151
+ Model parameters deliberately:
152
+
153
+ - Define a stable key and type; do not change a key's meaning across versions.
154
+ - Choose creator, token-owner/holder, or address authorization to match the actual state model.
155
+ - Validate input in the UI and again in a configure hook when the rule must be enforced on-chain.
156
+ - Treat string/bytes values as potentially large and price/limit them appropriately.
157
+ - Retire or weld a governed parameter only after the current value and defaults are verified.
158
+
159
+ ### Edition shared state
160
+
161
+ On EditionCode, parameters belong to an **id**, not an individual physical copy. If token id 3 has
162
+ 100 holders, they all read the same value for id 3. With holder authorization any holder may write it;
163
+ the last valid writer wins. This is good for communal state and wrong for “name my personal copy.”
164
+ Use one id per personalized work when per-holder state is required.
165
+
166
+ A holder-writable large string/bytes parameter can also expand the shared id's metadata beyond common
167
+ RPC read reach. State this before deployment and use schema validation/hooks to bound it when needed.
168
+
169
+ ### Hooks
170
+
171
+ SeriesCode and EditionCode expose three configurable hook addresses:
172
+
173
+ - configure hook: validates/vetoes governed writes before they persist;
174
+ - transfer hook: observes every mint, transfer, and burn and may veto the operation;
175
+ - augment hook: computes additional/overriding token data during reads.
176
+
177
+ Hooks are extension seams, not ordinary CLI flags. Build and deploy them outside ABX, wire them with
178
+ `abx set-param-hooks`, test against a real clone, and read [capabilities.md](capabilities.md). A
179
+ transfer-hook revert fails mints as well as secondary transfers. Freeze the addresses with
180
+ `abx lock-param-hooks` only after testing every lifecycle transition.
181
+
182
+ ## Handle seeds and dependencies
183
+
184
+ Seeds are generated at mint and drive reproducible variation. `abx inspect` identifies common seed
185
+ misuse, but test multiple real token-data fixtures. A custom seed source affects future mints and is
186
+ an external contract pointer; verify its code/interface and disclose who can change its behavior.
187
+
188
+ Dependencies are ordered; index 0 is the runtime. A `name@version` reference resolves through the
189
+ collection's dependency-registry pointer, while a `0x…` reference reads a data contract directly.
190
+ Registry availability is chain-specific. Read the deploy dependency report: a named dependency can
191
+ be valid yet served from a CDN, which means the document is not chain-complete.
192
+
193
+ `lock-dependencies` freezes the reference list and registry pointer, not necessarily the bytes a live
194
+ registry entry returns. Use immutable on-chain data contracts for a stronger frozen-dependency claim.
195
+
196
+ ## Verify and freeze
197
+
198
+ After deploying and minting representative ids:
199
+
200
+ 1. Read `abx state`, `abx tokens --json`, and `abx tokenuri`.
201
+ 2. Open the animation/live view using actual minted token data.
202
+ 3. Fetch the marketplace image and inspect `attributes` from token metadata.
203
+ 4. Run `abx verify` and resolve placeholder, chain-complete, dependency, or render warnings.
204
+ 5. Change every intended parameter through its authorized path; confirm still refresh behavior.
205
+ 6. Exercise mint, transfer, and burn paths if hooks or burnability are involved.
206
+ 7. Verify dependency and renderer addresses and whether their code is upgradeable.
207
+ 8. Lock only the surfaces the creator has explicitly chosen to freeze.
208
+
209
+ A fully frozen code-project posture may involve URI/field locks, `lock-script`,
210
+ `lock-dependencies`, `lock-param-hooks`, and governed parameter locks. Those locks cover different
211
+ state. Describe exactly what each freezes; never summarize them as “the output can never change.”
@@ -0,0 +1,94 @@
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:
59
+
60
+ ```bash
61
+ abx set-transfer-validator <address> recommended
62
+ abx set-transfer-validator <address> 0x...
63
+ abx set-transfer-validator <address> none
64
+ ```
65
+
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.
@@ -0,0 +1,167 @@
1
+ # Static projects and editions
2
+
3
+ Use this reference for `abx deploy`, `abx deploy-series`, their `--copies` editions, content
4
+ placement, identity, mint timing, and deploy confirmation.
5
+
6
+ ## Contents
7
+
8
+ - [Choose the contract shape](#choose-the-contract-shape)
9
+ - [Choose custody and resolution](#choose-custody-and-resolution)
10
+ - [Understand on-chain reach](#understand-on-chain-reach)
11
+ - [Prepare identity and economics](#prepare-identity-and-economics)
12
+ - [Plan editions correctly](#plan-editions-correctly)
13
+ - [Plan, execute, and verify](#plan-execute-and-verify)
14
+
15
+ ## Choose the contract shape
16
+
17
+ Start from the artifact and supply model, not from a preferred storage backend:
18
+
19
+ | Creator intent | Command | Contract family |
20
+ |---|---|---|
21
+ | One static work, one token | `abx deploy` | OneOfOneImage, ERC-721 |
22
+ | Folder of N distinct works | `abx deploy-series` | SeriesImage, ERC-721 |
23
+ | One work with multiple copies | `abx deploy --copies <n|open>` | OneOfOneEdition, ERC-1155 |
24
+ | N distinct works, copies of each | `abx deploy-series --copies <n|open>` | EditionImage, ERC-1155 |
25
+
26
+ If the work needs collector parameters, state-derived output, or configure/transfer/augment hooks,
27
+ use `deploy-code` even when the visible artifact looks static. Contract family is fixed at deploy;
28
+ static contracts cannot gain code extensions later.
29
+
30
+ Run `abx capabilities --json` and the chosen command's help before constructing the plan. The
31
+ capability contract, help, flag validation, and dry-run output are current product truth.
32
+
33
+ ## Choose custody and resolution
34
+
35
+ Treat custody, resolution, and mutability as separate decisions.
36
+
37
+ ### Bytes and metadata fully on-chain
38
+
39
+ Use `--onchain-image [--compress fastlz]` for static media bytes behind the on-chain metadata
40
+ renderer. It implies on-chain resolution and requires no host or storage provider. It works for 721
41
+ static projects and their editions in hot or wallet lanes. Cold `--unsigned` staging is refused.
42
+
43
+ Use `fastlz` for on-chain-readable compression. Gzip is an off-chain decode format and cannot be
44
+ substituted for an on-chain-rendered field. Bare `--onchain-uri` may inline very small SVG/text
45
+ content, but the reader/chunk path is normally more economical for real files; trust the dry-run's
46
+ measured plan rather than a memorized byte threshold.
47
+
48
+ ### Media external, metadata JSON on-chain, no resolver
49
+
50
+ Use `--onchain-uri --backend arweave|ipfs|cloud`. The CLI uploads media, bakes its public locator into
51
+ on-chain JSON, and does not require an ABX resolver. This is often the simplest durable path for
52
+ static collections:
53
+
54
+ - Arweave provides pay-once permanent custody through the configured uploader.
55
+ - IPFS requires maintained pinning and a public gateway; a local kubo gateway is development-only.
56
+ - Cloud requires an authenticated upload endpoint and a distinct public read base/CDN URL.
57
+
58
+ For uniform-extension Series folders, the CLI can use a shared directory/template representation
59
+ rather than one collection field per item. Let the dry run report the chosen representation.
60
+
61
+ This path can still carry on-chain description, attributes, authorship, license, and other reserved
62
+ fields. “External image” does not mean “off-chain metadata.”
63
+
64
+ ### Hosted resolver
65
+
66
+ Use `--public-base-url https://…` when metadata must remain operationally editable, when arbitrary
67
+ attached files need enumeration, when large on-chain reads need an HTTP front, or when a JavaScript
68
+ project needs hosted live/render surfaces. The URL must be public and stable; the CLI refuses
69
+ localhost for a real deploy.
70
+
71
+ A resolver may be managed by a configured remote provider or run by the creator. That choice does
72
+ not change the token contract. Read [hosting.md](hosting.md) before promising who operates the
73
+ service, how effects are rendered, or how migration works.
74
+
75
+ ### Local filesystem
76
+
77
+ Use `fs` only for local preview and disposable testnet iteration. A token whose public metadata
78
+ depends on a laptop path is not launched. Move the bytes or run a public resolver before presenting
79
+ the collection as complete.
80
+
81
+ ## Understand on-chain reach
82
+
83
+ There is no fixed supported byte ceiling for `--onchain-image`. Writes are chunked; cost grows with
84
+ the stored bytes. Resolution rebuilds the document in one `eth_call`; success depends on the read-gas
85
+ allowance of the endpoint making that call.
86
+
87
+ The CLI estimates write cost, estimates read cost, probes the active endpoint, and reports whether the
88
+ document fits that endpoint's measured allowance. Preserve these distinctions:
89
+
90
+ - A successful write proves storage, not universal display reach.
91
+ - A successful read through the creator's RPC says nothing certain about a marketplace's RPC.
92
+ - Compression can reduce write cost without reducing the gas needed to reconstruct uncompressed
93
+ output.
94
+ - The limit is per token, not the aggregate size of the collection.
95
+ - If direct self-resolution has insufficient reach, the bytes remain on-chain; a resolver can read
96
+ them through a capable endpoint and serve ordinary HTTP after `set-renderer --off`.
97
+
98
+ Never call a size impossible merely because it is expensive or endpoint-dependent. State the dry
99
+ run's cost and reach, offer external permanent custody or resolver-fronted access as alternatives,
100
+ and let the creator decide.
101
+
102
+ ## Prepare identity and economics
103
+
104
+ Propose and confirm a real name and symbol. The CLI may infer placeholders for a dry run but refuses
105
+ to silently bake a generic identity on a real send unless the user explicitly accepts it. A folder
106
+ named `images` is not a collection title.
107
+
108
+ Confirm these fields as applicable:
109
+
110
+ - description and external URL;
111
+ - creator, display notes, creator links, and license;
112
+ - initial royalty and royalty receiver;
113
+ - royalty cap, which is a permanent ceiling that may only decrease;
114
+ - burnability, fixed at deploy;
115
+ - ERC-721C/ERC-1155C enrollment, fixed at deploy;
116
+ - owner/deployer and primary-sale payee;
117
+ - whether metadata fields begin on-chain or in the resolver projection.
118
+
119
+ The owner may change ordinary royalties within the cap. Lowering the cap is irreversible. Do not
120
+ equate declared royalties with enforced creator fees; transfer-validator enrollment is a separate
121
+ creator-token decision described in [creator-token.md](creator-token.md).
122
+
123
+ ### Mint timing
124
+
125
+ Choose among minting during deployment, pre-warming with no mint, or preminting part of a Series.
126
+ Pre-warming is valuable when a resolver or render pipeline must be ready before marketplaces observe
127
+ the first token. For hosted paths, register/index and verify the predicted or deployed contract before
128
+ minting; then mint and refresh.
129
+
130
+ The shared fixed-price minter is normally configured after deployment: set price/allocation, set the
131
+ minter/payee, and unpause when ready. Deploy-time minter flags pre-authorize a known stack; they are not
132
+ a substitute for confirming the actual sale configuration.
133
+
134
+ ## Plan editions correctly
135
+
136
+ `--copies` changes both the token standard and the ownership model.
137
+
138
+ - `deploy --copies 100` means one id with a cap of 100 copies.
139
+ - `deploy-series --copies 100` means every folder item is its own id with up to 100 copies.
140
+ - `open` means an uncapped edition at deployment; later cap operations only lower numeric caps.
141
+ - `--mint-amount` is copies per preminted id; `--mint-count`/`--mint-all` select which ids premint.
142
+ - Transfers require an amount and explicit source because an id can have many holders.
143
+
144
+ For any edition, say “N ids × M copies per id” and the maximum aggregate supply before spending.
145
+
146
+ Static edition custody is symmetric with the 721 lanes: on-chain bytes, on-chain JSON with external
147
+ media, inline SVG, and hosted resolution are available. `--onchain-image` uses hot or wallet signing,
148
+ not cold unsigned staging.
149
+
150
+ Do not import code-edition limits into static editions or vice versa. Use the capability output.
151
+
152
+ ## Plan, execute, and verify
153
+
154
+ 1. Run `abx doctor`, storage/remote checks needed by the selected path, and command help.
155
+ 2. Run the exact command with `--dry-run --json` and a known `--for` address when needed.
156
+ 3. Read back contract family, id/copy arithmetic, custody, resolution, public URLs, signer lane,
157
+ initial mint, transaction count, cost/reach warnings, and irreversible options.
158
+ 4. Receive explicit confirmation.
159
+ 5. Run the same normalized command without `--dry-run`; do not start another write using the EOA.
160
+ 6. Capture the chain, contract address, deploy block, owner, storage locators, and resolver/remote.
161
+ 7. Verify `state`, `contracturi`, `tokenuri`, public image retrieval, and byte integrity.
162
+ 8. If pre-warmed, register/serve first, mint second, verify the token-specific surfaces, then refresh.
163
+ 9. Apply locks only after production-path verification.
164
+
165
+ For Arweave or other eventually available storage, an accepted upload is not yet a retrievable asset.
166
+ Use `abx storage status <locator> --json` and wait for `ready`; do not upload again simply because a
167
+ gateway is still propagating.