Skip to main content

Pack.open() method

Open Pack

Example

const tokenId = 0;
const amount = 1;
const tx = await contract.open(tokenId, amount);

Signature:

open(tokenId: BigNumberish, amount?: BigNumberish): Promise<PackRewards>;

Parameters

ParameterTypeDescription
tokenIdBigNumberishthe token ID of the pack you want to open
amountBigNumberish(Optional) the amount of packs you want to open

Returns:

Promise<PackRewards>

Remarks

  • Open a pack to reveal the contained rewards. This will burn the specified pack and the contained assets will be transferred to the opening users wallet.