getOrDeployInfraForPublishedContract

Gets or deploys the infrastructure contracts needed for a published contract deployment

function getOrDeployInfraForPublishedContract(
args: {
account: Account;
chain: Readonly<ChainOptions & { rpc: string }>;
client: ThirdwebClient;
} & {
constructorParams?: Record<string, unknown>;
contractId: string;
publisher?: string;
version?: string;
},
): Promise<{
cloneFactoryContract: ThirdwebContract;
implementationContract: ThirdwebContract;
}>;

Parameters

The arguments object

Type

let args: {
account: Account;
chain: Readonly<ChainOptions & { rpc: string }>;
client: ThirdwebClient;
} & {
constructorParams?: Record<string, unknown>;
contractId: string;
publisher?: string;
version?: string;
};

Returns

let returnType: Readonly<ContractOptions<abi>>;

An object containing:

  • cloneFactoryContract: The factory contract used for creating clones

  • implementationContract: The deployed implementation contract