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
Parameter | Type | Description |
---|---|---|
tokenId | BigNumberish | the token ID of the pack you want to open |
amount | BigNumberish | (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.