Install a published module on a modular contract
import { installPublishedModule } from "thirdweb/modules";const transaction = installPublishedModule({ client, chain, account, contract, moduleName: "MyModule", publisherAddress: "0x...",});await sendTransaction({ transaction, account });
function installPublishedModule( options: InstallPublishedModuleOptions,): PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>;
The options for installing a published module
let options: { account: Account; constructorParams?: Record<string, unknown>; contract: ThirdwebContract; moduleData?: `0x${string}`; moduleName: string; publisher?: string; version?: string;};
let returnType: PreparedTransaction< any, AbiFunction, PrepareTransactionOptions>;
A prepared transaction to send