Pack multiple tokens into ERC1155 NFTs that act as randomized loot boxes
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.
You could use the Pack contract to:
view
Sep 26, 2024
MIT, Apache-2.0