Skip to main content

Pack.getPackContents() method

Get Pack Contents

Example

const packId = 0;
const contents = await contract.getPackContents(packId);
console.log(contents.erc20Rewards);
console.log(contents.erc721Rewards);
console.log(contents.erc1155Rewards);

Signature:

getPackContents(packId: BigNumberish): Promise<PackRewardsOutput>;

Parameters

ParameterTypeDescription
packIdBigNumberishThe id of the pack to get the contents of.

Returns:

Promise<PackRewardsOutput>

  • The contents of the pack.

Remarks

Get the rewards contained inside a pack.