[Pack contract is incompatible with Pectra update. Support for this contract is being removed in next release.]
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(