installPublishedModule

Install a published module on a modular contract

Example

import { installPublishedModule } from "thirdweb/modules";
const transaction = installPublishedModule({
client,
chain,
account,
contract,
moduleName: "MyModule",
publisherAddress: "0x...",
});
await sendTransaction({ transaction, account });
function installPublishedModule(

Parameters

The options for installing a published module

Type

let options: {
account: Account;
constructorParams?: Record<string, unknown>;
contract: ThirdwebContract;
moduleData?: `0x${string}`;
moduleName: string;
publisher?: string;
version?: string;
};

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A prepared transaction to send