@artblocks/abx-cli 0.1.0-alpha.2 → 0.1.0-alpha.21
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 +1991 -0
- package/assets/renderer-scaffold/src/interfaces/IAbxParams.sol +17 -0
- package/assets/renderer-scaffold/test/MyRenderer.t.sol +51 -2
- package/dist/commands/deploy.d.ts +206 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +4273 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/project.d.ts +241 -0
- package/dist/commands/project.d.ts.map +1 -0
- package/dist/commands/project.js +1060 -0
- package/dist/commands/project.js.map +1 -0
- package/dist/commands/reads.d.ts +64 -0
- package/dist/commands/reads.d.ts.map +1 -0
- package/dist/commands/reads.js +697 -0
- package/dist/commands/reads.js.map +1 -0
- package/dist/commands/scaffold.d.ts +71 -0
- package/dist/commands/scaffold.d.ts.map +1 -0
- package/dist/commands/scaffold.js +552 -0
- package/dist/commands/scaffold.js.map +1 -0
- package/dist/commands/service.d.ts +41 -0
- package/dist/commands/service.d.ts.map +1 -0
- package/dist/commands/service.js +618 -0
- package/dist/commands/service.js.map +1 -0
- package/dist/commands/storage.d.ts +37 -0
- package/dist/commands/storage.d.ts.map +1 -0
- package/dist/commands/storage.js +343 -0
- package/dist/commands/storage.js.map +1 -0
- package/dist/config.d.ts +91 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +244 -11
- 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 +371 -0
- package/dist/conformance.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 +148 -0
- package/dist/flag-allowlists.js.map +1 -0
- package/dist/flags.d.ts +41 -0
- package/dist/flags.d.ts.map +1 -1
- package/dist/flags.js +94 -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 +68 -0
- package/dist/jsonout.js.map +1 -0
- package/dist/kind.d.ts +53 -0
- package/dist/kind.d.ts.map +1 -0
- package/dist/kind.js +94 -0
- package/dist/kind.js.map +1 -0
- package/dist/main.js +534 -4708
- 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 +214 -52
- package/dist/mintpage.js.map +1 -1
- package/dist/output.d.ts +148 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/output.js +634 -0
- package/dist/output.js.map +1 -0
- package/dist/ownerops.d.ts +132 -44
- package/dist/ownerops.d.ts.map +1 -1
- package/dist/ownerops.js +1151 -329
- package/dist/ownerops.js.map +1 -1
- package/dist/preview.d.ts +81 -0
- package/dist/preview.d.ts.map +1 -0
- package/dist/preview.js +535 -0
- package/dist/preview.js.map +1 -0
- 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.map +1 -1
- package/dist/provision.js +10 -7
- package/dist/provision.js.map +1 -1
- package/dist/remote.d.ts +134 -53
- package/dist/remote.d.ts.map +1 -1
- package/dist/remote.js +358 -46
- package/dist/remote.js.map +1 -1
- package/dist/riskgate.d.ts +29 -0
- package/dist/riskgate.d.ts.map +1 -0
- package/dist/riskgate.js +91 -0
- package/dist/riskgate.js.map +1 -0
- package/dist/scaffold.d.ts +10 -0
- package/dist/scaffold.d.ts.map +1 -0
- package/dist/scaffold.js +52 -0
- package/dist/scaffold.js.map +1 -0
- package/dist/schema.d.ts +18 -1
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +74 -23
- package/dist/schema.js.map +1 -1
- 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 +80 -14
- package/dist/signer.js.map +1 -1
- package/dist/update-check.d.ts +83 -4
- package/dist/update-check.d.ts.map +1 -1
- package/dist/update-check.js +132 -17
- package/dist/update-check.js.map +1 -1
- package/package.json +10 -6
- package/skill/SKILL.md +108 -62
- package/skill/reference/code-projects.md +109 -13
- package/skill/reference/creator-token.md +86 -0
- package/skill/reference/decisions.md +87 -0
- package/skill/reference/hosting.md +48 -15
- package/skill/reference/operating.md +32 -8
- package/skill/reference/setup.md +10 -3
- package/skill/reference/troubleshooting.md +31 -4
- 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
|
@@ -10,6 +10,13 @@ pragma solidity ^0.8.20;
|
|
|
10
10
|
/// The tokenData merge rule: a token-scope value overrides the contract-scope one. The
|
|
11
11
|
/// common pattern is `tokenParam` first, then `contractParam` as a fallback (see the
|
|
12
12
|
/// `_param` helper in MyRenderer.sol).
|
|
13
|
+
///
|
|
14
|
+
/// TWO READERS, PICK BY TYPE. Scalar types (`Bool`, `Select`, the ranges, `HexColor`,
|
|
15
|
+
/// `Timestamp`) live entirely in the `bytes32` — read them with `tokenParam` /
|
|
16
|
+
/// `contractParam`. The two payload types, **`Bytes` and `String`**, do NOT: their
|
|
17
|
+
/// `bytes32` is a keccak COMMITMENT (`valueIsHash == true`) and the content is fetched with
|
|
18
|
+
/// `tokenParamData` / `contractParamData` below. Reading a `Bytes` param with `tokenParam`
|
|
19
|
+
/// hands you a hash, not the artwork — that is the tell you want the data reader.
|
|
13
20
|
interface IAbxParams {
|
|
14
21
|
/// Returns the token-scope param: its bytes32 `value`, `valueIsHash` (true if it commits to
|
|
15
22
|
/// off-chain bytes — a literal scalar like a seed/HexColor is false), and `isSet` (does it exist).
|
|
@@ -23,4 +30,14 @@ interface IAbxParams {
|
|
|
23
30
|
external
|
|
24
31
|
view
|
|
25
32
|
returns (bytes32 value, bool valueIsHash, bool isSet);
|
|
33
|
+
|
|
34
|
+
/// @notice A `Bytes`/`String` token param's FULL content — the payload types' real reader.
|
|
35
|
+
/// Returns empty bytes for a literal scalar or an unset key, so an empty return is your
|
|
36
|
+
/// "fall back to a default" signal. When non-empty, `keccak256(returned bytes)` equals
|
|
37
|
+
/// the `value` that `tokenParam` reports — verify it if you want the commitment proof.
|
|
38
|
+
/// Up to ~24KB per key: enough to carry an actual artwork payload on-chain.
|
|
39
|
+
function tokenParamData(uint256 tokenId, bytes32 key) external view returns (bytes memory);
|
|
40
|
+
|
|
41
|
+
/// @notice The contract-scope (collection-wide) blob — the fallback when a token has none.
|
|
42
|
+
function contractParamData(bytes32 key) external view returns (bytes memory);
|
|
26
43
|
}
|
|
@@ -13,15 +13,38 @@ contract MockParams is IAbxParams {
|
|
|
13
13
|
mapping(uint256 => mapping(bytes32 => bool)) private ts;
|
|
14
14
|
mapping(bytes32 => bytes32) private cv;
|
|
15
15
|
mapping(bytes32 => bool) private cs;
|
|
16
|
+
// `Bytes`/`String` params: the bytes32 holds keccak(content), the content lives here.
|
|
17
|
+
mapping(uint256 => mapping(bytes32 => bytes)) private td;
|
|
18
|
+
mapping(bytes32 => bytes) private cd;
|
|
16
19
|
|
|
17
20
|
function setToken(uint256 id, bytes32 key, bytes32 val) external { tv[id][key] = val; ts[id][key] = true; }
|
|
18
21
|
function setContract(bytes32 key, bytes32 val) external { cv[key] = val; cs[key] = true; }
|
|
19
22
|
|
|
23
|
+
/// Set a payload-typed (`Bytes`/`String`) param the way the real contract does: the scalar slot
|
|
24
|
+
/// carries the keccak COMMITMENT and `valueIsHash` is true, so a renderer that reads the bytes32
|
|
25
|
+
/// gets a hash — the data reader is the only way to the content.
|
|
26
|
+
function setTokenData(uint256 id, bytes32 key, bytes memory content) external {
|
|
27
|
+
td[id][key] = content;
|
|
28
|
+
tv[id][key] = keccak256(content);
|
|
29
|
+
ts[id][key] = true;
|
|
30
|
+
}
|
|
31
|
+
function setContractData(bytes32 key, bytes memory content) external {
|
|
32
|
+
cd[key] = content;
|
|
33
|
+
cv[key] = keccak256(content);
|
|
34
|
+
cs[key] = true;
|
|
35
|
+
}
|
|
36
|
+
|
|
20
37
|
function tokenParam(uint256 id, bytes32 key) external view returns (bytes32, bool, bool) {
|
|
21
|
-
return (tv[id][key],
|
|
38
|
+
return (tv[id][key], td[id][key].length > 0, ts[id][key]);
|
|
22
39
|
}
|
|
23
40
|
function contractParam(bytes32 key) external view returns (bytes32, bool, bool) {
|
|
24
|
-
return (cv[key],
|
|
41
|
+
return (cv[key], cd[key].length > 0, cs[key]);
|
|
42
|
+
}
|
|
43
|
+
function tokenParamData(uint256 id, bytes32 key) external view returns (bytes memory) {
|
|
44
|
+
return td[id][key];
|
|
45
|
+
}
|
|
46
|
+
function contractParamData(bytes32 key) external view returns (bytes memory) {
|
|
47
|
+
return cd[key];
|
|
25
48
|
}
|
|
26
49
|
}
|
|
27
50
|
|
|
@@ -107,4 +130,30 @@ contract MyRendererTest is Test {
|
|
|
107
130
|
(, bytes memory data) = img.render(address(params), tokenId, IMAGE);
|
|
108
131
|
assertTrue(data.length > 0);
|
|
109
132
|
}
|
|
133
|
+
|
|
134
|
+
/// READING A PAYLOAD PARAM (`Bytes`/`String`) — the pattern for carrying an actual artwork
|
|
135
|
+
/// payload on-chain. The scalar reader hands you a keccak COMMITMENT with `valueIsHash == true`;
|
|
136
|
+
/// the content only comes from `tokenParamData`. If your renderer reads a `Bytes` param through
|
|
137
|
+
/// `tokenParam` it will draw from a hash and produce garbage, silently — hence this test.
|
|
138
|
+
function test_bytesParam_readViaDataReader() public {
|
|
139
|
+
bytes memory grid = hex"00112233445566778899aabbccddeeff";
|
|
140
|
+
params.setTokenData(0, "grid", grid);
|
|
141
|
+
|
|
142
|
+
// The scalar surface: a commitment, explicitly flagged as one — NOT the content.
|
|
143
|
+
(bytes32 value, bool valueIsHash, bool isSet) = IAbxParams(address(params)).tokenParam(0, "grid");
|
|
144
|
+
assertTrue(isSet);
|
|
145
|
+
assertTrue(valueIsHash, "a Bytes param reports valueIsHash: read the data instead");
|
|
146
|
+
assertEq(value, keccak256(grid));
|
|
147
|
+
|
|
148
|
+
// The data surface: the real bytes, verifiable against that commitment.
|
|
149
|
+
bytes memory got = IAbxParams(address(params)).tokenParamData(0, "grid");
|
|
150
|
+
assertEq(got, grid);
|
|
151
|
+
assertEq(keccak256(got), value, "content must match the on-chain commitment");
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/// An unset payload param returns empty bytes — your "use a default" signal, never a revert.
|
|
155
|
+
function test_bytesParam_unsetIsEmpty() public view {
|
|
156
|
+
assertEq(IAbxParams(address(params)).tokenParamData(0, "grid").length, 0);
|
|
157
|
+
assertEq(IAbxParams(address(params)).contractParamData("grid").length, 0);
|
|
158
|
+
}
|
|
110
159
|
}
|
|
@@ -0,0 +1,206 @@
|
|
|
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
|
+
export declare const looksLikeSvg: (s: string) => boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Does the IMAGE itself end up on-chain for this deploy? Two ways it can:
|
|
70
|
+
* • `--onchain-image` — the bytes are staged in the chunk store and read back via a `reader` field.
|
|
71
|
+
* • `--onchain-uri` with an SVG — v1 inlines SVG directly as a data: URI (raster cannot be).
|
|
72
|
+
* Anything else falls through to keccak256 custody, and the on-chain renderer serves its PLACEHOLDER
|
|
73
|
+
* image. This distinction is the difference between a token that is durable and one that only looks
|
|
74
|
+
* durable, so it must be computed from the actual file — never inferred from the flag alone (the
|
|
75
|
+
* success banner used to claim "fully on-chain, no hosting needed" for a keccak-anchored raster).
|
|
76
|
+
*/
|
|
77
|
+
/**
|
|
78
|
+
* Will `tokenURI` resolve to the creator's REAL image, with nothing to keep running?
|
|
79
|
+
*
|
|
80
|
+
* Three ways yes, and they are not the same promise: the bytes are on-chain
|
|
81
|
+
* ({@link imageEndsUpOnChain}), or they sit at a durable public URL that the on-chain JSON points at
|
|
82
|
+
* (a direct-URL backend — the "no server" pattern). Only `fs` custody under `--onchain-uri` fails,
|
|
83
|
+
* because the renderer then holds a hash and nothing can serve it. Keep this separate from
|
|
84
|
+
* "fully on-chain": conflating them is what let a keccak-anchored raster ship under a permanence
|
|
85
|
+
* banner it did not earn.
|
|
86
|
+
*/
|
|
87
|
+
export declare function imageResolvesWithoutServer(flags: Flags, onchainImage: boolean): boolean;
|
|
88
|
+
export declare function imageEndsUpOnChain(flags: Flags, onchainImage: boolean): boolean;
|
|
89
|
+
/** A browser wallet reached through an open sign session, used as the Turbo (Arweave) upload
|
|
90
|
+
* identity so the wallet's own credits pay — `signMessage` returns the `0x` EIP-191 signature. */
|
|
91
|
+
export type RemoteEthUpload = {
|
|
92
|
+
address: Address;
|
|
93
|
+
signMessage: (message: Uint8Array) => Promise<string>;
|
|
94
|
+
};
|
|
95
|
+
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
|
|
96
|
+
onChain?: boolean, // true (--onchain-uri): put the image ON-CHAIN (inline SVG) so it self-resolves
|
|
97
|
+
remoteEth?: RemoteEthUpload, // wallet-lane Turbo uploads: sign+pay with the connected browser wallet
|
|
98
|
+
walletAddr?: string): Promise<{
|
|
99
|
+
tokenFields: OnChainFieldInput[];
|
|
100
|
+
contentNote: string;
|
|
101
|
+
}>;
|
|
102
|
+
/**
|
|
103
|
+
* Real OpenSea traits supplied by the creator, from `--attributes <file.json>` (canonical array or
|
|
104
|
+
* `{name: value}` map) and/or `--traits "Background=Blue; Edition=3"` (quick inline form). These are
|
|
105
|
+
* the marketplace trait array — NOT a place for protocol facts. Empty when neither flag is given.
|
|
106
|
+
*/
|
|
107
|
+
export declare function parseDeployTraits(flags: Flags): OpenSeaAttribute[];
|
|
108
|
+
/** Encode creator traits as the on-chain `attributes` field (inline JSON bytes) — for `--traits-onchain`. */
|
|
109
|
+
export declare const attributesInlineField: (attrs: OpenSeaAttribute[]) => OnChainFieldInput;
|
|
110
|
+
/** Warn when IPFS/Arweave custody is pointed at a LOCAL gateway: the served image URL
|
|
111
|
+
* (`<gateway>/ipfs/<cid>`) would resolve only on this machine, so marketplaces/wallets can't
|
|
112
|
+
* load it — a pinning service + a PUBLIC gateway is part of operating off-chain custody. */
|
|
113
|
+
export declare function localGatewayWarning(flags: Flags): string | null;
|
|
114
|
+
/** A readout line for an optional creator text field — states exactly what's written (and where),
|
|
115
|
+
* or that NOTHING is, so the deploy never silently invents one. */
|
|
116
|
+
export declare function describeDeployField(label: string, value: string | undefined, onchain: boolean): string;
|
|
117
|
+
/** Readout lines for whichever authorship/rights fields a deploy will write (always on-chain,
|
|
118
|
+
* inline collection fields). Empty when none are set — so the readout stays quiet by default. */
|
|
119
|
+
export declare function authorshipReadout(flags: Flags): string[];
|
|
120
|
+
/** A readout line for creator traits — the exact traits written (and where), or that none are. */
|
|
121
|
+
export declare function describeTraits(traits: OpenSeaAttribute[], onchain: boolean): string;
|
|
122
|
+
export declare function cmdDeploy(flags: Flags, serveAfter: boolean): Promise<void>;
|
|
123
|
+
export declare function cmdDeployBody(flags: Flags, serveAfter: boolean, emit: (p: Record<string, unknown>) => void): Promise<void>;
|
|
124
|
+
export declare function cmdDeployOneOfOneEditionBody(flags: Flags, emit: (p: Record<string, unknown>) => void): Promise<void>;
|
|
125
|
+
export declare const tokenFieldOf: (tokenId: number, f: OnChainFieldInput) => SeriesTokenFieldInput;
|
|
126
|
+
export declare function cmdDeploySeries(flags: Flags): Promise<void>;
|
|
127
|
+
export declare function cmdDeploySeriesBody(flags: Flags, emit: (p: Record<string, unknown>) => void): Promise<void>;
|
|
128
|
+
export declare function cmdDeployEditionImageBody(flags: Flags, emit: (p: Record<string, unknown>) => void): Promise<void>;
|
|
129
|
+
/**
|
|
130
|
+
* `abx deploy-code` — deploy a code project ({SeriesCode}) end to end, hot lane:
|
|
131
|
+
* the canonical factory + seed source from the manifest, fat initialize (the `code`
|
|
132
|
+
* field rides it in directory mode), then ONE post-deploy multicall for the script
|
|
133
|
+
* chunks (template mode) + any PostParam schemas, optional reserve mints, and local
|
|
134
|
+
* register + index. Grown directly from the Sepolia drop rehearsal
|
|
135
|
+
* (`packages/cli/scripts/code-drop-rehearsal.ts`).
|
|
136
|
+
*
|
|
137
|
+
* Modes (exactly one):
|
|
138
|
+
* --script <file> template mode — the program stored on-chain in chunks
|
|
139
|
+
* --code-dir <dir> directory mode — the build uploaded via the storage backend
|
|
140
|
+
* (`putDirectory`; ipfs/arweave), its root as the `code` field
|
|
141
|
+
*
|
|
142
|
+
* Schemas: --schema key:Type:Auth[,key:Type:Auth…] (e.g. palette:HexColor:TokenOwner).
|
|
143
|
+
* Seeds: canonical randomizer by default; --no-seed opts out.
|
|
144
|
+
*/
|
|
145
|
+
/**
|
|
146
|
+
* The deterministic part of a projection: everything that is a pure function of the chain.
|
|
147
|
+
* Deliberately EXCLUDES `reconstructedAt`, `rpcUrl` and `toBlock` — a timestamp, the endpoint that
|
|
148
|
+
* happened to answer, and the head at scan time all legitimately differ between two replays, so
|
|
149
|
+
* folding them in would make the rebuild proof fail for reasons that aren't about correctness.
|
|
150
|
+
*/
|
|
151
|
+
export declare function projectionFingerprint(s: ProjectState): string;
|
|
152
|
+
/**
|
|
153
|
+
* Print the reconstructed spine — the point being that this list IS the database. Rendered inside
|
|
154
|
+
* the index step (no header of its own: "Index it — replay the event spine" immediately followed by
|
|
155
|
+
* a separate "The event spine" step read as a stutter).
|
|
156
|
+
*/
|
|
157
|
+
export declare function walkthroughSpine(state: ProjectState): void;
|
|
158
|
+
/**
|
|
159
|
+
* [4] The claim, demonstrated: delete the local projection and rebuild it from the chain.
|
|
160
|
+
*
|
|
161
|
+
* This is the one step that can't be faked by good output — it drops the projection for real
|
|
162
|
+
* (registration kept), confirms it's gone, replays from the deploy block, and compares a
|
|
163
|
+
* fingerprint of everything chain-derived. If ABX's premise is wrong, this step fails loudly.
|
|
164
|
+
*/
|
|
165
|
+
export declare function walkthroughRebuild(indexer: SelfHostIndexer, address: Address, before: ProjectState): Promise<void>;
|
|
166
|
+
/**
|
|
167
|
+
* [5] Read the token back the way a marketplace would.
|
|
168
|
+
*
|
|
169
|
+
* Which is genuinely a different act per lane, so it reads from the real source in each case rather
|
|
170
|
+
* than always going through the local server:
|
|
171
|
+
* • fully on-chain → call `tokenURI(0)` on the contract. That IS what a marketplace does, and on
|
|
172
|
+
* this lane the whole answer (art included) comes back from the chain with nothing else running.
|
|
173
|
+
* • off-chain custody → fetch the resolver, because that's what the baked URI points at.
|
|
174
|
+
* Reading the on-chain lane over HTTP would have quietly implied the local server was load-bearing
|
|
175
|
+
* when it isn't — the opposite of the lesson.
|
|
176
|
+
*/
|
|
177
|
+
export declare function walkthroughReadBack(state: ProjectState, baseUrl: string, onChainUri: boolean): Promise<void>;
|
|
178
|
+
/** Every flag `deploy-code` recognizes — so an unsupported/typo'd one warns instead of silently
|
|
179
|
+
* no-opping. Keep in lockstep with the flags read below + the storageOverrides/lane helpers. */
|
|
180
|
+
export declare const DEPLOY_CODE_FLAGS: Set<string>;
|
|
181
|
+
export declare const SHARED_DEPLOY_FLAGS: string[];
|
|
182
|
+
export declare const DEPLOY_FLAGS: Set<string>;
|
|
183
|
+
export declare const DEPLOY_SERIES_FLAGS: Set<string>;
|
|
184
|
+
export declare const DEPLOY_EDITION_FLAGS: Set<string>;
|
|
185
|
+
export declare const DEPLOY_SERIES_EDITION_FLAGS: Set<string>;
|
|
186
|
+
export declare function cmdDeployCode(flags: Flags): Promise<void>;
|
|
187
|
+
export declare function cmdDeployCodeBody(flags: Flags, emit: (p: Record<string, unknown>) => void): Promise<void>;
|
|
188
|
+
export declare const DEPLOY_CODE_EDITION_FLAGS: Set<string>;
|
|
189
|
+
export declare function cmdDeployEditionCodeBody(flags: Flags, emit: (p: Record<string, unknown>) => void): Promise<void>;
|
|
190
|
+
/**
|
|
191
|
+
* Resolve `--721c` into the InitParams `transferValidator`. Absent → `zeroAddress`: a plain
|
|
192
|
+
* ERC-721 (or, on an edition deploy, a plain ERC-1155), byte-for-byte the pre-721C deploy — no
|
|
193
|
+
* prompts, no output, no mention of 721C. `--721c` / `--721c recommended` → the per-chain
|
|
194
|
+
* recommended validator (refused, naming the chains that have one, when the manifest has no
|
|
195
|
+
* entry); `--721c 0x…` → checksum-validated AND pre-checked for code on this chain (the factory
|
|
196
|
+
* would revert `InvalidTransferValidator()` — surface it before any upload/staging/gas). When
|
|
197
|
+
* enrolling, prints the one plain statement of what enforcement means — once, adapted to the
|
|
198
|
+
* chosen validator.
|
|
199
|
+
*
|
|
200
|
+
* `standard` picks only the WORDING (`ERC-721C` vs `ERC-1155C`) — the flag, the value grammar, and
|
|
201
|
+
* the resolved validator address are identical either way (the SAME `InitParams.transferValidator`
|
|
202
|
+
* opt-in per the parity plan's locked decision 3: 1155C ships with the same UX as 721C). Editions
|
|
203
|
+
* pass `'1155C'`; every 721 call site keeps the default, so their output is unchanged.
|
|
204
|
+
*/
|
|
205
|
+
export declare function resolveTransferValidatorFlag(flags: Flags, publicClient: PublicClient, dryRun: boolean, standard?: '721C' | '1155C'): Promise<Address>;
|
|
206
|
+
//# 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,EAKZ,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,YAAY,EAKjB,KAAK,qBAAqB,EAgD3B,MAAM,oBAAoB,CAAC;AAY5B,OAAO,EAAC,KAAK,GAAG,EAAyC,MAAM,MAAM,CAAC;AACtE,OAAO,EAGL,KAAK,gBAAgB,EAmBtB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAC,KAAK,KAAK,EAA8E,MAAM,aAAa,CAAC;AAqDpH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAC,CAGzE,CAAC;AACF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOrD;AAQD;;;gEAGgE;AAChE,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAQ3D;AAED;;;0CAG0C;AAC1C,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED;oFACoF;AACpF,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAG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