The pack contract lets you bundle ERC20,ERC721 and,ERC1155 tokens together into ERC1155 NFTs that act as randomized loot boxes.
The packs are ERC1155 NFTs themselves, which can have the metadata you'd expect of an NFT, such as a name, image, description, etc.
When a pack is opened, a pre-defined quantity of tokens are randomly selected from the ones that were used to create the packs (that haven't already been selected), and awarded to the opener. The pack NFT is burned as it's opened.
You can configure how many tokens get selected for the pack:
- How many tokens are in each "unit" (for ERC20 & ERC1155 tokens - one unit could be multiple tokens).
- How many units are in each pack.
IMPORTANT: Pack functions, such as opening of packs, can be costly in terms of gas usage due to random selection of rewards. Please check your gas estimates/usage, and do a trial on testnets before any mainnet deployment.
Use Cases & Examples
You could use the Pack contract to:
- Create randomized NFT loot boxes
- Run a randomized raffle where some users open a winning ticket
- Reward your community with token gift boxes
Smart Contract Design
For a detailed exploration of how the pack smart contract works, why it was built, and it's limitations, visit our Pack Design Doc!
Creating & Configuring the Pack
Learn how to create and configure your smart contract using the dashboard.
Creating a Pack Contract
Deploy the pack contract to any of our supported networks using the button below.
To configure the image, name, and description of the contract, click the Settings tab:
Royalty & Platform Fees
From the Settings tab, you also configure the royalty fee: