IPack

Interface for a Pack contract

IPack Contract

This interface defines the functions and events for a Pack contract. A Pack represents a collection of items that can be opened to reveal their contents.

Functions

  • mint(address to, uint256 packId): Mints a new pack for the specified recipient.
  • open(uint256 packId): Opens a pack and reveals its contents.
  • getPackContents(uint256 packId): Returns the contents of a pack without opening it.
  • getPackOwner(uint256 packId): Returns the address of the pack owner.

Events

  • PackMinted(address to, uint256 packId): Emitted when a new pack is minted.
  • PackOpened(address owner, uint256 packId): Emitted when a pack is opened.

Usage

Implement this interface in your Pack contract to ensure compatibility with other contracts that interact with Packs.