@artblocks/abx-cli 0.1.0-alpha.4 → 0.1.0-alpha.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +161 -0
- package/assets/renderer-scaffold/README.md +41 -11
- package/assets/renderer-scaffold/foundry.toml +5 -0
- package/assets/renderer-scaffold/remappings.txt +1 -1
- package/assets/renderer-scaffold/script/DeployHooks.s.sol +24 -0
- package/assets/renderer-scaffold/script/Preview.s.sol +99 -0
- package/assets/renderer-scaffold/src/MyHooks.sol +20 -0
- package/assets/renderer-scaffold/src/MyRenderer.sol +4 -4
- package/assets/renderer-scaffold/src/MyTraits.sol +2 -2
- package/assets/renderer-scaffold/test/MyRenderer.t.sol +60 -3
- package/dist/bin.d.ts +26 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +63 -0
- package/dist/bin.js.map +1 -0
- package/dist/capabilities.d.ts +99 -0
- package/dist/capabilities.d.ts.map +1 -0
- package/dist/capabilities.js +144 -0
- package/dist/capabilities.js.map +1 -0
- package/dist/commands/auth.d.ts +54 -0
- package/dist/commands/auth.d.ts.map +1 -0
- package/dist/commands/auth.js +447 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/deploy.d.ts +242 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +5429 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/feedback.d.ts +7 -0
- package/dist/commands/feedback.d.ts.map +1 -0
- package/dist/commands/feedback.js +147 -0
- package/dist/commands/feedback.js.map +1 -0
- package/dist/commands/maintenance.d.ts +4 -0
- package/dist/commands/maintenance.d.ts.map +1 -0
- package/dist/commands/maintenance.js +114 -0
- package/dist/commands/maintenance.js.map +1 -0
- package/dist/commands/project.d.ts +429 -0
- package/dist/commands/project.d.ts.map +1 -0
- package/dist/commands/project.js +1720 -0
- package/dist/commands/project.js.map +1 -0
- package/dist/commands/reads.d.ts +85 -0
- package/dist/commands/reads.d.ts.map +1 -0
- package/dist/commands/reads.js +868 -0
- package/dist/commands/reads.js.map +1 -0
- package/dist/commands/scaffold.d.ts +89 -0
- package/dist/commands/scaffold.d.ts.map +1 -0
- package/dist/commands/scaffold.js +738 -0
- package/dist/commands/scaffold.js.map +1 -0
- package/dist/commands/service.d.ts +67 -0
- package/dist/commands/service.d.ts.map +1 -0
- package/dist/commands/service.js +748 -0
- package/dist/commands/service.js.map +1 -0
- package/dist/commands/storage.d.ts +51 -0
- package/dist/commands/storage.d.ts.map +1 -0
- package/dist/commands/storage.js +399 -0
- package/dist/commands/storage.js.map +1 -0
- package/dist/commands/submit-app.d.ts +102 -0
- package/dist/commands/submit-app.d.ts.map +1 -0
- package/dist/commands/submit-app.js +622 -0
- package/dist/commands/submit-app.js.map +1 -0
- package/dist/config.d.ts +105 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +351 -12
- package/dist/config.js.map +1 -1
- package/dist/conformance.d.ts +31 -0
- package/dist/conformance.d.ts.map +1 -0
- package/dist/conformance.js +390 -0
- package/dist/conformance.js.map +1 -0
- package/dist/contract-read-error.d.ts +5 -0
- package/dist/contract-read-error.d.ts.map +1 -0
- package/dist/contract-read-error.js +37 -0
- package/dist/contract-read-error.js.map +1 -0
- package/dist/deploy-plan.d.ts +150 -0
- package/dist/deploy-plan.d.ts.map +1 -0
- package/dist/deploy-plan.js +31 -0
- package/dist/deploy-plan.js.map +1 -0
- package/dist/deps.d.ts +6 -39
- package/dist/deps.d.ts.map +1 -1
- package/dist/deps.js +4 -68
- package/dist/deps.js.map +1 -1
- package/dist/errors.d.ts +20 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +25 -0
- package/dist/errors.js.map +1 -0
- package/dist/flag-allowlists.d.ts +53 -0
- package/dist/flag-allowlists.d.ts.map +1 -0
- package/dist/flag-allowlists.js +184 -0
- package/dist/flag-allowlists.js.map +1 -0
- package/dist/flags.d.ts +47 -0
- package/dist/flags.d.ts.map +1 -1
- package/dist/flags.js +125 -1
- package/dist/flags.js.map +1 -1
- package/dist/jsonout.d.ts +37 -0
- package/dist/jsonout.d.ts.map +1 -0
- package/dist/jsonout.js +79 -0
- package/dist/jsonout.js.map +1 -0
- package/dist/kind.d.ts +57 -0
- package/dist/kind.d.ts.map +1 -0
- package/dist/kind.js +122 -0
- package/dist/kind.js.map +1 -0
- package/dist/main.js +786 -4838
- package/dist/main.js.map +1 -1
- package/dist/mintpage.d.ts +17 -2
- package/dist/mintpage.d.ts.map +1 -1
- package/dist/mintpage.js +241 -54
- package/dist/mintpage.js.map +1 -1
- package/dist/output.d.ts +179 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/output.js +780 -0
- package/dist/output.js.map +1 -0
- package/dist/ownerops.d.ts +381 -57
- package/dist/ownerops.d.ts.map +1 -1
- package/dist/ownerops.js +2014 -359
- package/dist/ownerops.js.map +1 -1
- package/dist/preview.d.ts +23 -5
- package/dist/preview.d.ts.map +1 -1
- package/dist/preview.js +95 -43
- package/dist/preview.js.map +1 -1
- package/dist/prompt.d.ts +17 -0
- package/dist/prompt.d.ts.map +1 -0
- package/dist/prompt.js +19 -0
- package/dist/prompt.js.map +1 -0
- package/dist/provision.d.ts +3 -13
- package/dist/provision.d.ts.map +1 -1
- package/dist/provision.js +19 -21
- package/dist/provision.js.map +1 -1
- package/dist/remote.d.ts +157 -52
- package/dist/remote.d.ts.map +1 -1
- package/dist/remote.js +435 -46
- package/dist/remote.js.map +1 -1
- package/dist/riskgate.d.ts +62 -0
- package/dist/riskgate.d.ts.map +1 -0
- package/dist/riskgate.js +234 -0
- package/dist/riskgate.js.map +1 -0
- package/dist/scaffold.d.ts +12 -0
- package/dist/scaffold.d.ts.map +1 -0
- package/dist/scaffold.js +56 -0
- package/dist/scaffold.js.map +1 -0
- package/dist/schema.d.ts +36 -1
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +121 -26
- package/dist/schema.js.map +1 -1
- package/dist/script-chunks.d.ts +8 -0
- package/dist/script-chunks.d.ts.map +1 -0
- package/dist/script-chunks.js +35 -0
- package/dist/script-chunks.js.map +1 -0
- package/dist/served.d.ts +30 -0
- package/dist/served.d.ts.map +1 -0
- package/dist/served.js +112 -0
- package/dist/served.js.map +1 -0
- package/dist/signer.d.ts +13 -0
- package/dist/signer.d.ts.map +1 -1
- package/dist/signer.js +84 -15
- package/dist/signer.js.map +1 -1
- package/dist/update-check.d.ts +86 -5
- package/dist/update-check.d.ts.map +1 -1
- package/dist/update-check.js +161 -20
- package/dist/update-check.js.map +1 -1
- package/package.json +13 -12
- package/skill/SKILL.md +181 -347
- package/skill/agents/openai.yaml +4 -0
- package/skill/reference/capabilities.md +188 -0
- package/skill/reference/code.md +220 -0
- package/skill/reference/creator-token.md +94 -0
- package/skill/reference/deploy.md +174 -0
- package/skill/reference/diagnose.md +178 -0
- package/skill/reference/hosting.md +186 -93
- package/skill/reference/operate.md +220 -0
- package/skill/reference/services.md +121 -0
- package/skill/reference/setup.md +154 -36
- package/assets/renderer-scaffold/src/interfaces/IAbxFieldRenderer.sol +0 -32
- package/assets/renderer-scaffold/src/interfaces/IAbxParams.sol +0 -26
- package/dist/inspect.d.ts +0 -48
- package/dist/inspect.d.ts.map +0 -1
- package/dist/inspect.js +0 -184
- package/dist/inspect.js.map +0 -1
- package/dist/migrate.d.ts +0 -65
- package/dist/migrate.d.ts.map +0 -1
- package/dist/migrate.js +0 -180
- package/dist/migrate.js.map +0 -1
- package/dist/onchain-uri.d.ts +0 -97
- package/dist/onchain-uri.d.ts.map +0 -1
- package/dist/onchain-uri.js +0 -243
- package/dist/onchain-uri.js.map +0 -1
- package/dist/upload.d.ts +0 -28
- package/dist/upload.d.ts.map +0 -1
- package/dist/upload.js +0 -41
- package/dist/upload.js.map +0 -1
- package/skill/reference/code-projects.md +0 -246
- package/skill/reference/operating.md +0 -116
- package/skill/reference/troubleshooting.md +0 -28
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { SelfHostIndexer } from '@artblocks/abx-indexer';
|
|
2
|
+
import { type Address, type OnChainFieldInput, type OpenSeaAttribute, type ProjectState, type PublicClient, type SeriesTokenFieldInput } from '@artblocks/abx-sdk';
|
|
3
|
+
import { type Hex } from 'viem';
|
|
4
|
+
import { type StorageOverrides } from '../config.js';
|
|
5
|
+
import { type Flags } from '../flags.js';
|
|
6
|
+
export declare const DIMENSIONS: Record<string, {
|
|
7
|
+
label: string;
|
|
8
|
+
aliases: string[];
|
|
9
|
+
}>;
|
|
10
|
+
export declare function resolveDimension(type: string): string;
|
|
11
|
+
/** Parse `--copies <N|open>` into the `editionSize` InitParams field (`0n` = open/uncapped). Throws
|
|
12
|
+
* with a pointed message on anything else — a bare `--copies` (no value), a non-integer, or the
|
|
13
|
+
* literal `0` (which already has an on-chain meaning — "open" says the same thing without the
|
|
14
|
+
* ambiguity of "did they mean zero copies, or unlimited?"). */
|
|
15
|
+
export declare function parseCopies(raw: string | undefined): bigint;
|
|
16
|
+
/** `--copies 1` is legal — a single-copy ERC-1155 edition — but it is almost never what a creator
|
|
17
|
+
* actually wants (the plain 721 lane makes a simpler, more marketplace-familiar token for exactly
|
|
18
|
+
* one copy). Advisory only; never refused — `--copies` exists precisely so nobody has to reach for
|
|
19
|
+
* a different flag to get an edition. */
|
|
20
|
+
export declare function copiesOneNote(cmd: string): string;
|
|
21
|
+
/** A non-negative-integer flag (`--mint-amount`, …) — the shared parse + bound-check so every
|
|
22
|
+
* edition flag that takes "a count" reports the same, plain-language rejection. */
|
|
23
|
+
export declare function parseNonNegativeIntFlag(raw: string, flag: string): bigint;
|
|
24
|
+
/**
|
|
25
|
+
* A `--dry-run` computes the deterministic deploy address, which is a pure function of
|
|
26
|
+
* (factory, salt, deployer) — so it needs a deployer even though it signs nothing. Resolve it the
|
|
27
|
+
* same way the preview will (`--for`, else an env key) and fail EARLY with the fix if neither
|
|
28
|
+
* exists, rather than after the preview has printed several steps of work.
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* A dry run only checks whether a factory address is CONFIGURED, not whether it has code on this
|
|
32
|
+
* chain — and the manifest always has an address, so a chain where the trust anchor isn't deployed
|
|
33
|
+
* (a private/local chain, or a wrong-network RPC) sailed past this and died inside
|
|
34
|
+
* `predictDeterministicAddress` with a raw `returned no data ("0x")` and a list of ABI hypotheses.
|
|
35
|
+
* The real deploy and `abx predict` both explain that case; a preview of the same deploy must too.
|
|
36
|
+
* Returns false when the caller should stop (message already printed).
|
|
37
|
+
*/
|
|
38
|
+
export declare function previewFactoryLive(client: PublicClient, factory: Address, label: string): Promise<boolean>;
|
|
39
|
+
/**
|
|
40
|
+
* Placeholder-identity guard, shared by ALL THREE deploy commands. `name`/`symbol` are written
|
|
41
|
+
* on-chain as the public collection identity and are effectively permanent, so a real deploy must
|
|
42
|
+
* never bake a tool default silently: warn in a preview, HARD-STOP a real send unless `--yes`.
|
|
43
|
+
*
|
|
44
|
+
* It was duplicated per command, and `deploy-series` simply never got a copy — its default
|
|
45
|
+
* "ABX Series"/"ABXS" went on-chain with at most a warning, while the skill promises the CLI
|
|
46
|
+
* refuses demo defaults. (deploy-code's copy even said "mirror deploy/deploy-series", which made
|
|
47
|
+
* the gap look closed.) One predicate now, like `loopbackBaseUrl()`, so a fourth command can't drift.
|
|
48
|
+
*/
|
|
49
|
+
export declare function assertRealIdentity(flags: Flags, o: {
|
|
50
|
+
name: string;
|
|
51
|
+
symbol: string;
|
|
52
|
+
dryRun: boolean;
|
|
53
|
+
}): void;
|
|
54
|
+
export declare function assertPreviewDeployer(flags: Flags): void;
|
|
55
|
+
export declare function warnUnfunded(publicClient: PublicClient, address: Address): Promise<void>;
|
|
56
|
+
export declare function shArg(v: string): string;
|
|
57
|
+
export declare function deployCommandLine(flags: Flags, salt: string): string;
|
|
58
|
+
export declare function deploySeriesCommandLine(flags: Flags, salt: string): string;
|
|
59
|
+
export declare function deployCodeCommandLine(flags: Flags, salt: string): string;
|
|
60
|
+
export declare const imageKeccakField: (value: Hex) => OnChainFieldInput;
|
|
61
|
+
export declare const imageInlineField: (svg: string) => OnChainFieldInput;
|
|
62
|
+
/** An `image` field pointing at an off-chain URL (the renderer emits it verbatim). */
|
|
63
|
+
export declare const imageUrlField: (url: string) => OnChainFieldInput;
|
|
64
|
+
/** An `image` field as a `url-template` — `{id}` is substituted with the tokenId at render, so ONE
|
|
65
|
+
* (collection-scope) field addresses a whole pinned directory / Arweave manifest. */
|
|
66
|
+
export declare const imageUrlTemplateField: (template: string) => OnChainFieldInput;
|
|
67
|
+
/**
|
|
68
|
+
* An `image` field carrying a CONTENT-ADDRESSED identity — the bare CID / txid, with the serving
|
|
69
|
+
* gateway supplied at read time from the collection's `abx_gateway_*` preference (renderer spec v11).
|
|
70
|
+
*
|
|
71
|
+
* This replaces what `--onchain-uri --backend ipfs|arweave` used to write. That path stored the
|
|
72
|
+
* backend's gateway HTTPS URL as a `url` field, which looked identical in a marketplace and was
|
|
73
|
+
* wrong in two ways that only showed up later: the creator's chosen gateway host was welded into a
|
|
74
|
+
* value they might have locked, so a dead gateway became a dead token rather than a repoint; and
|
|
75
|
+
* `abx_provenance` reported `source: url` for bytes that live on IPFS, so the chain stopped saying
|
|
76
|
+
* where the work actually was. The CID is identity and the gateway is a preference — one field each.
|
|
77
|
+
*
|
|
78
|
+
* `{id}` in the value still substitutes at read (the O(1) directory pattern), so a collection-scope
|
|
79
|
+
* `ipfs` field addresses a whole pinned folder exactly as `url-template` does for a plain CDN.
|
|
80
|
+
*/
|
|
81
|
+
export declare const imageContentAddressedField: (network: "ipfs" | "arweave", contentId: string) => OnChainFieldInput;
|
|
82
|
+
export declare const looksLikeSvg: (s: string) => boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Does the IMAGE itself end up on-chain for this deploy? Two ways it can:
|
|
85
|
+
* • `--onchain-image` — the bytes are staged in the chunk store and read back via a `reader` field.
|
|
86
|
+
* • `--onchain-uri` with an SVG — v1 inlines SVG directly as a data: URI (raster cannot be).
|
|
87
|
+
* Anything else falls through to keccak256 custody, and the on-chain renderer serves its PLACEHOLDER
|
|
88
|
+
* image. This distinction is the difference between a token that is durable and one that only looks
|
|
89
|
+
* durable, so it must be computed from the actual file — never inferred from the flag alone (the
|
|
90
|
+
* success banner used to claim "fully on-chain, no hosting needed" for a keccak-anchored raster).
|
|
91
|
+
*/
|
|
92
|
+
/**
|
|
93
|
+
* Will `tokenURI` resolve to the creator's REAL image, with nothing to keep running?
|
|
94
|
+
*
|
|
95
|
+
* Three ways yes, and they are not the same promise: the bytes are on-chain
|
|
96
|
+
* ({@link imageEndsUpOnChain}), or they sit at a durable public URL that the on-chain JSON points at
|
|
97
|
+
* (a direct-URL backend — the "no server" pattern). Only `fs` custody under `--onchain-uri` fails,
|
|
98
|
+
* because the renderer then holds a hash and nothing can serve it. Keep this separate from
|
|
99
|
+
* "fully on-chain": conflating them is what let a keccak-anchored raster ship under a permanence
|
|
100
|
+
* banner it did not earn.
|
|
101
|
+
*/
|
|
102
|
+
export declare function imageResolvesWithoutServer(flags: Flags, onchainImage: boolean): boolean;
|
|
103
|
+
export declare function imageEndsUpOnChain(flags: Flags, onchainImage: boolean): boolean;
|
|
104
|
+
/** A browser wallet reached through an open sign session, used as the Turbo (Arweave) upload
|
|
105
|
+
* identity so the wallet's own credits pay — `signMessage` returns the `0x` EIP-191 signature. */
|
|
106
|
+
export type RemoteEthUpload = {
|
|
107
|
+
address: Address;
|
|
108
|
+
signMessage: (message: Uint8Array) => Promise<string>;
|
|
109
|
+
};
|
|
110
|
+
export declare function prepareContent(imagePath: string | undefined, clone: Address, overrides: StorageOverrides, store?: boolean, // false for --dry-run: compute the hash but don't custody bytes
|
|
111
|
+
onChain?: boolean, // true (--onchain-uri): put the image ON-CHAIN (inline SVG) so it self-resolves
|
|
112
|
+
remoteEth?: RemoteEthUpload, // wallet-lane Turbo uploads: sign+pay with the connected browser wallet
|
|
113
|
+
walletAddr?: string, // the deployer wallet — checked for existing Turbo credits if the managed key is short
|
|
114
|
+
gatewayFlags?: Flags): Promise<{
|
|
115
|
+
tokenFields: OnChainFieldInput[];
|
|
116
|
+
contentNote: string;
|
|
117
|
+
}>;
|
|
118
|
+
/**
|
|
119
|
+
* Real OpenSea traits supplied by the creator, from `--attributes <file.json>` (canonical array or
|
|
120
|
+
* `{name: value}` map) and/or `--traits "Background=Blue; Edition=3"` (quick inline form). These are
|
|
121
|
+
* the marketplace trait array — NOT a place for protocol facts. Empty when neither flag is given.
|
|
122
|
+
*/
|
|
123
|
+
export declare function parseDeployTraits(flags: Flags): OpenSeaAttribute[];
|
|
124
|
+
/** Encode creator traits as the on-chain `attributes` field (inline JSON bytes) — for `--traits-onchain`. */
|
|
125
|
+
export declare const attributesInlineField: (attrs: OpenSeaAttribute[]) => OnChainFieldInput;
|
|
126
|
+
/**
|
|
127
|
+
* Warn when IPFS/Arweave custody is pointed at a LOCAL gateway.
|
|
128
|
+
*
|
|
129
|
+
* Two distinct problems ride on one flag, and the warning names the one that actually applies. The
|
|
130
|
+
* bytes are pinned only to a node on this machine, so nothing off it can retrieve them — that is the
|
|
131
|
+
* real damage and it survives any later `set-gateway`. It ALSO used to weld that localhost host into
|
|
132
|
+
* the on-chain value; since the field holds a bare CID it no longer does (the serving prefix is the
|
|
133
|
+
* collection's preference), so promising "the served URL resolves only on THIS machine" would now be
|
|
134
|
+
* false and would point the creator at the wrong repair.
|
|
135
|
+
*/
|
|
136
|
+
export declare function localGatewayWarning(flags: Flags): string | null;
|
|
137
|
+
/** A readout line for an optional creator text field — states exactly what's written (and where),
|
|
138
|
+
* or that NOTHING is, so the deploy never silently invents one. */
|
|
139
|
+
export declare function describeDeployField(label: string, value: string | undefined, onchain: boolean): string;
|
|
140
|
+
/** Readout lines for whichever authorship/rights fields a deploy will write (always on-chain,
|
|
141
|
+
* inline collection fields). Empty when none are set — so the readout stays quiet by default. */
|
|
142
|
+
export declare function authorshipReadout(flags: Flags): string[];
|
|
143
|
+
/** A readout line for creator traits — the exact traits written (and where), or that none are. */
|
|
144
|
+
export declare function describeTraits(traits: OpenSeaAttribute[], onchain: boolean): string;
|
|
145
|
+
export declare function cmdDeploy(flags: Flags, serveAfter: boolean): Promise<void>;
|
|
146
|
+
export declare function cmdDeployBody(flags: Flags, serveAfter: boolean, emit: (p: Record<string, unknown>) => void): Promise<void>;
|
|
147
|
+
export declare function cmdDeployOneOfOneEditionBody(flags: Flags, emit: (p: Record<string, unknown>) => void): Promise<void>;
|
|
148
|
+
export declare const tokenFieldOf: (tokenId: number, f: OnChainFieldInput) => SeriesTokenFieldInput;
|
|
149
|
+
export declare function cmdDeploySeries(flags: Flags): Promise<void>;
|
|
150
|
+
export declare function cmdDeploySeriesBody(flags: Flags, emit: (p: Record<string, unknown>) => void): Promise<void>;
|
|
151
|
+
export declare function cmdDeployEditionImageBody(flags: Flags, emit: (p: Record<string, unknown>) => void): Promise<void>;
|
|
152
|
+
/**
|
|
153
|
+
* The deterministic part of a projection: everything that is a pure function of the chain.
|
|
154
|
+
* Deliberately EXCLUDES `reconstructedAt`, `rpcUrl` and `toBlock` — a timestamp, the endpoint that
|
|
155
|
+
* happened to answer, and the head at scan time all legitimately differ between two replays, so
|
|
156
|
+
* folding them in would make the rebuild proof fail for reasons that aren't about correctness.
|
|
157
|
+
*/
|
|
158
|
+
export declare function projectionFingerprint(s: ProjectState): string;
|
|
159
|
+
/**
|
|
160
|
+
* Print the reconstructed spine — the point being that this list IS the database. Rendered inside
|
|
161
|
+
* the index step (no header of its own: "Index it — replay the event spine" immediately followed by
|
|
162
|
+
* a separate "The event spine" step read as a stutter).
|
|
163
|
+
*/
|
|
164
|
+
export declare function walkthroughSpine(state: ProjectState): void;
|
|
165
|
+
/**
|
|
166
|
+
* [4] The claim, demonstrated: delete the local projection and rebuild it from the chain.
|
|
167
|
+
*
|
|
168
|
+
* This is the one step that can't be faked by good output — it drops the projection for real
|
|
169
|
+
* (registration kept), confirms it's gone, replays from the deploy block, and compares a
|
|
170
|
+
* fingerprint of everything chain-derived. If ABX's premise is wrong, this step fails loudly.
|
|
171
|
+
*/
|
|
172
|
+
export declare function walkthroughRebuild(indexer: SelfHostIndexer, address: Address, before: ProjectState): Promise<void>;
|
|
173
|
+
/**
|
|
174
|
+
* [5] Read the token back the way a marketplace would.
|
|
175
|
+
*
|
|
176
|
+
* Which is genuinely a different act per lane, so it reads from the real source in each case rather
|
|
177
|
+
* than always going through the local server:
|
|
178
|
+
* • fully on-chain → call `tokenURI(0)` on the contract. That IS what a marketplace does, and on
|
|
179
|
+
* this lane the whole answer (content included) comes back from the chain with nothing else running.
|
|
180
|
+
* • off-chain custody → fetch the resolver, because that's what the baked URI points at.
|
|
181
|
+
* Reading the on-chain lane over HTTP would have quietly implied the local server was load-bearing
|
|
182
|
+
* when it isn't — the opposite of the lesson.
|
|
183
|
+
*/
|
|
184
|
+
export declare function walkthroughReadBack(state: ProjectState, baseUrl: string, onChainUri: boolean): Promise<void>;
|
|
185
|
+
/** Every flag `deploy-code` recognizes — so an unsupported/typo'd one warns instead of silently
|
|
186
|
+
* no-opping. Keep in lockstep with the flags read below + the storageOverrides/lane helpers. */
|
|
187
|
+
export declare const DEPLOY_CODE_FLAGS: Set<string>;
|
|
188
|
+
export declare const SHARED_DEPLOY_FLAGS: string[];
|
|
189
|
+
export declare const DEPLOY_FLAGS: Set<string>;
|
|
190
|
+
export declare const DEPLOY_SERIES_FLAGS: Set<string>;
|
|
191
|
+
export declare const DEPLOY_EDITION_FLAGS: Set<string>;
|
|
192
|
+
export declare const DEPLOY_SERIES_EDITION_FLAGS: Set<string>;
|
|
193
|
+
export declare function cmdDeployCode(flags: Flags): Promise<void>;
|
|
194
|
+
export declare function cmdDeployCodeBody(flags: Flags, emit: (p: Record<string, unknown>) => void): Promise<void>;
|
|
195
|
+
export declare const DEPLOY_CODE_EDITION_FLAGS: Set<string>;
|
|
196
|
+
export declare function cmdDeployEditionCodeBody(flags: Flags, emit: (p: Record<string, unknown>) => void): Promise<void>;
|
|
197
|
+
/**
|
|
198
|
+
* Resolve `--721c` into the InitParams `transferValidator`. Absent → `zeroAddress`: a plain
|
|
199
|
+
* ERC-721 (or, on an edition deploy, a plain ERC-1155), byte-for-byte the pre-721C deploy — no
|
|
200
|
+
* prompts, no output, no mention of 721C. `--721c` / `--721c recommended` → the per-chain
|
|
201
|
+
* recommended validator (refused, naming the chains that have one, when the manifest has no
|
|
202
|
+
* entry); `--721c 0x…` → checksum-validated AND pre-checked for code on this chain (the factory
|
|
203
|
+
* would revert `InvalidTransferValidator()` — surface it before any upload/staging/gas). When
|
|
204
|
+
* enrolling, prints the one plain statement of what enforcement means — once, adapted to the
|
|
205
|
+
* chosen validator.
|
|
206
|
+
*
|
|
207
|
+
* `standard` picks only the WORDING (`ERC-721C` vs `ERC-1155C`) — the flag, the value grammar, and
|
|
208
|
+
* the resolved validator address are identical either way (the SAME `InitParams.transferValidator`
|
|
209
|
+
* opt-in per the parity plan's locked decision 3: 1155C ships with the same UX as 721C). Editions
|
|
210
|
+
* pass `'1155C'`; every 721 call site keeps the default, so their output is unchanged.
|
|
211
|
+
*/
|
|
212
|
+
export declare function resolveTransferValidatorFlag(flags: Flags, publicClient: PublicClient, dryRun: boolean, standard?: '721C' | '1155C'): Promise<Address>;
|
|
213
|
+
/**
|
|
214
|
+
* Resolve the three-way seed decision into the InitParams `seedSource`, for both code lanes:
|
|
215
|
+
*
|
|
216
|
+
* - `--no-seed` → `zeroAddress`. No mint-time seed at all.
|
|
217
|
+
* - nothing, or `canonical` → the canonical `AbxSeedSource` via `ensureSeedSource` (manifest →
|
|
218
|
+
* self-heal to the deterministic address → CREATE2-deploy it). This
|
|
219
|
+
* is today's behaviour, byte-for-byte, and stays the default.
|
|
220
|
+
* - `--seed-source 0x…` → the creator's own `IAbxSeedSource`, **probed first**.
|
|
221
|
+
*
|
|
222
|
+
* The flag exists because we tell creators, in the docs and in this command's own help, that the fix
|
|
223
|
+
* for "the canonical seed isn't strong enough for my raffle" is to point `seedSource` at a
|
|
224
|
+
* commit-reveal / VRF-backed source of their own. Until now the only route was an `ABX_SEED_SOURCE`
|
|
225
|
+
* env var checked for nothing but code length, which made a first-class promise out of a
|
|
226
|
+
* side entrance.
|
|
227
|
+
*
|
|
228
|
+
* **Everything that isn't the canonical singleton gets probed**, including an address that arrived
|
|
229
|
+
* via `ABX_SEED_SOURCE` — so the env lane keeps working and stops being the unchecked one. The
|
|
230
|
+
* comparison is against the deterministic canonical address rather than "did a flag say so", because
|
|
231
|
+
* that is the actual question (is this our audited bytecode, or someone's contract we know nothing
|
|
232
|
+
* about?). A dry run tolerates an unreachable RPC and says the check is deferred; a real deploy
|
|
233
|
+
* refuses to bake a seed source it couldn't verify.
|
|
234
|
+
*
|
|
235
|
+
* The probe here runs with **no `from`**, unlike the owner op's (which calls as the token). That is
|
|
236
|
+
* not an oversight: the clone's address is a function of the CREATE2 salt, which isn't reserved yet
|
|
237
|
+
* at this point, so a source that gates on `msg.sender` could not have been told about this token in
|
|
238
|
+
* the first place. A gated/commit-reveal source is a deploy-then-`abx set-seed-source` flow by
|
|
239
|
+
* construction, and the `reverted` refusal says exactly that.
|
|
240
|
+
*/
|
|
241
|
+
export declare function resolveSeedSourceFlag(flags: Flags, publicClient: PublicClient, dryRun: boolean, chainId: number): Promise<Address>;
|
|
242
|
+
//# sourceMappingURL=deploy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AACvD,OAAO,EACL,KAAK,OAAO,EAMZ,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,YAAY,EAMjB,KAAK,qBAAqB,EAsD3B,MAAM,oBAAoB,CAAC;AAY5B,OAAO,EAAC,KAAK,GAAG,EAAqD,MAAM,MAAM,CAAC;AAClF,OAAO,EAGL,KAAK,gBAAgB,EAmBtB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAC,KAAK,KAAK,EAA8E,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