createPack

Prepares a transaction to call the "createPack" function on the contract.

Example

import { createPack } from "thirdweb/extensions/erc1155";
const transaction = createPack({
contract,
contents: ...,
numOfRewardUnits: ...,
packUri: ...,
openStartTimestamp: ...,
amountDistributedPerOpen: ...,
recipient: ...,
overrides: {
...
}
});
// Send the transaction
...

Parameters

Returns

A prepared transaction object.