@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
@@ -22,7 +22,8 @@
22
22
  export interface MintPageOptions {
23
23
  /** The ABX token (collection) contract to sell. */
24
24
  token: string;
25
- /** The shared fixed-price minter for the chain. */
25
+ /** The shared fixed-price minter for the chain — the 721 `AbxFixedPriceMinter`, or (when
26
+ * {@link isEdition}) its 1155 sibling `AbxFixedPriceMinter1155`. */
26
27
  minter: string;
27
28
  chainId: number;
28
29
  chainName: string;
@@ -32,6 +33,18 @@ export interface MintPageOptions {
32
33
  collectionName: string;
33
34
  /** Block explorer base (e.g. https://sepolia.etherscan.io), for a "view contract" link. */
34
35
  explorer?: string;
36
+ /**
37
+ * The target is an ERC-1155 edition (OneOfOneEdition/EditionImage/EditionCode) rather than a 721
38
+ * Series/SeriesCode — sales are keyed `(token, id)`, so the generated page takes a token-id +
39
+ * quantity input and pays `price × quantity`, instead of the 721 page's one project-wide sale.
40
+ *
41
+ * v1 scope (deliberately minimal — the 721 page's gallery/pagination is NOT ported): a purchase
42
+ * of "copies" of one id doesn't have the 721 page's "one owner per token" gallery to show, and
43
+ * building a per-id browsing UI is real design work this pass didn't take on. The purchase
44
+ * controls (price, sold/allocation, per-id supply/cap, paused) are fully live from chain either
45
+ * way — just without a tile grid underneath them.
46
+ */
47
+ isEdition?: boolean;
35
48
  }
36
49
  export interface MintPageArtifact {
37
50
  files: Array<{
@@ -40,7 +53,9 @@ export interface MintPageArtifact {
40
53
  }>;
41
54
  steps: string[];
42
55
  }
43
- /** Public, keyless RPCs safe to embed in a public site. Extend as chains are added. */
56
+ /** Public, keyless RPCs safe to embed in a public site. Extend as chains are added.
57
+ * base-sepolia is the toolkit's DEFAULT chain — its absence here meant every default-chain
58
+ * deploy needed a manual --rpc just to scaffold its own mint page (integrator-reported). */
44
59
  export declare const PUBLIC_RPC: Record<number, string>;
45
60
  export declare function mintPageArtifact(o: MintPageOptions): MintPageArtifact;
46
61
  //# sourceMappingURL=mintpage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mintpage.d.ts","sourceRoot":"","sources":["../src/mintpage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,WAAW,eAAe;IAC9B,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,6FAA6F;IAC7F,MAAM,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,cAAc,EAAE,MAAM,CAAC;IACvB,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,KAAK,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC;IAC9C,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,uFAAuF;AACvF,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAG7C,CAAC;AAubF,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,eAAe,GAAG,gBAAgB,CA0BrE"}
1
+ {"version":3,"file":"mintpage.d.ts","sourceRoot":"","sources":["../src/mintpage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,MAAM,WAAW,eAAe;IAC9B,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd;yEACqE;IACrE,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,6FAA6F;IAC7F,MAAM,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,cAAc,EAAE,MAAM,CAAC;IACvB,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,KAAK,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC;IAC9C,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;6FAE6F;AAC7F,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAK7C,CAAC;AA8mBF,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,eAAe,GAAG,gBAAgB,CA2BrE"}
package/dist/mintpage.js CHANGED
@@ -19,10 +19,15 @@
19
19
  * Pure module: returns the artifact files + the exact next-step commands. The CLI writes the files and
20
20
  * prints the steps; `vercel` / `next dev` run in the creator's own account/machine — they own that step.
21
21
  */
22
- /** Public, keyless RPCs safe to embed in a public site. Extend as chains are added. */
22
+ import { readSdkVersion } from './update-check.js';
23
+ /** Public, keyless RPCs safe to embed in a public site. Extend as chains are added.
24
+ * base-sepolia is the toolkit's DEFAULT chain — its absence here meant every default-chain
25
+ * deploy needed a manual --rpc just to scaffold its own mint page (integrator-reported). */
23
26
  export const PUBLIC_RPC = {
24
27
  1: 'https://ethereum-rpc.publicnode.com',
25
28
  11155111: 'https://ethereum-sepolia-rpc.publicnode.com',
29
+ 8453: 'https://mainnet.base.org',
30
+ 84532: 'https://sepolia.base.org',
26
31
  };
27
32
  const slug = (s) => s
28
33
  .toLowerCase()
@@ -43,6 +48,11 @@ function packageJson(o) {
43
48
  react: '^19.0.0',
44
49
  'react-dom': '^19.0.0',
45
50
  viem: '^2.21.0',
51
+ // Pinned to THIS CLI's own version, caret-ranged — the CLI and sdk version-bump together in
52
+ // this repo's changesets flow, so "the version that scaffolded this app" is exactly the
53
+ // floor that's guaranteed to have makePublicClient/readSaleConfig/the `/abi` subpath (this
54
+ // refactor). INVARIANT: an sdk older than that will be missing one of those exports.
55
+ '@artblocks/abx-sdk': '^' + readSdkVersion(),
46
56
  },
47
57
  devDependencies: {
48
58
  typescript: '^5.6.0',
@@ -130,55 +140,63 @@ export const chain = defineChain({
130
140
  rpcUrls: {default: {http: [RPC_URL]}},
131
141
  });
132
142
  `;
133
- const LIB_ABI = `// Minimal ABIs only what the mint page reads/writes.
134
- export const minterAbi = [
135
- {
136
- type: 'function',
137
- name: 'sales',
138
- stateMutability: 'view',
139
- inputs: [{name: 'token', type: 'address'}],
140
- outputs: [
141
- {name: 'configured', type: 'bool'},
142
- {name: 'paymentToken', type: 'address'},
143
- {name: 'price', type: 'uint256'},
144
- {name: 'allocation', type: 'uint256'},
145
- {name: 'sold', type: 'uint256'},
146
- ],
147
- },
148
- {type: 'function', name: 'purchase', stateMutability: 'payable', inputs: [{name: 'token', type: 'address'}], outputs: [{name: 'tokenId', type: 'uint256'}]},
149
- {type: 'function', name: 'purchaseTo', stateMutability: 'payable', inputs: [{name: 'token', type: 'address'}, {name: 'to', type: 'address'}], outputs: [{name: 'tokenId', type: 'uint256'}]},
150
- ] as const;
143
+ const LIB_ABI = `// Minter + token ABIs, sourced from the shared SDK instead of hand-typed here — one definition
144
+ // that tracks the deployed contracts (the ABX repo's 'pnpm sync-abis' regenerates it from the
145
+ // contracts themselves), so this file can never drift the way a hand-copied fragment can.
146
+ //
147
+ // name / totalSupply / maxInvocations / paused / tokenURI are identical fragments on every ABX
148
+ // Series contract type (Image or Code) — importing both and spreading is harmless (duplicate
149
+ // fragments, byte-identical shape) and keeps this working whichever Series type backs your
150
+ // collection, without this app needing to know which one it is.
151
+ // (A rename re-export — 'export {x as y} from …' of a subpath import tripped up Next's bundler
152
+ // here; a plain import + local const assignment is the form that survives the production build.)
153
+ import {abxFixedPriceMinterAbi, seriesImageAbi, seriesCodeAbi} from '@artblocks/abx-sdk/abi';
151
154
 
152
- export const tokenAbi = [
153
- {type: 'function', name: 'name', stateMutability: 'view', inputs: [], outputs: [{type: 'string'}]},
154
- {type: 'function', name: 'totalSupply', stateMutability: 'view', inputs: [], outputs: [{type: 'uint256'}]},
155
- {type: 'function', name: 'maxInvocations', stateMutability: 'view', inputs: [], outputs: [{type: 'uint256'}]},
156
- {type: 'function', name: 'paused', stateMutability: 'view', inputs: [], outputs: [{type: 'bool'}]},
157
- {type: 'function', name: 'tokenURI', stateMutability: 'view', inputs: [{name: 'id', type: 'uint256'}], outputs: [{type: 'string'}]},
158
- ] as const;
155
+ export const minterAbi = abxFixedPriceMinterAbi;
156
+ export const tokenAbi = [...seriesImageAbi, ...seriesCodeAbi] as const;
157
+ `;
158
+ // The edition twin of LIB_ABI same reasoning (one SDK-sourced definition, never hand-typed), the
159
+ // 1155 sale singleton + the narrowest-common-superset edition token ABI (covers OneOfOneEdition/
160
+ // EditionImage/EditionCode see the SDK's ops.ts for why one ABI serves the whole family).
161
+ const LIB_ABI_EDITION = `// Minter + token ABIs for an EDITION target (ERC-1155 copies) — see the non-edition lib/abi.ts's
162
+ // twin for the "why sourced from the SDK, never hand-typed" note.
163
+ import {abxFixedPriceMinter1155Abi, oneOfOneEditionAbi} from '@artblocks/abx-sdk/abi';
164
+
165
+ export const minterAbi = abxFixedPriceMinter1155Abi;
166
+ export const tokenAbi = oneOfOneEditionAbi;
159
167
  `;
160
168
  const LIB_META = `// Read a token's image + name from tokenURI(id), directly from chain. Handles data: URIs
161
169
  // (on-chain tokens) and http/ipfs/ar locators (off-chain custody). No backend.
162
- import {createPublicClient, http} from 'viem';
163
- import {chain} from './chain';
164
- import {TOKEN} from './config';
170
+ //
171
+ // The read client is the SDK's browser-safe makePublicClient, given an EXPLICIT rpcUrls list —
172
+ // never env resolution (there is no server .env in a static site, and the SDK's own
173
+ // ABX_RPC_URLS/ABX_CHAIN conventions would silently no-op in a browser bundle anyway; an explicit
174
+ // override short-circuits that lookup entirely). One URL behaves exactly like a plain http()
175
+ // transport; paste a comma-separated NEXT_PUBLIC_RPC_URL to get the same fallback-transport
176
+ // failover the CLI/indexer get. Its attached chain metadata is the SDK's own default and is
177
+ // informational only for these plain reads — the WALLET's chain (used for the mint tx) is the one
178
+ // built in ./chain from your real NEXT_PUBLIC_CHAIN_ID/NAME, unaffected by this.
179
+ //
180
+ // Gateway + data: URI parsing go through the SAME sdk helpers the CLI/indexer use
181
+ // (gatewayUrlFor/resolveGatewayBase, parseDataUri) instead of a hand-rolled 'ipfs://'-slicing body —
182
+ // one implementation of "how to read a locator" instead of this app quietly re-deriving its own.
183
+ import {makePublicClient, gatewayUrlFor, resolveGatewayBase, parseDataUri} from '@artblocks/abx-sdk';
184
+ import {RPC_URL, TOKEN} from './config';
165
185
  import {tokenAbi} from './abi';
166
186
 
167
- export const publicClient = createPublicClient({chain, transport: http()});
187
+ export const publicClient = makePublicClient({rpcUrls: RPC_URL.split(',').map((u) => u.trim()).filter(Boolean)});
168
188
 
169
189
  export function toGateway(u: string): string {
170
190
  if (!u) return '';
171
- if (u.startsWith('ipfs://')) return 'https://ipfs.io/ipfs/' + u.slice(7);
172
- if (u.startsWith('ar://')) return 'https://arweave.net/' + u.slice(5);
191
+ if (u.startsWith('ipfs://')) return gatewayUrlFor('ipfs', u.slice(7), resolveGatewayBase('ipfs'));
192
+ if (u.startsWith('ar://')) return gatewayUrlFor('arweave', u.slice(5), resolveGatewayBase('arweave'));
173
193
  return u;
174
194
  }
175
195
 
176
196
  async function fetchJson(uri: string): Promise<any> {
177
- if (uri.startsWith('data:')) {
178
- const comma = uri.indexOf(',');
179
- const header = uri.slice(5, comma);
180
- const body = uri.slice(comma + 1);
181
- const text = header.includes('base64') ? atob(body) : decodeURIComponent(body);
197
+ const parsed = parseDataUri(uri);
198
+ if (parsed) {
199
+ const text = parsed.base64 ? atob(parsed.body) : decodeURIComponent(parsed.body);
182
200
  return JSON.parse(text);
183
201
  }
184
202
  const res = await fetch(toGateway(uri));
@@ -252,22 +270,15 @@ const APP_MINT_CLIENT = `'use client';
252
270
  import {useCallback, useEffect, useState} from 'react';
253
271
  import {createWalletClient, custom, formatEther} from 'viem';
254
272
  import {chain} from '../lib/chain';
273
+ import {readSaleConfig, type SaleConfig} from '@artblocks/abx-sdk';
255
274
  import {CHAIN_ID, CHAIN_NAME, COLLECTION_NAME, EXPLORER, MINTER, PAGE_SIZE, TOKEN} from '../lib/config';
256
275
  import {minterAbi, tokenAbi} from '../lib/abi';
257
276
  import {publicClient, readTokenMeta, type TokenMeta} from '../lib/meta';
258
277
 
259
278
  const ZERO = '0x0000000000000000000000000000000000000000';
260
279
 
261
- interface Sale {
262
- configured: boolean;
263
- paymentToken: string;
264
- price: bigint;
265
- allocation: bigint;
266
- sold: bigint;
267
- }
268
-
269
280
  export default function Mint() {
270
- const [sale, setSale] = useState<Sale | null>(null);
281
+ const [sale, setSale] = useState<SaleConfig | null>(null);
271
282
  const [supply, setSupply] = useState(0);
272
283
  const [maxInv, setMaxInv] = useState(0);
273
284
  const [paused, setPaused] = useState(false);
@@ -278,8 +289,7 @@ export default function Mint() {
278
289
  const [msg, setMsg] = useState('');
279
290
 
280
291
  const refresh = useCallback(async () => {
281
- const s = (await publicClient.readContract({address: MINTER, abi: minterAbi, functionName: 'sales', args: [TOKEN]})) as any;
282
- setSale({configured: s[0], paymentToken: s[1], price: s[2], allocation: s[3], sold: s[4]});
292
+ setSale(await readSaleConfig(publicClient, MINTER, TOKEN));
283
293
  const [ts, mx, pz] = await Promise.all([
284
294
  publicClient.readContract({address: TOKEN, abi: tokenAbi, functionName: 'totalSupply'}),
285
295
  publicClient.readContract({address: TOKEN, abi: tokenAbi, functionName: 'maxInvocations'}),
@@ -336,14 +346,28 @@ export default function Mint() {
336
346
  setMsg('');
337
347
  try {
338
348
  const wallet = createWalletClient({account: account as any, chain, transport: custom(eth)});
339
- const hash = await wallet.writeContract({address: MINTER, abi: minterAbi, functionName: 'purchase', args: [TOKEN], value: sale.price, account: account as any, chain});
349
+ // The buyer's terms guard: the tx commits to the terms this page is SHOWING
350
+ // (paymentToken + price). If the owner re-configures the sale in between, the minter reverts
351
+ // SaleTermsChanged instead of charging the new price / pulling a different token.
352
+ const hash = await wallet.writeContract({address: MINTER, abi: minterAbi, functionName: 'purchase', args: [TOKEN, sale.paymentToken, sale.price], value: sale.price, account: account as any, chain});
340
353
  setMsg('Minting… tx ' + hash.slice(0, 10) + '…');
341
354
  await publicClient.waitForTransactionReceipt({hash});
342
355
  setMsg('Minted! ✦');
343
356
  setPage(0);
344
357
  await refresh();
345
358
  } catch (e: any) {
346
- setMsg(e && e.shortMessage ? e.shortMessage : String(e && e.message ? e.message : e));
359
+ const text = e && e.shortMessage ? e.shortMessage : String(e && e.message ? e.message : e);
360
+ // Refresh on EITHER stale-terms signal. SaleTermsChanged is the guard firing (the price rose,
361
+ // or the payment token changed). WrongPayment is the ETH lane's exact-value check firing, which
362
+ // is what a price CUT looks like: the guard is a ceiling so it passes, then the exact-value
363
+ // equality fails because V1 has no refunds. Matching only the first left this page wedged after
364
+ // a price cut — every retry failed until the buyer reloaded.
365
+ if (/SaleTermsChanged|WrongPayment/.test(String(e && (e.message || e)))) {
366
+ await refresh().catch(() => {});
367
+ setMsg('The sale terms changed — nothing was charged. The price above is refreshed; review it and mint again.');
368
+ } else {
369
+ setMsg(text);
370
+ }
347
371
  } finally {
348
372
  setBusy(false);
349
373
  }
@@ -406,6 +430,166 @@ export default function Mint() {
406
430
  );
407
431
  }
408
432
  `;
433
+ // The edition twin of APP_MINT_CLIENT — a token-id + quantity purchase against the shared 1155
434
+ // minter (sales are keyed (token, id)), price × quantity computed live. No gallery/pagination (see
435
+ // MintPageOptions.isEdition's own scope note) — the purchase controls are the whole page.
436
+ const APP_MINT_CLIENT_EDITION = `'use client';
437
+ import {useCallback, useEffect, useState} from 'react';
438
+ import {createWalletClient, custom, formatEther} from 'viem';
439
+ import {chain} from '../lib/chain';
440
+ import {readSaleConfig1155, type SaleConfig1155} from '@artblocks/abx-sdk';
441
+ import {CHAIN_ID, CHAIN_NAME, COLLECTION_NAME, EXPLORER, MINTER, TOKEN} from '../lib/config';
442
+ import {minterAbi, tokenAbi} from '../lib/abi';
443
+ import {publicClient} from '../lib/meta';
444
+
445
+ const ZERO = '0x0000000000000000000000000000000000000000';
446
+
447
+ export default function Mint() {
448
+ const [tokenId, setTokenId] = useState(0);
449
+ const [quantity, setQuantity] = useState(1);
450
+ const [sale, setSale] = useState<SaleConfig1155 | null>(null);
451
+ const [supply, setSupply] = useState(0);
452
+ const [maxSupply, setMaxSupply] = useState(0);
453
+ const [paused, setPaused] = useState(false);
454
+ const [account, setAccount] = useState<string>('');
455
+ const [busy, setBusy] = useState(false);
456
+ const [msg, setMsg] = useState('');
457
+
458
+ const refresh = useCallback(async (id: number) => {
459
+ const [s, ts, ms, pz] = await Promise.all([
460
+ readSaleConfig1155(publicClient, MINTER, TOKEN, BigInt(id)),
461
+ publicClient.readContract({address: TOKEN, abi: tokenAbi, functionName: 'totalSupply', args: [BigInt(id)]}),
462
+ publicClient.readContract({address: TOKEN, abi: tokenAbi, functionName: 'maxSupply', args: [BigInt(id)]}),
463
+ publicClient.readContract({address: TOKEN, abi: tokenAbi, functionName: 'paused'}),
464
+ ]);
465
+ setSale(s);
466
+ setSupply(Number(ts));
467
+ setMaxSupply(Number(ms));
468
+ setPaused(Boolean(pz));
469
+ }, []);
470
+
471
+ useEffect(() => {
472
+ refresh(tokenId).catch((e) => setMsg(String(e)));
473
+ }, [tokenId, refresh]);
474
+
475
+ async function connect() {
476
+ const eth = (window as any).ethereum;
477
+ if (!eth) {
478
+ setMsg('No injected wallet found — install MetaMask (or another browser wallet).');
479
+ return;
480
+ }
481
+ const accts = (await eth.request({method: 'eth_requestAccounts'})) as string[];
482
+ setAccount(accts[0] || '');
483
+ try {
484
+ await eth.request({method: 'wallet_switchEthereumChain', params: [{chainId: '0x' + CHAIN_ID.toString(16)}]});
485
+ } catch (e) {
486
+ /* user can switch manually; the mint call will surface a wrong-network error */
487
+ }
488
+ }
489
+
490
+ async function mint() {
491
+ if (!sale) return;
492
+ const eth = (window as any).ethereum;
493
+ if (!eth || !account) return connect();
494
+ setBusy(true);
495
+ setMsg('');
496
+ try {
497
+ const wallet = createWalletClient({account: account as any, chain, transport: custom(eth)});
498
+ const value = sale.price * BigInt(quantity);
499
+ // The buyer's terms guard, edition-shaped: the tx commits to the terms this page is SHOWING
500
+ // and bounds the TOTAL (price × quantity, the same number attached as ETH), so an owner who
501
+ // re-configures the sale mid-click gets SaleTermsChanged instead of charging more.
502
+ const hash = await wallet.writeContract({
503
+ address: MINTER,
504
+ abi: minterAbi,
505
+ functionName: 'purchase',
506
+ args: [TOKEN, BigInt(tokenId), BigInt(quantity), sale.paymentToken, value],
507
+ value,
508
+ account: account as any,
509
+ chain,
510
+ });
511
+ setMsg('Minting… tx ' + hash.slice(0, 10) + '…');
512
+ await publicClient.waitForTransactionReceipt({hash});
513
+ setMsg('Minted! ✦');
514
+ await refresh(tokenId);
515
+ } catch (e: any) {
516
+ const text = e && e.shortMessage ? e.shortMessage : String(e && e.message ? e.message : e);
517
+ // Both stale-terms signals — see the single-token lane above for why WrongPayment belongs here.
518
+ if (/SaleTermsChanged|WrongPayment/.test(String(e && (e.message || e)))) {
519
+ await refresh(tokenId).catch(() => {});
520
+ setMsg('The sale terms changed — nothing was charged. The price above is refreshed; review it and mint again.');
521
+ } else {
522
+ setMsg(text);
523
+ }
524
+ } finally {
525
+ setBusy(false);
526
+ }
527
+ }
528
+
529
+ const isEth = !sale || sale.paymentToken === ZERO;
530
+ const remaining = maxSupply > 0 ? Math.max(0, maxSupply - supply) : null;
531
+ const soldOut = !!sale && (sale.sold >= sale.allocation || (remaining !== null && remaining <= 0));
532
+ const canMint = !!sale && sale.configured && !paused && !soldOut && isEth && !busy && quantity > 0;
533
+ const totalPrice = sale ? sale.price * BigInt(quantity) : 0n;
534
+
535
+ return (
536
+ <main className="wrap">
537
+ <div className="row" style={{marginBottom: 20}}>
538
+ <div>
539
+ <h1>{COLLECTION_NAME}</h1>
540
+ <div className="muted">
541
+ {EXPLORER ? <a href={EXPLORER + '/address/' + TOKEN} target="_blank" rel="noreferrer">contract ↗</a> : TOKEN}
542
+ {' · '}
543
+ {CHAIN_NAME}
544
+ {' · edition (ERC-1155)'}
545
+ </div>
546
+ </div>
547
+ {account ? <span className="muted">{account.slice(0, 6) + '…' + account.slice(-4)}</span> : <button className="ghost" onClick={connect}>Connect wallet</button>}
548
+ </div>
549
+
550
+ <div className="card">
551
+ <div className="row" style={{marginBottom: 14}}>
552
+ <label className="muted">
553
+ Token ID
554
+ <input
555
+ type="number"
556
+ min={0}
557
+ value={tokenId}
558
+ onChange={(e) => setTokenId(Math.max(0, Number(e.target.value) || 0))}
559
+ style={{marginLeft: 8, width: 90}}
560
+ />
561
+ </label>
562
+ <label className="muted">
563
+ Quantity
564
+ <input
565
+ type="number"
566
+ min={1}
567
+ value={quantity}
568
+ onChange={(e) => setQuantity(Math.max(1, Number(e.target.value) || 1))}
569
+ style={{marginLeft: 8, width: 90}}
570
+ />
571
+ </label>
572
+ </div>
573
+ <div className="row">
574
+ <div className="stat">
575
+ {sale ? <>Price <b>{isEth ? formatEther(sale.price) + ' ETH' : sale.price.toString() + ' units'}</b> / copy</> : 'Loading…'}
576
+ {sale ? <> &nbsp;·&nbsp; Total <b>{isEth ? formatEther(totalPrice) + ' ETH' : totalPrice.toString() + ' units'}</b></> : null}
577
+ {sale ? <> &nbsp;·&nbsp; Sold <b>{sale.sold.toString()}/{sale.allocation.toString()}</b></> : null}
578
+ {maxSupply > 0 ? <> &nbsp;·&nbsp; Copies <b>{supply}/{maxSupply}</b></> : <> &nbsp;·&nbsp; Copies <b>{supply}</b> (open)</>}
579
+ {' '}
580
+ <span className={'pill ' + (paused || soldOut ? 'closed' : 'open')}>{soldOut ? 'sold out' : paused ? 'paused' : 'open'}</span>
581
+ </div>
582
+ <button onClick={mint} disabled={!canMint}>
583
+ {busy ? 'Minting…' : soldOut ? 'Sold out' : paused ? 'Paused' : !isEth ? 'ERC-20 — see README' : account ? 'Mint' : 'Connect & mint'}
584
+ </button>
585
+ </div>
586
+ {msg ? <div className="muted" style={{marginTop: 12}}>{msg}</div> : null}
587
+ {sale && !sale.configured ? <div className="muted" style={{marginTop: 12}}>No sale configured yet for id #{tokenId}.</div> : null}
588
+ </div>
589
+ </main>
590
+ );
591
+ }
592
+ `;
409
593
  function readme(o) {
410
594
  return ('# ' +
411
595
  o.collectionName +
@@ -427,11 +611,14 @@ function readme(o) {
427
611
  '- **Design** — it is plain React + one `app/globals.css`. Restyle freely; ask your agent for a bespoke layout per drop.\n' +
428
612
  '- **Multi-wallet** — V1 uses the injected wallet (`window.ethereum`) with zero config. For WalletConnect/Coinbase/etc., swap in [RainbowKit](https://rainbowkit.com) + wagmi (needs a WalletConnect projectId).\n' +
429
613
  '- **ERC-20 sales** — the mint button handles ETH. For an ERC-20-priced sale, add an `approve(minter, price)` step before `purchase` (see `lib/abi.ts`).\n' +
614
+ '- **Sale terms are part of the purchase** — `purchase` takes the payment token and a max price, and the page passes the terms it just read from chain. If the owner re-prices mid-click the mint reverts `SaleTermsChanged` (nothing is charged) and the page tells the buyer to review the new price. Keep that: an unbounded price is how a re-priced sale could reach a buyer\'s ERC-20 allowance.\n' +
430
615
  '- **RPC** — `NEXT_PUBLIC_RPC_URL` is a public endpoint (may rate-limit). Use your own **keyless** endpoint if you like; never put a secret-keyed URL in a `NEXT_PUBLIC_` var — it ships to the browser.\n' +
431
- '- **Gallery** — shows minted tokens newest-first, ' +
432
- 'paginated. It reads `tokenURI(id)`; on-chain collections resolve with no backend, off-chain ones need their resolver/gateway reachable.\n');
616
+ (o.isEdition
617
+ ? '- **Gallery** — NOT included for an edition (v1 scope). Sales are keyed `(token, id)` a "copies of one id" page has no single "minted tokens" list the way a 721 Series does; the purchase card (price, sold/allocation, per-id supply/cap, paused) is fully live from chain. Add a gallery yourself (or ask your agent) if you want one — e.g. loop `uri(id)` over the id range you care about.\n'
618
+ : '- **Gallery** — shows minted tokens newest-first, paginated. It reads `tokenURI(id)`; on-chain collections resolve with no backend, off-chain ones need their resolver/gateway reachable.\n'));
433
619
  }
434
620
  export function mintPageArtifact(o) {
621
+ const isEdition = !!o.isEdition;
435
622
  return {
436
623
  files: [
437
624
  { path: 'package.json', content: packageJson(o) },
@@ -443,12 +630,12 @@ export function mintPageArtifact(o) {
443
630
  { path: '.env.example', content: envFile({ ...o, token: '0xYourCollection', minter: o.minter }) },
444
631
  { path: 'lib/config.ts', content: LIB_CONFIG },
445
632
  { path: 'lib/chain.ts', content: LIB_CHAIN },
446
- { path: 'lib/abi.ts', content: LIB_ABI },
633
+ { path: 'lib/abi.ts', content: isEdition ? LIB_ABI_EDITION : LIB_ABI },
447
634
  { path: 'lib/meta.ts', content: LIB_META },
448
635
  { path: 'app/globals.css', content: APP_GLOBALS },
449
636
  { path: 'app/layout.tsx', content: APP_LAYOUT },
450
637
  { path: 'app/page.tsx', content: APP_PAGE },
451
- { path: 'app/mint-client.tsx', content: APP_MINT_CLIENT },
638
+ { path: 'app/mint-client.tsx', content: isEdition ? APP_MINT_CLIENT_EDITION : APP_MINT_CLIENT },
452
639
  { path: 'README.md', content: readme(o) },
453
640
  ],
454
641
  steps: [
@@ -1 +1 @@
1
- {"version":3,"file":"mintpage.js","sourceRoot":"","sources":["../src/mintpage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAsBH,uFAAuF;AACvF,MAAM,CAAC,MAAM,UAAU,GAA2B;IAChD,CAAC,EAAE,qCAAqC;IACxC,QAAQ,EAAE,6CAA6C;CACxD,CAAC;AAEF,MAAM,IAAI,GAAG,CAAC,CAAS,EAAU,EAAE,CACjC,CAAC;KACE,WAAW,EAAE;KACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;KAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC;AAEtC,iFAAiF;AACjF,gGAAgG;AAChG,kGAAkG;AAClG,uDAAuD;AAEvD,SAAS,WAAW,CAAC,CAAkB;IACrC,OAAO,IA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