@artblocks/abx-sdk 0.1.0-alpha.0 → 0.1.0-alpha.10
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/README.md +131 -0
- package/dist/abi/generated.d.ts +585 -12
- package/dist/abi/generated.d.ts.map +1 -1
- package/dist/abi/generated.js +16 -16
- package/dist/abi/generated.js.map +1 -1
- package/dist/abi/index.d.ts +209 -12
- package/dist/abi/index.d.ts.map +1 -1
- package/dist/anchors.d.ts +150 -0
- package/dist/anchors.d.ts.map +1 -0
- package/dist/anchors.js +290 -0
- package/dist/anchors.js.map +1 -0
- package/dist/chains.d.ts +34 -9
- package/dist/chains.d.ts.map +1 -1
- package/dist/chains.js +45 -18
- package/dist/chains.js.map +1 -1
- package/dist/chunks.d.ts +53 -23
- package/dist/chunks.d.ts.map +1 -1
- package/dist/chunks.js +68 -6
- package/dist/chunks.js.map +1 -1
- package/dist/clients.d.ts +23 -11
- package/dist/clients.d.ts.map +1 -1
- package/dist/clients.js +17 -18
- package/dist/clients.js.map +1 -1
- package/dist/creator-token.d.ts +65 -0
- package/dist/creator-token.d.ts.map +1 -0
- package/dist/creator-token.js +93 -0
- package/dist/creator-token.js.map +1 -0
- package/dist/deploy.d.ts +24 -10
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +62 -87
- package/dist/deploy.js.map +1 -1
- package/dist/deployments.d.ts.map +1 -1
- package/dist/deployments.js +38 -22
- package/dist/deployments.js.map +1 -1
- package/dist/deps.d.ts +38 -0
- package/dist/deps.d.ts.map +1 -1
- package/dist/deps.js +70 -1
- package/dist/deps.js.map +1 -1
- package/dist/env.d.ts +11 -0
- package/dist/env.d.ts.map +1 -1
- package/dist/env.js +42 -2
- package/dist/env.js.map +1 -1
- package/dist/errors.d.ts +63 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +85 -0
- package/dist/errors.js.map +1 -0
- package/dist/execute.d.ts +115 -0
- package/dist/execute.d.ts.map +1 -0
- package/dist/execute.js +142 -0
- package/dist/execute.js.map +1 -0
- package/dist/index.d.ts +13 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/dist/inspect.d.ts +48 -0
- package/dist/inspect.d.ts.map +1 -0
- package/dist/inspect.js +290 -0
- package/dist/inspect.js.map +1 -0
- package/dist/migrate.d.ts +41 -0
- package/dist/migrate.d.ts.map +1 -0
- package/dist/migrate.js +140 -0
- package/dist/migrate.js.map +1 -0
- package/dist/node.d.ts +13 -0
- package/dist/node.d.ts.map +1 -0
- package/dist/node.js +13 -0
- package/dist/node.js.map +1 -0
- package/dist/onchain-uri.d.ts +96 -0
- package/dist/onchain-uri.d.ts.map +1 -0
- package/dist/onchain-uri.js +231 -0
- package/dist/onchain-uri.js.map +1 -0
- package/dist/ops.d.ts +113 -5
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +172 -13
- package/dist/ops.js.map +1 -1
- package/dist/reconstruct.d.ts +20 -1
- package/dist/reconstruct.d.ts.map +1 -1
- package/dist/reconstruct.js +124 -50
- package/dist/reconstruct.js.map +1 -1
- package/dist/resume.d.ts +96 -0
- package/dist/resume.d.ts.map +1 -0
- package/dist/resume.js +95 -0
- package/dist/resume.js.map +1 -0
- package/dist/service.d.ts +369 -0
- package/dist/service.d.ts.map +1 -0
- package/dist/service.js +376 -0
- package/dist/service.js.map +1 -0
- package/dist/staging.d.ts +95 -0
- package/dist/staging.d.ts.map +1 -0
- package/dist/staging.js +57 -0
- package/dist/staging.js.map +1 -0
- package/dist/tokendata.d.ts +62 -2
- package/dist/tokendata.d.ts.map +1 -1
- package/dist/tokendata.js +60 -16
- package/dist/tokendata.js.map +1 -1
- package/dist/tokens.d.ts +55 -0
- package/dist/tokens.d.ts.map +1 -0
- package/dist/tokens.js +152 -0
- package/dist/tokens.js.map +1 -0
- package/dist/util.d.ts +59 -0
- package/dist/util.d.ts.map +1 -0
- package/dist/util.js +89 -0
- package/dist/util.js.map +1 -0
- package/package.json +10 -2
package/dist/deploy.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type Address, type Hex, type PublicClient } from 'viem';
|
|
2
|
+
import type { SendTx } from './execute.js';
|
|
2
3
|
/** One on-chain metadata field to set at deploy (bytes32 `field`/`representation`, bytes `value`). */
|
|
3
4
|
export interface OnChainFieldInput {
|
|
4
5
|
field: Hex;
|
|
@@ -23,6 +24,11 @@ export interface OneOfOneInitParams {
|
|
|
23
24
|
contractURIRenderer: Address;
|
|
24
25
|
royaltyReceiver: Address;
|
|
25
26
|
royaltyBps: number;
|
|
27
|
+
/** `zeroAddress` = plain ERC-721 (the default — no trace of 721C, ever); non-zero = permanent
|
|
28
|
+
* ERC-721C enrollment with that transfer validator (must have code on-chain, else the deploy
|
|
29
|
+
* reverts `InvalidTransferValidator()`). Enrollment is deploy-time-only and irreversible —
|
|
30
|
+
* the owner can later re-point or suspend (zero) the validator, never un-enroll. */
|
|
31
|
+
transferValidator: Address;
|
|
26
32
|
/** Optional on-chain metadata fields for token 0 and for the collection. */
|
|
27
33
|
tokenFields: OnChainFieldInput[];
|
|
28
34
|
contractFields: OnChainFieldInput[];
|
|
@@ -47,6 +53,11 @@ export interface SeriesInitParams {
|
|
|
47
53
|
contractURIRenderer: Address;
|
|
48
54
|
royaltyReceiver: Address;
|
|
49
55
|
royaltyBps: number;
|
|
56
|
+
/** `zeroAddress` = plain ERC-721 (the default — no trace of 721C, ever); non-zero = permanent
|
|
57
|
+
* ERC-721C enrollment with that transfer validator (must have code on-chain, else the deploy
|
|
58
|
+
* reverts `InvalidTransferValidator()`). Enrollment is deploy-time-only and irreversible —
|
|
59
|
+
* the owner can later re-point or suspend (zero) the validator, never un-enroll. */
|
|
60
|
+
transferValidator: Address;
|
|
50
61
|
/** Series size N (> 0): the supply cap. Monotonically non-increasing after deploy. */
|
|
51
62
|
maxInvocations: bigint | number;
|
|
52
63
|
/** Primary-sale payout destination (`0x0` = none). */
|
|
@@ -98,7 +109,7 @@ export declare function saltGuard(salt: Hex): Address;
|
|
|
98
109
|
* once deployed, its address is what platforms allowlist. Deploy this once per
|
|
99
110
|
* (chain, core version) and reuse it for every clone.
|
|
100
111
|
*/
|
|
101
|
-
export declare function deployFactory(
|
|
112
|
+
export declare function deployFactory(send: SendTx, publicClient: PublicClient): Promise<DeployResult<'factory'> & {
|
|
102
113
|
factory: Address;
|
|
103
114
|
implementation: Address;
|
|
104
115
|
}>;
|
|
@@ -107,7 +118,7 @@ export declare function deployFactory(wallet: WalletClient, account: Account, pu
|
|
|
107
118
|
* Ownerless and immutable; the sibling of `deployFactory`. Deploy once per (chain, core
|
|
108
119
|
* version). The shared renderer + chunk store are reused (deploy them separately).
|
|
109
120
|
*/
|
|
110
|
-
export declare function deploySeriesFactory(
|
|
121
|
+
export declare function deploySeriesFactory(send: SendTx, publicClient: PublicClient): Promise<DeployResult<'seriesFactory'> & {
|
|
111
122
|
factory: Address;
|
|
112
123
|
implementation: Address;
|
|
113
124
|
}>;
|
|
@@ -116,9 +127,12 @@ export declare function deploySeriesFactory(wallet: WalletClient, account: Accou
|
|
|
116
127
|
* delegatecalled write-path libraries first ({AbxParamsLib}, {AbxCodeLib}), the factory
|
|
117
128
|
* bytecode LINKED against them (solc placeholders replaced — what forge does at build
|
|
118
129
|
* time, done here so a sandbox/fresh chain needs no forge), then the factory (whose
|
|
119
|
-
* constructor deploys the {SeriesCode} implementation).
|
|
130
|
+
* constructor deploys the {SeriesCode} implementation). Each of the three deploys is a
|
|
131
|
+
* plain contract creation (no canonical/CREATE2 address — the libraries' addresses are
|
|
132
|
+
* nonce-dependent, so there is nothing to predict), sent through `send` in order since the
|
|
133
|
+
* factory's bytecode can only be linked once the two library addresses are known.
|
|
120
134
|
*/
|
|
121
|
-
export declare function deploySeriesCodeFactory(
|
|
135
|
+
export declare function deploySeriesCodeFactory(send: SendTx, publicClient: PublicClient): Promise<{
|
|
122
136
|
factory: Address;
|
|
123
137
|
implementation: Address;
|
|
124
138
|
paramsLib: Address;
|
|
@@ -130,7 +144,7 @@ export declare function deploySeriesCodeFactory(wallet: WalletClient, account: A
|
|
|
130
144
|
* keyless proxy + canonical salt → the SAME address on every chain (matches `DeploySeedSource.s.sol`
|
|
131
145
|
* and the manifest). The seed source is single-profile, so — unlike the SeriesCode factory — the
|
|
132
146
|
* SDK's bytecode is the canonical one. */
|
|
133
|
-
export declare function deploySeedSource(
|
|
147
|
+
export declare function deploySeedSource(send: SendTx, publicClient: PublicClient): Promise<{
|
|
134
148
|
seedSource: Address;
|
|
135
149
|
txHash: Hex;
|
|
136
150
|
}>;
|
|
@@ -140,7 +154,7 @@ export declare function deploySeedSource(wallet: WalletClient, account: Account,
|
|
|
140
154
|
* their URI-renderer config. It reads each token's on-chain fields and returns a
|
|
141
155
|
* `data:application/json` URI, so a token using it resolves with zero off-chain infra.
|
|
142
156
|
*/
|
|
143
|
-
export declare function deployRenderer(
|
|
157
|
+
export declare function deployRenderer(send: SendTx, publicClient: PublicClient): Promise<DeployResult<'renderer'> & {
|
|
144
158
|
renderer: Address;
|
|
145
159
|
specVersion: bigint;
|
|
146
160
|
}>;
|
|
@@ -150,7 +164,7 @@ export declare function deployRenderer(wallet: WalletClient, account: Account, p
|
|
|
150
164
|
* (config is keyed by token address, authority defers to each token's owner). Sibling of
|
|
151
165
|
* `deployRenderer` — ownerless, no constructor args, safe for any funded signer to stand up.
|
|
152
166
|
*/
|
|
153
|
-
export declare function deployFixedPriceMinter(
|
|
167
|
+
export declare function deployFixedPriceMinter(send: SendTx, publicClient: PublicClient): Promise<DeployResult<'fixedPriceMinter'> & {
|
|
154
168
|
minter: Address;
|
|
155
169
|
}>;
|
|
156
170
|
/**
|
|
@@ -168,7 +182,7 @@ export declare function predictClone(publicClient: PublicClient, args: {
|
|
|
168
182
|
* address (so URIs can be baked in before deploy). Returns the clone address and
|
|
169
183
|
* the block it landed in — the indexer's start block.
|
|
170
184
|
*/
|
|
171
|
-
export declare function deployOneOfOne(
|
|
185
|
+
export declare function deployOneOfOne(send: SendTx, publicClient: PublicClient, args: {
|
|
172
186
|
factory: Address;
|
|
173
187
|
params: OneOfOneInitParams;
|
|
174
188
|
salt: Hex;
|
|
@@ -182,7 +196,7 @@ export declare function deployOneOfOne(wallet: WalletClient, account: Account |
|
|
|
182
196
|
* computes with its own implementation. `params.mintCount`/`mintTo` decide the deploy-time
|
|
183
197
|
* mint; anything larger mints post-deploy under a gas budget.
|
|
184
198
|
*/
|
|
185
|
-
export declare function deploySeries(
|
|
199
|
+
export declare function deploySeries(send: SendTx, publicClient: PublicClient, args: {
|
|
186
200
|
factory: Address;
|
|
187
201
|
params: SeriesInitParams;
|
|
188
202
|
salt: Hex;
|
package/dist/deploy.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../src/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../src/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,KAAK,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,YAAY,EAAqB,MAAM,MAAM,CAAC;AAoB3H,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAEzC,sGAAsG;AACtG,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,GAAG,CAAC;IACX,cAAc,EAAE,GAAG,CAAC;IACpB,KAAK,EAAE,GAAG,CAAC;CACZ;AAED,0EAA0E;AAC1E,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,OAAO,CAAC;IACf,mGAAmG;IACnG,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf;gFAC4E;IAC5E,YAAY,EAAE,MAAM,CAAC;IACrB,mFAAmF;IACnF,gBAAgB,EAAE,OAAO,CAAC;IAC1B,2FAA2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AAO,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,gBAAgB,CAAC;IAAC,IAAI,EAAE,GAAG,CAAA;CAAC,GAC5D,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG;IAAC,KAAK,EAAE,OAAO,CAAA;CAAC,CAAC,CAKnD"}
|
package/dist/deploy.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { concat, getAddress, toHex, zeroAddress, keccak256, toBytes
|
|
2
|
-
import { oneOfOneImageFactoryAbi,
|
|
3
|
-
import {
|
|
1
|
+
import { concat, getAddress, toHex, zeroAddress, keccak256, toBytes } from 'viem';
|
|
2
|
+
import { oneOfOneImageFactoryAbi, seriesImageFactoryAbi, abxMetadataRendererAbi, seriesCodeFactoryAbi, seriesCodeFactoryBytecode, abxParamsLibBytecode, abxCodeLibBytecode, } from './abi/index.js';
|
|
3
|
+
import { predictRenderer, predictFixedPriceMinter, predictSeedSource } from './create2.js';
|
|
4
|
+
import { prepareDeployFactory, prepareDeploySeriesFactory, prepareDeployRenderer, prepareDeployFixedPriceMinter, prepareDeploySeedSource, prepareDeployOneOfOne, prepareDeploySeries, } from './ops.js';
|
|
4
5
|
/** 12 bytes of entropy — the non-guard tail of a deterministic-deploy salt. */
|
|
5
6
|
function entropy12() {
|
|
6
7
|
return toHex(crypto.getRandomValues(new Uint8Array(12)));
|
|
@@ -29,20 +30,19 @@ export function permissionlessSalt(entropy = entropy12()) {
|
|
|
29
30
|
export function saltGuard(salt) {
|
|
30
31
|
return getAddress(`0x${salt.slice(2, 42)}`);
|
|
31
32
|
}
|
|
33
|
+
/** The chain id a `PublicClient` is bound to — `makePublicClient` always sets `.chain`, but a
|
|
34
|
+
* caller-constructed one might not, so fall back to the live read rather than assume. */
|
|
35
|
+
async function chainIdOf(publicClient) {
|
|
36
|
+
return publicClient.chain?.id ?? (await publicClient.getChainId());
|
|
37
|
+
}
|
|
32
38
|
/**
|
|
33
39
|
* Deploy the canonical clone factory — the trust anchor. Ownerless and immutable;
|
|
34
40
|
* once deployed, its address is what platforms allowlist. Deploy this once per
|
|
35
41
|
* (chain, core version) and reuse it for every clone.
|
|
36
42
|
*/
|
|
37
|
-
export async function deployFactory(
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
bytecode: oneOfOneImageFactoryBytecode,
|
|
41
|
-
account,
|
|
42
|
-
chain: wallet.chain,
|
|
43
|
-
args: [],
|
|
44
|
-
});
|
|
45
|
-
const receipt = await publicClient.waitForTransactionReceipt({ hash: txHash });
|
|
43
|
+
export async function deployFactory(send, publicClient) {
|
|
44
|
+
const chainId = await chainIdOf(publicClient);
|
|
45
|
+
const receipt = await send(prepareDeployFactory({ chainId }));
|
|
46
46
|
if (!receipt.contractAddress)
|
|
47
47
|
throw new Error('Factory deploy produced no contract address');
|
|
48
48
|
const factory = receipt.contractAddress;
|
|
@@ -51,22 +51,16 @@ export async function deployFactory(wallet, account, publicClient) {
|
|
|
51
51
|
abi: oneOfOneImageFactoryAbi,
|
|
52
52
|
functionName: 'implementation',
|
|
53
53
|
}));
|
|
54
|
-
return { factory, implementation, txHash, blockNumber: receipt.blockNumber };
|
|
54
|
+
return { factory, implementation, txHash: receipt.transactionHash, blockNumber: receipt.blockNumber };
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* Deploy the canonical Series clone factory — the trust anchor for multi-token drops.
|
|
58
58
|
* Ownerless and immutable; the sibling of `deployFactory`. Deploy once per (chain, core
|
|
59
59
|
* version). The shared renderer + chunk store are reused (deploy them separately).
|
|
60
60
|
*/
|
|
61
|
-
export async function deploySeriesFactory(
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
bytecode: seriesImageFactoryBytecode,
|
|
65
|
-
account,
|
|
66
|
-
chain: wallet.chain,
|
|
67
|
-
args: [],
|
|
68
|
-
});
|
|
69
|
-
const receipt = await publicClient.waitForTransactionReceipt({ hash: txHash });
|
|
61
|
+
export async function deploySeriesFactory(send, publicClient) {
|
|
62
|
+
const chainId = await chainIdOf(publicClient);
|
|
63
|
+
const receipt = await send(prepareDeploySeriesFactory({ chainId }));
|
|
70
64
|
if (!receipt.contractAddress)
|
|
71
65
|
throw new Error('Series factory deploy produced no contract address');
|
|
72
66
|
const factory = receipt.contractAddress;
|
|
@@ -75,7 +69,7 @@ export async function deploySeriesFactory(wallet, account, publicClient) {
|
|
|
75
69
|
abi: seriesImageFactoryAbi,
|
|
76
70
|
functionName: 'implementation',
|
|
77
71
|
}));
|
|
78
|
-
return { factory, implementation, txHash, blockNumber: receipt.blockNumber };
|
|
72
|
+
return { factory, implementation, txHash: receipt.transactionHash, blockNumber: receipt.blockNumber };
|
|
79
73
|
}
|
|
80
74
|
/** The solc link placeholder for a fully-qualified library name: `__$<keccak(fqn)[0:34]>$__`. */
|
|
81
75
|
function libPlaceholder(fullyQualified) {
|
|
@@ -86,18 +80,21 @@ function libPlaceholder(fullyQualified) {
|
|
|
86
80
|
* delegatecalled write-path libraries first ({AbxParamsLib}, {AbxCodeLib}), the factory
|
|
87
81
|
* bytecode LINKED against them (solc placeholders replaced — what forge does at build
|
|
88
82
|
* time, done here so a sandbox/fresh chain needs no forge), then the factory (whose
|
|
89
|
-
* constructor deploys the {SeriesCode} implementation).
|
|
83
|
+
* constructor deploys the {SeriesCode} implementation). Each of the three deploys is a
|
|
84
|
+
* plain contract creation (no canonical/CREATE2 address — the libraries' addresses are
|
|
85
|
+
* nonce-dependent, so there is nothing to predict), sent through `send` in order since the
|
|
86
|
+
* factory's bytecode can only be linked once the two library addresses are known.
|
|
90
87
|
*/
|
|
91
|
-
export async function deploySeriesCodeFactory(
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
const receipt = await
|
|
88
|
+
export async function deploySeriesCodeFactory(send, publicClient) {
|
|
89
|
+
const chainId = await chainIdOf(publicClient);
|
|
90
|
+
const deployRaw = async (op, bytecode, summary) => {
|
|
91
|
+
const receipt = await send({ op, to: null, data: bytecode, value: '0x0', chainId, summary, fields: {} });
|
|
95
92
|
if (!receipt.contractAddress)
|
|
96
|
-
throw new Error(
|
|
97
|
-
return { address: receipt.contractAddress, hash };
|
|
93
|
+
throw new Error(`${op} deploy produced no contract address`);
|
|
94
|
+
return { address: receipt.contractAddress, hash: receipt.transactionHash };
|
|
98
95
|
};
|
|
99
|
-
const { address: paramsLib } = await deployRaw(abxParamsLibBytecode);
|
|
100
|
-
const { address: codeLib } = await deployRaw(abxCodeLibBytecode);
|
|
96
|
+
const { address: paramsLib } = await deployRaw('deploy-params-lib', abxParamsLibBytecode, 'Deploy AbxParamsLib (SeriesCode write-path library)');
|
|
97
|
+
const { address: codeLib } = await deployRaw('deploy-code-lib', abxCodeLibBytecode, 'Deploy AbxCodeLib (SeriesCode write-path library)');
|
|
101
98
|
const linked = seriesCodeFactoryBytecode
|
|
102
99
|
.split(libPlaceholder('src/libraries/AbxParamsLib.sol:AbxParamsLib'))
|
|
103
100
|
.join(paramsLib.slice(2).toLowerCase())
|
|
@@ -105,8 +102,15 @@ export async function deploySeriesCodeFactory(wallet, account, publicClient) {
|
|
|
105
102
|
.join(codeLib.slice(2).toLowerCase());
|
|
106
103
|
if (linked.includes('__$'))
|
|
107
104
|
throw new Error('unlinked library placeholder remains in SeriesCodeFactory bytecode');
|
|
108
|
-
const
|
|
109
|
-
|
|
105
|
+
const receipt = await send({
|
|
106
|
+
op: 'deploy-series-code-factory',
|
|
107
|
+
to: null,
|
|
108
|
+
data: linked,
|
|
109
|
+
value: '0x0',
|
|
110
|
+
chainId,
|
|
111
|
+
summary: 'Deploy the SeriesCode clone factory (trust anchor), linked against AbxParamsLib/AbxCodeLib',
|
|
112
|
+
fields: { paramsLib, codeLib },
|
|
113
|
+
});
|
|
110
114
|
if (!receipt.contractAddress)
|
|
111
115
|
throw new Error('SeriesCodeFactory deploy produced no contract address');
|
|
112
116
|
const factory = receipt.contractAddress;
|
|
@@ -115,22 +119,17 @@ export async function deploySeriesCodeFactory(wallet, account, publicClient) {
|
|
|
115
119
|
abi: seriesCodeFactoryAbi,
|
|
116
120
|
functionName: 'implementation',
|
|
117
121
|
}));
|
|
118
|
-
return { factory, implementation, paramsLib, codeLib, txHash, blockNumber: receipt.blockNumber };
|
|
122
|
+
return { factory, implementation, paramsLib, codeLib, txHash: receipt.transactionHash, blockNumber: receipt.blockNumber };
|
|
119
123
|
}
|
|
120
124
|
/** Deploy the canonical pseudorandom seed source (for chains without one shipped). CREATE2 via the
|
|
121
125
|
* keyless proxy + canonical salt → the SAME address on every chain (matches `DeploySeedSource.s.sol`
|
|
122
126
|
* and the manifest). The seed source is single-profile, so — unlike the SeriesCode factory — the
|
|
123
127
|
* SDK's bytecode is the canonical one. */
|
|
124
|
-
export async function deploySeedSource(
|
|
125
|
-
const
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
to: CREATE2_PROXY,
|
|
130
|
-
data: create2Calldata(ABX_SALT.seedSource, abxSeedSourceBytecode),
|
|
131
|
-
});
|
|
132
|
-
await publicClient.waitForTransactionReceipt({ hash: txHash });
|
|
133
|
-
return { seedSource, txHash };
|
|
128
|
+
export async function deploySeedSource(send, publicClient) {
|
|
129
|
+
const chainId = await chainIdOf(publicClient);
|
|
130
|
+
const seedSource = predictSeedSource();
|
|
131
|
+
const receipt = await send(prepareDeploySeedSource({ chainId }));
|
|
132
|
+
return { seedSource, txHash: receipt.transactionHash };
|
|
134
133
|
}
|
|
135
134
|
/**
|
|
136
135
|
* Deploy `AbxMetadataRenderer` — the canonical on-chain metadata renderer.
|
|
@@ -138,24 +137,19 @@ export async function deploySeedSource(wallet, account, publicClient) {
|
|
|
138
137
|
* their URI-renderer config. It reads each token's on-chain fields and returns a
|
|
139
138
|
* `data:application/json` URI, so a token using it resolves with zero off-chain infra.
|
|
140
139
|
*/
|
|
141
|
-
export async function deployRenderer(
|
|
140
|
+
export async function deployRenderer(send, publicClient) {
|
|
142
141
|
// CREATE2 via the keyless proxy + canonical salt → the SAME address on every chain (matches the
|
|
143
142
|
// forge `DeployRenderer` script and the manifest). Address is deterministic, so compute it (the
|
|
144
143
|
// tx targets the proxy, not a contract creation, so `receipt.contractAddress` is null).
|
|
145
|
-
const
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
-
chain: wallet.chain,
|
|
149
|
-
to: CREATE2_PROXY,
|
|
150
|
-
data: create2Calldata(ABX_SALT.renderer, abxMetadataRendererBytecode),
|
|
151
|
-
});
|
|
152
|
-
const receipt = await publicClient.waitForTransactionReceipt({ hash: txHash });
|
|
144
|
+
const chainId = await chainIdOf(publicClient);
|
|
145
|
+
const renderer = predictRenderer();
|
|
146
|
+
const receipt = await send(prepareDeployRenderer({ chainId }));
|
|
153
147
|
const specVersion = (await publicClient.readContract({
|
|
154
148
|
address: renderer,
|
|
155
149
|
abi: abxMetadataRendererAbi,
|
|
156
150
|
functionName: 'specVersion',
|
|
157
151
|
}));
|
|
158
|
-
return { renderer, specVersion, txHash, blockNumber: receipt.blockNumber };
|
|
152
|
+
return { renderer, specVersion, txHash: receipt.transactionHash, blockNumber: receipt.blockNumber };
|
|
159
153
|
}
|
|
160
154
|
/**
|
|
161
155
|
* Deploy `AbxFixedPriceMinter` — the canonical, ownerless, multi-tenant fixed-price sale
|
|
@@ -163,18 +157,13 @@ export async function deployRenderer(wallet, account, publicClient) {
|
|
|
163
157
|
* (config is keyed by token address, authority defers to each token's owner). Sibling of
|
|
164
158
|
* `deployRenderer` — ownerless, no constructor args, safe for any funded signer to stand up.
|
|
165
159
|
*/
|
|
166
|
-
export async function deployFixedPriceMinter(
|
|
160
|
+
export async function deployFixedPriceMinter(send, publicClient) {
|
|
167
161
|
// CREATE2 via the keyless proxy + canonical salt → the SAME address on every chain (matches the
|
|
168
162
|
// forge `DeployMinter` script and the manifest). Address is deterministic, so compute it.
|
|
169
|
-
const
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
to: CREATE2_PROXY,
|
|
174
|
-
data: create2Calldata(ABX_SALT.fixedPriceMinter, abxFixedPriceMinterBytecode),
|
|
175
|
-
});
|
|
176
|
-
const receipt = await publicClient.waitForTransactionReceipt({ hash: txHash });
|
|
177
|
-
return { minter, txHash, blockNumber: receipt.blockNumber };
|
|
163
|
+
const chainId = await chainIdOf(publicClient);
|
|
164
|
+
const minter = predictFixedPriceMinter();
|
|
165
|
+
const receipt = await send(prepareDeployFixedPriceMinter({ chainId }));
|
|
166
|
+
return { minter, txHash: receipt.transactionHash, blockNumber: receipt.blockNumber };
|
|
178
167
|
}
|
|
179
168
|
/**
|
|
180
169
|
* The address `deployOneOfOne` will produce for this (factory, salt). It's a pure
|
|
@@ -195,18 +184,11 @@ export async function predictClone(publicClient, args) {
|
|
|
195
184
|
* address (so URIs can be baked in before deploy). Returns the clone address and
|
|
196
185
|
* the block it landed in — the indexer's start block.
|
|
197
186
|
*/
|
|
198
|
-
export async function deployOneOfOne(
|
|
187
|
+
export async function deployOneOfOne(send, publicClient, args) {
|
|
199
188
|
const clone = await predictClone(publicClient, { factory: args.factory, salt: args.salt });
|
|
200
|
-
const
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
functionName: 'deployDeterministic',
|
|
204
|
-
args: [args.params, args.salt],
|
|
205
|
-
account,
|
|
206
|
-
});
|
|
207
|
-
const txHash = await wallet.writeContract(request);
|
|
208
|
-
const receipt = await publicClient.waitForTransactionReceipt({ hash: txHash });
|
|
209
|
-
return { clone, txHash, blockNumber: receipt.blockNumber };
|
|
189
|
+
const chainId = await chainIdOf(publicClient);
|
|
190
|
+
const receipt = await send(prepareDeployOneOfOne({ factory: args.factory, params: args.params, salt: args.salt, chainId, clone }));
|
|
191
|
+
return { clone, txHash: receipt.transactionHash, blockNumber: receipt.blockNumber };
|
|
210
192
|
}
|
|
211
193
|
/**
|
|
212
194
|
* Deploy a Series (multi-token) NFT as an immutable EIP-1167 clone, at a deterministic
|
|
@@ -215,17 +197,10 @@ export async function deployOneOfOne(wallet, account, publicClient, args) {
|
|
|
215
197
|
* computes with its own implementation. `params.mintCount`/`mintTo` decide the deploy-time
|
|
216
198
|
* mint; anything larger mints post-deploy under a gas budget.
|
|
217
199
|
*/
|
|
218
|
-
export async function deploySeries(
|
|
200
|
+
export async function deploySeries(send, publicClient, args) {
|
|
219
201
|
const clone = await predictClone(publicClient, { factory: args.factory, salt: args.salt });
|
|
220
|
-
const
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
functionName: 'deployDeterministic',
|
|
224
|
-
args: [args.params, args.salt],
|
|
225
|
-
account,
|
|
226
|
-
});
|
|
227
|
-
const txHash = await wallet.writeContract(request);
|
|
228
|
-
const receipt = await publicClient.waitForTransactionReceipt({ hash: txHash });
|
|
229
|
-
return { clone, txHash, blockNumber: receipt.blockNumber };
|
|
202
|
+
const chainId = await chainIdOf(publicClient);
|
|
203
|
+
const receipt = await send(prepareDeploySeries({ factory: args.factory, params: args.params, salt: args.salt, chainId, clone }));
|
|
204
|
+
return { clone, txHash: receipt.transactionHash, blockNumber: receipt.blockNumber };
|
|
230
205
|
}
|
|
231
206
|
//# sourceMappingURL=deploy.js.map
|
package/dist/deploy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../src/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../src/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAA6C,SAAS,EAAE,OAAO,EAAC,MAAM,MAAM,CAAC;AAC3H,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,yBAAyB,EACzB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAC,eAAe,EAAE,uBAAuB,EAAE,iBAAiB,EAAC,MAAM,cAAc,CAAC;AACzF,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,qBAAqB,EACrB,6BAA6B,EAC7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C,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAE/F;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAEhG;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAEzF;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAExF;AAED;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAG1D,CAAC;AAEF,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAEjG"}
|
package/dist/deployments.js
CHANGED
|
@@ -1,35 +1,51 @@
|
|
|
1
|
+
import { readEnv } from './util.js';
|
|
1
2
|
/**
|
|
2
3
|
* The cross-chain-identical set — CREATE2 (keyless proxy + `AbxSalts`), so these addresses are the
|
|
3
4
|
* SAME on every chain. Factory addresses list their EIP-1167 implementation; the implementations are
|
|
4
5
|
* identical cross-chain too (a factory does exactly one CREATE at nonce 1 from its own — identical —
|
|
5
|
-
* address). The renderer is spec
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* address). The renderer is spec v4 (on-chain param enumeration → `abx_params` in tokenURI, and
|
|
7
|
+
* inline/reader `animation_url` as a `data:text/html;base64` URI; v3 added the artifacts manifest +
|
|
8
|
+
* authorship/rights contractURI fields). SeriesCode's delegatecalled write-path libraries are also
|
|
9
|
+
* CREATE2-deterministic and identical everywhere:
|
|
10
|
+
* AbxParamsLib 0xdC8FeEDabd8B6f4F7819FD96F3ea34b7c2470817 (v3, externalized read surface — B22
|
|
11
|
+
* step 1; replaced 0xE26bFde1835D8c9ba6cd66c3C4eAE1B47EDA6130 v2, which replaced
|
|
12
|
+
* 0x7DAa26bADD99812a77384B461b6375e0c04F2865), AbxCodeLib 0xCd12078E81A3BDEACdcd57AE390f4D59F832766B.
|
|
9
13
|
*/
|
|
10
14
|
const CANONICAL = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
// 721C unit (2026-08-04): all three factories replaced — InitParams gained `transferValidator`
|
|
16
|
+
// (13 fields) and every token type composes the CreatorToken (ERC-721C) mixin. Projects deployed
|
|
17
|
+
// from the previous anchors keep working on their frozen implementations.
|
|
18
|
+
// replaced: factory 0xB9eEE39DB7D03E0b94CE403F69E928e2a5F134Ca (impl 0xf1F0893897CC19e75d829fa550a5228c5119cA39)
|
|
19
|
+
factory: '0xbc44F467083d0C10a843485876A839C239222605', // impl 0x76E856602EAEE8b9E41BF269BEfcE2B9d5EaFcA5
|
|
20
|
+
// replaced: seriesFactory 0x9d97C00100351682e6625961e033b6F43E60639A (impl 0x58D8b9F7ABa3043734cBeBfaa9c46875070E16ed)
|
|
21
|
+
seriesFactory: '0xA5B03A7CEc64E083523202d7264F03B2511baF75', // impl 0x38715c1cAedDAe6F445372cF4E8c79E92f8D6014
|
|
22
|
+
// replaced: seriesCodeFactory 0xADE45e2D5C45090b412008644867C737100F5503 (impl 0xd5f3db6418AA362e62431BC73B890632709fFfbB);
|
|
23
|
+
// the param-enumeration unit (2026-08-03) had replaced 0x77f61Ead461f368dbF3788EeFe9693bA5a73Bd87
|
|
24
|
+
// (impl 0xfd2034B6af517AD019f0dD7b007F07eF358D4053) — pre-enumeration projects stay on those.
|
|
25
|
+
seriesCodeFactory: '0x45bE6050553c96B6d4400f693DcB4eC595daF492', // impl 0xB505Eb888625dEC413F45F04824266485dd5e4E9
|
|
26
|
+
renderer: '0x65CB990249d11832b64Db5E3ceaC61f9104d803b', // spec v4; replaced 0x837A5cF907E7a6727B08acfE2A865F2bD5C50b1D (v3)
|
|
15
27
|
chunkStore: '0x03d3a962602093a937B96ee9C0b5C54cec3e701E',
|
|
16
28
|
fixedPriceMinter: '0xd970A2c936FFbb2130c2e4Ddf4245FF92465fEA5',
|
|
17
29
|
seedSource: '0x53eDFD2047e00C133378DEb430183DEE285E652e',
|
|
18
30
|
};
|
|
19
31
|
export const DEPLOYMENTS = {
|
|
20
32
|
// Sepolia (testnet) — CANONICAL infra + its own generator. Generator wired to AB's Sepolia
|
|
21
|
-
// dependency registry; default gateways ipfs.io / arweave.net.
|
|
33
|
+
// dependency registry; default gateways ipfs.io / arweave.net. Runtime asset pointers (SSTORE2):
|
|
34
|
+
// abxJsPointer 0x966FEe5a9079aA3461EBA78A60Ba554693037906, gunzipScriptPointer
|
|
35
|
+
// 0x957FBC14124db49222b90D7f2Ba594047B4F3D2C. Enumeration-reading generator; replaced
|
|
36
|
+
// 0x819D26830E1FbD1a3b383EcA1C24bc2770000910 (params.keys convention).
|
|
22
37
|
11155111: {
|
|
23
38
|
...CANONICAL,
|
|
24
|
-
generator: '
|
|
39
|
+
generator: '0xd6371ABbaA21D4363c413816038D576F37D45bEb',
|
|
25
40
|
},
|
|
26
41
|
// Base Sepolia (testnet) — same CANONICAL infra; its own generator (no AB DependencyRegistry on
|
|
27
42
|
// this chain, so deployed with defaultDependencyRegistry = address(0); collections point at
|
|
28
|
-
// their own). Runtime asset pointers (SSTORE2): abxJsPointer
|
|
29
|
-
// gunzipScriptPointer
|
|
43
|
+
// their own). Runtime asset pointers (SSTORE2): abxJsPointer 0x8FBAEea8Fdb5B7784756239D05747751D7F72044,
|
|
44
|
+
// gunzipScriptPointer 0xfc74aA86F18259204b3E2DcC4163dA5E54F927E6. Enumeration-reading generator;
|
|
45
|
+
// replaced 0x229337CA6A442b266BD43B7C70F0f24A2E378cB2 (params.keys convention).
|
|
30
46
|
84532: {
|
|
31
47
|
...CANONICAL,
|
|
32
|
-
generator: '
|
|
48
|
+
generator: '0x916288Ae2D9eEF81Db78EE8667a0ad6326dcC952',
|
|
33
49
|
},
|
|
34
50
|
};
|
|
35
51
|
/** The canonical deployment record for a chain (empty if the chain isn't shipped yet). */
|
|
@@ -41,28 +57,28 @@ function pick(override, env, manifest) {
|
|
|
41
57
|
return (override ?? env ?? manifest);
|
|
42
58
|
}
|
|
43
59
|
export function resolveFactory(chainId, override) {
|
|
44
|
-
return pick(override,
|
|
60
|
+
return pick(override, readEnv('ABX_FACTORY'), getDeployment(chainId).factory);
|
|
45
61
|
}
|
|
46
62
|
export function resolveSeriesFactory(chainId, override) {
|
|
47
|
-
return pick(override,
|
|
63
|
+
return pick(override, readEnv('ABX_SERIES_FACTORY'), getDeployment(chainId).seriesFactory);
|
|
48
64
|
}
|
|
49
65
|
export function resolveRenderer(chainId, override) {
|
|
50
|
-
return pick(override,
|
|
66
|
+
return pick(override, readEnv('ABX_RENDERER'), getDeployment(chainId).renderer);
|
|
51
67
|
}
|
|
52
68
|
export function resolveChunkStore(chainId, override) {
|
|
53
|
-
return pick(override,
|
|
69
|
+
return pick(override, readEnv('ABX_CHUNK_STORE'), getDeployment(chainId).chunkStore);
|
|
54
70
|
}
|
|
55
71
|
export function resolveFixedPriceMinter(chainId, override) {
|
|
56
|
-
return pick(override,
|
|
72
|
+
return pick(override, readEnv('ABX_FIXED_PRICE_MINTER'), getDeployment(chainId).fixedPriceMinter);
|
|
57
73
|
}
|
|
58
74
|
export function resolveSeriesCodeFactory(chainId, override) {
|
|
59
|
-
return pick(override,
|
|
75
|
+
return pick(override, readEnv('ABX_SERIES_CODE_FACTORY'), getDeployment(chainId).seriesCodeFactory);
|
|
60
76
|
}
|
|
61
77
|
export function resolveSeedSource(chainId, override) {
|
|
62
|
-
return pick(override,
|
|
78
|
+
return pick(override, readEnv('ABX_SEED_SOURCE'), getDeployment(chainId).seedSource);
|
|
63
79
|
}
|
|
64
80
|
export function resolveGenerator(chainId, override) {
|
|
65
|
-
return pick(override,
|
|
81
|
+
return pick(override, readEnv('ABX_GENERATOR'), getDeployment(chainId).generator);
|
|
66
82
|
}
|
|
67
83
|
/**
|
|
68
84
|
* The known `name@version` resolution roots per chain — Art Blocks' DependencyRegistryV0
|
|
@@ -76,6 +92,6 @@ export const AB_DEPENDENCY_REGISTRY = {
|
|
|
76
92
|
11155111: '0x5Fcc415BCFb164C5F826B5305274749BeB684e9b', // Sepolia
|
|
77
93
|
};
|
|
78
94
|
export function resolveDependencyRegistry(chainId, override) {
|
|
79
|
-
return pick(override,
|
|
95
|
+
return pick(override, readEnv('ABX_DEPENDENCY_REGISTRY'), AB_DEPENDENCY_REGISTRY[chainId]);
|
|
80
96
|
}
|
|
81
97
|
//# sourceMappingURL=deployments.js.map
|
package/dist/deployments.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployments.js","sourceRoot":"","sources":["../src/deployments.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deployments.js","sourceRoot":"","sources":["../src/deployments.ts"],"names":[],"mappings":"AA6BA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAalC;;;;;;;;;;;GAWG;AACH,MAAM,SAAS,GAAG;IAChB,+FAA+F;IAC/F,iGAAiG;IACjG,0EAA0E;IAC1E,iHAAiH;IACjH,OAAO,EAAE,4CAA4C,EAAE,kDAAkD;IACzG,uHAAuH;IACvH,aAAa,EAAE,4CAA4C,EAAE,kDAAkD;IAC/G,4HAA4H;IAC5H,kGAAkG;IAClG,8FAA8F;IAC9F,iBAAiB,EAAE,4CAA4C,EAAE,kDAAkD;IACnH,QAAQ,EAAE,4CAA4C,EAAE,oEAAoE;IAC5H,UAAU,EAAE,4CAA4C;IACxD,gBAAgB,EAAE,4CAA4C;IAC9D,UAAU,EAAE,4CAA4C;CACH,CAAC;AAExD,MAAM,CAAC,MAAM,WAAW,GAAoC;IAC1D,2FAA2F;IAC3F,iGAAiG;IACjG,+EAA+E;IAC/E,sFAAsF;IACtF,uEAAuE;IACvE,QAAQ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E,QAAiB;IACxE,OAAO,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,wBAAwB,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,gBAAgB,CAAC,CAAC;AACpG,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,OAAe,EAAE,QAAiB;IACzE,OAAO,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,yBAAyB,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,iBAAiB,CAAC,CAAC;AACtG,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,OAAe,EAAE,QAAiB;IAClE,OAAO,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,iBAAiB,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC;AACvF,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,OAAe,EAAE,QAAiB;IACjE,OAAO,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,eAAe,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC;AACpF,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAA4B;IAC7D,CAAC,EAAE,4CAA4C,EAAE,UAAU;IAC3D,QAAQ,EAAE,4CAA4C,EAAE,UAAU;CACnE,CAAC;AAEF,MAAM,UAAU,yBAAyB,CAAC,OAAe,EAAE,QAAiB;IAC1E,OAAO,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,yBAAyB,CAAC,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC;AAC7F,CAAC"}
|
package/dist/deps.d.ts
CHANGED
|
@@ -106,4 +106,42 @@ export interface DependencyReadClient {
|
|
|
106
106
|
* (a revert) or "check unavailable" (RPC down); this stays a pure read.
|
|
107
107
|
*/
|
|
108
108
|
export declare function readRegistryDependency(client: DependencyReadClient, registry: Address, ref: Hex): Promise<RegistryDependencyDetails | null>;
|
|
109
|
+
/**
|
|
110
|
+
* The registry pointer a deploy with ≥1 Registry-resolution dep should set: an explicit
|
|
111
|
+
* `--dep-registry` wins (validated), else the chain's known AB registry (env-overridable),
|
|
112
|
+
* else none — the caller WARNS and skips the leg (soft pointer; the resolver falls back to
|
|
113
|
+
* its built-in CDN map). Never a blocker.
|
|
114
|
+
*/
|
|
115
|
+
export declare function resolveDepRegistryPointer(flagValue: string | undefined, chainId: number): {
|
|
116
|
+
registry: Address | null;
|
|
117
|
+
source: 'flag' | 'default' | 'none';
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* The dependency legs of the setup multicall: one `setDependency(i, resolution, ref)` per
|
|
121
|
+
* dep in index order, plus the `setDependencyRegistry` leg when a pointer resolved. These
|
|
122
|
+
* ride the SAME atomic setup multicall as script chunks/schemas/mints, in every signing lane.
|
|
123
|
+
*/
|
|
124
|
+
export declare function dependencySetupCalls(deps: ParsedDependencyRef[], registry: Address | null): Hex[];
|
|
125
|
+
/** One dep's selection-time verdict (Registry-resolution deps only — OnChain refs never touch a registry). */
|
|
126
|
+
export type DepCheck = {
|
|
127
|
+
dep: string;
|
|
128
|
+
status: 'found';
|
|
129
|
+
details: RegistryDependencyDetails;
|
|
130
|
+
} | {
|
|
131
|
+
dep: string;
|
|
132
|
+
status: 'not-found';
|
|
133
|
+
} | {
|
|
134
|
+
dep: string;
|
|
135
|
+
status: 'skipped';
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* Best-effort existence/on-chain-ness check of every Registry-resolution dep against the
|
|
139
|
+
* pointer registry. A revert or an empty record ⇒ `not-found` (a warning — the owner may
|
|
140
|
+
* intend a custom registry). A transport failure ⇒ the remaining checks are `skipped` and
|
|
141
|
+
* `rpcOk: false` — one info line, never an error: the deploy proceeds regardless.
|
|
142
|
+
*/
|
|
143
|
+
export declare function checkRegistryDeps(client: DependencyReadClient, registry: Address, deps: ParsedDependencyRef[]): Promise<{
|
|
144
|
+
checks: DepCheck[];
|
|
145
|
+
rpcOk: boolean;
|
|
146
|
+
}>;
|
|
109
147
|
//# sourceMappingURL=deps.d.ts.map
|
package/dist/deps.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deps.d.ts","sourceRoot":"","sources":["../src/deps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"deps.d.ts","sourceRoot":"","sources":["../src/deps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAoC,KAAK,OAAO,EAAE,KAAK,GAAG,EAAC,MAAM,MAAM,CAAC;AAK/E,4EAA4E;AAC5E,eAAO,MAAM,cAAc;;;CAAqC,CAAC;AACjE,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEjF,oGAAoG;AACpG,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,aAAa,CAAC;IAC1B,GAAG,EAAE,GAAG,CAAC;IACT,OAAO,EAAE,MAAM,CAAC;CACjB;AAMD;;sFAEsF;AACtF,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,MAAM,GAAG,GAAG,CAahE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,mBAAmB,CAOrE;AAED;qFACqF;AACrF,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,aAAa,EAAE,GAAG,EAAE,GAAG,GAAG,MAAM,CAE/E;AAID;kGACkG;AAClG,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkB5B,CAAC;AAEX,wEAAwE;AACxE,MAAM,WAAW,yBAAyB;IACxC,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,MAAM,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