Prepares a transaction to call the "openPack" function on the contract.
import { sendTransaction } from "thirdweb";import { openPack } from "thirdweb/extensions/erc1155"; const transaction = openPack({ contract, packId: ..., amountToOpen: ..., overrides: { ... }}); // Send the transactionawait sendTransaction({ transaction, account });
function openPack( options: BaseTransactionOptions< OpenPackParams | { asyncParams: () => Promise<OpenPackParams> } >,): PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>;
The options for the "openPack" function.
let options: BaseTransactionOptions< OpenPackParams | { asyncParams: () => Promise<OpenPackParams> }>;
let returnType: PreparedTransaction< any, AbiFunction, PrepareTransactionOptions>;
A prepared transaction object.