createNewPack

Example

import { createNewPack } from "thirdweb/extensions/pack";
const transaction = createNewPack({
contract: packContract,
client,
recipient: "0x...",
tokenOwner: "0x...",
packMetadata: {
name: "Pack #1",
image: "image-of-pack-1",
},
openStartTimestamp: new Date(),
erc20Rewards: [
{
contractAddress: "0x...",
quantityPerReward: 1,
totalRewards: 1,
},
],
erc721Rewards: [
{
contractAddress: "0x...",
tokenId: 0n,
},
],
erc1155Rewards: [
{
contractAddress: "0x...",
tokenId: 0n,
quantityPerReward: 1,
totalRewards: 1,
},
],
});
function createNewPack(
options: WithOverrides<BaseTransactionOptions<CreateNewPackParams>>,

Parameters

Type

let options: WithOverrides<
>;

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;