getOrDeployModule

Gets or deploys a module implementation contract.

Example

import { getOrDeployModule } from "thirdweb/modules";
const module = await getOrDeployModule({
client,
chain,
account,
contractId,
publisher,
});
function getOrDeployModule(options: {
account: Account;
chain: Readonly<ChainOptions & { rpc: string }>;
client: ThirdwebClient;
contractId: string;
publisher?: string;
}): Promise<Readonly<ContractOptions<[]>>>;

Parameters

The options to use.

Type

let options: {
account: Account;
chain: Readonly<ChainOptions & { rpc: string }>;
client: ThirdwebClient;
contractId: string;
publisher?: string;
};

Returns

let returnType: Promise<Readonly<ContractOptions<[]>>>;

The module.