installPublishedModule

Install a published module on a modular contract

Example

import { installPublishedModule } from "thirdweb/modules/modular";
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;
chain: Chain;
client: ThirdwebClient;
constructorParams?: Array<unknown>;
contract: ThirdwebContract;
moduleData?: `0x${string}`;
moduleName: string;
publisherAddress?: string;
version?: string;
};

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A prepared transaction to send