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
...
function openPack(
OpenPackParams | { asyncParams: () => Promise<OpenPackParams> }
>,

Parameters

The options for the "openPack" function.

Type

OpenPackParams | { asyncParams: () => Promise<OpenPackParams> }
>;

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A prepared transaction object.