Skip to content

Commit 2175ad4

Browse files
committed
docs: cleanup jsdocs
1 parent 17b619f commit 2175ad4

File tree

6 files changed

+46
-46
lines changed

6 files changed

+46
-46
lines changed

packages/thirdweb/src/contract/deployment/utils/bootstrap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {
3434
* @returns An object containing:
3535
* - cloneFactoryContract: The factory contract used for creating clones
3636
* - implementationContract: The deployed implementation contract
37-
* @internal
37+
* @contract
3838
*/
3939
export async function getOrDeployInfraForPublishedContract(
4040
args: ClientAndChainAndAccount & {

packages/thirdweb/src/contract/deployment/utils/clone-factory.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@ import type { ClientAndChain } from "../../../utils/types.js";
22
import { getDeployedInfraContract } from "./infra.js";
33

44
/**
5-
* @internal
65
* Retrieves the deployed clone factory contract instance if available
76
* @param args - Client and chain information required to locate the contract
87
* @returns Promise that resolves to the clone factory contract instance if deployed, null otherwise
9-
* @remarks
10-
* This function performs two checks:
11-
* 1. Verifies if the Forwarder contract is deployed
12-
* 2. If Forwarder exists, checks if TWCloneFactory is deployed with the Forwarder address
8+
*
9+
* @contract
1310
*/
1411
export async function getDeployedCloneFactoryContract(args: ClientAndChain) {
1512
// check if Forwarder is deployed

packages/thirdweb/src/contract/deployment/utils/infra.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ type GetDeployedInfraParams = Prettify<
2828
>;
2929

3030
/**
31-
* @internal
3231
* Retrieves a deployed infrastructure contract instance for the specified contract ID
3332
* @param options - Configuration options for locating the infrastructure contract
3433
* @param options.client - ThirdwebClient instance
@@ -38,9 +37,6 @@ type GetDeployedInfraParams = Prettify<
3837
* @param options.publisher - Optional custom publisher address
3938
* @param options.version - Optional specific contract version to retrieve
4039
* @returns Promise that resolves to the contract instance if deployed, null otherwise
41-
* @remarks
42-
* This function fetches published contract metadata and attempts to locate an existing deployment
43-
* of the specified infrastructure contract on the target chain
4440
*/
4541
export async function getDeployedInfraContract(
4642
options: GetDeployedInfraParams,

packages/thirdweb/src/exports/deploys.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,9 @@ export {
5454
type DeployPackContractOptions,
5555
deployPackContract,
5656
} from "../extensions/prebuilts/deploy-pack.js";
57+
58+
export { getDeployedCloneFactoryContract } from "../contract/deployment/utils/clone-factory.js";
59+
export { getDeployedInfraContract } from "../contract/deployment/utils/infra.js";
60+
export { getAllDefaultConstructorParamsForImplementation } from "../extensions/prebuilts/get-required-transactions.js";
61+
export { getInitializeTransaction } from "../extensions/prebuilts/deploy-published.js";
62+
export { getOrDeployInfraForPublishedContract } from "../contract/deployment/utils/bootstrap.js";

packages/thirdweb/src/extensions/prebuilts/deploy-published.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ async function directDeploy(options: {
291291
* @param options.modules[].deployMetadata - The metadata for the module contract
292292
* @param options.modules[].initializeParams - Optional parameters for module initialization
293293
* @returns The prepared transaction for contract initialization
294-
* @internal
294+
* @contract
295295
*/
296296
export async function getInitializeTransaction(options: {
297297
client: ThirdwebClient;

packages/thirdweb/src/extensions/prebuilts/get-required-transactions.ts

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -54,40 +54,40 @@ export async function getRequiredTransactions(
5454
isZkSync
5555
? null
5656
: getDeployedCreate2Factory({
57-
chain,
58-
client,
59-
}).then((c) =>
60-
c
61-
? null
62-
: ({ type: "infra", contractId: "Create2Factory" } as const),
63-
),
57+
chain,
58+
client,
59+
}).then((c) =>
60+
c
61+
? null
62+
: ({ type: "infra", contractId: "Create2Factory" } as const),
63+
),
6464
isZkSync
6565
? null
6666
: getDeployedInfraContract({
67-
chain,
68-
client,
69-
contractId: "Forwarder",
70-
}).then((c) =>
71-
c ? null : ({ type: "infra", contractId: "Forwarder" } as const),
72-
),
67+
chain,
68+
client,
69+
contractId: "Forwarder",
70+
}).then((c) =>
71+
c ? null : ({ type: "infra", contractId: "Forwarder" } as const),
72+
),
7373
isZkSync
7474
? null
7575
: getDeployedInfraContract({
76-
chain,
77-
client,
78-
contractId: "TWCloneFactory",
79-
constructorParams: {
80-
_trustedForwarder: await computePublishedContractAddress({
81-
chain,
82-
client,
83-
contractId: "Forwarder",
84-
}),
85-
},
86-
}).then((c) =>
87-
c
88-
? null
89-
: ({ type: "infra", contractId: "TWCloneFactory" } as const),
90-
),
76+
chain,
77+
client,
78+
contractId: "TWCloneFactory",
79+
constructorParams: {
80+
_trustedForwarder: await computePublishedContractAddress({
81+
chain,
82+
client,
83+
contractId: "Forwarder",
84+
}),
85+
},
86+
}).then((c) =>
87+
c
88+
? null
89+
: ({ type: "infra", contractId: "TWCloneFactory" } as const),
90+
),
9191
// TODO (deploy): add WETH contract check for implementations that need it (check implementation constructor params)
9292
getTransactionsForImplementation({
9393
chain,
@@ -104,9 +104,9 @@ export async function getRequiredTransactions(
104104
c
105105
? null
106106
: ({
107-
type: "module",
108-
contractId: m.deployMetadata.name,
109-
} as const),
107+
type: "module",
108+
contractId: m.deployMetadata.name,
109+
} as const),
110110
),
111111
),
112112
]);
@@ -148,9 +148,9 @@ async function getTransactionsForImplementation(options: {
148148
c
149149
? null
150150
: ({
151-
type: "implementation",
152-
contractId: deployMetadata.name,
153-
} as const),
151+
type: "implementation",
152+
contractId: deployMetadata.name,
153+
} as const),
154154
);
155155
return result ? [result] : [];
156156
}
@@ -217,7 +217,8 @@ async function getTransactionsForMaketplaceV3(options: {
217217
* @returns An object containing default constructor parameters:
218218
* - On zkSync chains: returns an empty object since no parameters are needed
219219
* - On other chains: returns `trustedForwarder` and `nativeTokenWrapper` addresses
220-
* @internal
220+
*
221+
* @contract
221222
*/
222223
export async function getAllDefaultConstructorParamsForImplementation(args: {
223224
chain: Chain;

0 commit comments

Comments
 (0)