struct PowerUp {
uint256 id; // Power-Up ID
string name; // Name of the Power-Up
uint256 powerUpType; // Type 1, 2, or 3. See docs for details
uint256 tiers; // The number of tiers available; 1 for types 1 and 3, or a defined number for type 2
uint256 heroesPerTier; // 0 for types 1 and 2, defined number for type 3
uint256 lockTimeRequiredToAcquire; // Minimum Lock Time - Defined value per Power-Up (usually 7 days)
uint256 cancelDelay; // Cancellation Hold Time - Defined value per Power-Up (usually 24 hours)
uint256[] govTokenPerTier; // Array of length 1 for tiers 1 and 3, defined length for type 2
}
struct PowerUpUserData {
bool isActivated; // Used by verifier to quickly check status of Power-Up
bool emergencyWithdrawHappened; // Set to true if user performs an emergencyWithdraw while this Power-Up is active
uint256 tier; // Set to 1 for type 1, one of the tier options for type 2, or a number between 1 and (user.heroesOwned + heroesPerTier - 1) / heroesPerTier for type 3
uint256 openHeroSlots; // Initially set to heroesPerTier * tier for type 3, 0 for other types
uint256 cancellationHeldSlots; // Used to hold slots for a time before making them available again
uint256 heldSlotExpiration; // If in the past then any cancellationHeldSlots will be added back to openHeroSlots
uint256 govTokenHoldExpiration; // Set upon cancelling a Power-Up or extending an expired Jeweler locking period
address owner; // Player address
}
struct PowerUpHeroData {
uint256 powerUpId; // Used to quickly check if a mapping exists for a given Power-Up and HeroID
uint256 heroId; // The ID of the hero that this data references
uint256 assignedSlot; // Used as a pointer to where the Hero is listed in PowerUpHeroesAssigned[]
address owner; // Used to check that the Hero is using a Power-Up assigned by the current owner
}
struct PowerUpLock {
uint256 powerUpId; // Power-Up ID
uint256 govTokens; // The number of govTokens locked by the user Power-Up
uint256 end; // The unlock time of the user's govToken balance
uint256 govTokenHoldExpiration; // The expiration time of the govToken balance from the Power-Up
uint256 usedBalance; // The balance of the user's allocated govTokens
}