openPack

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

Example

import { openPack } from "thirdweb/extensions/erc1155";
const transaction = openPack({
contract,
packId: ...,
amountToOpen: ...,
overrides: {
...
}
});
// Send the transaction
...

Parameters

Returns

A prepared transaction object.