module

Convenience function to add the ClaimableERC721 module as a default module on a core contract.

Example

import { ClaimableERC721, deployModularContract } from "thirdweb/modules";
const deployed = deployModularContract({
client,
chain,
account,
core: "ERC721",
params: {
name: "My Modular Contract",
},
modules: [
ClaimableERC721.module({
primarySaleRecipient: ...,
}),
],
});
function module(
params: EncodeBytesOnInstallParams & { publisher?: string },
): (args: {
account: Account;
chain: Readonly<ChainOptions & { rpc: string }>;
client: ThirdwebClient;
}) => Promise<{ data: `0x${string}`; module: `0x${string}` }>;

Parameters

The parameters for the module.

Type

let params: EncodeBytesOnInstallParams & { publisher?: string };

Returns

let returnType: (args: {
account: Account;
chain: Readonly<ChainOptions & { rpc: string }>;
client: ThirdwebClient;
}) => Promise<{ data: `0x${string}`; module: `0x${string}` }>;
  • The module function.