For this audit, we reviewed the project's Game, Vault, Treasury, and Timer contracts. The code was reviewed at commit d2d32033ce9918c69c42d89aca07f712bf44025f and later at commit 5c9120ccf15f7554dceee3df3f351631cbb64641 on the project's private GitLab repo.
Function Graph

Inheritence Chart

Functions Overview
($) = payable function
# = non-constant function
Int = Internal
Ext = External
Pub = Public
+ [Int] IAlchemyToysGame
- [Ext] pray ($)
- [Ext] melt ($)
- [Ext] sacrifice #
- [Ext] proclaim #
- [Ext] getSacrificeProof
- [Ext] getSacrifices
- [Ext] getSacrificeIndex
- [Ext] enlightenedCount
- [Ext] enlightenedAt
- [Ext] getEnlightenmentBreakdown
- [Ext] getRecipe
+ [Int] IERC165
- [Ext] supportsInterface
+ [Int] IERC721 (IERC165)
- [Ext] balanceOf
- [Ext] ownerOf
- [Ext] safeTransferFrom #
- [Ext] transferFrom #
- [Ext] approve #
- [Ext] getApproved
- [Ext] setApprovalForAll #
- [Ext] isApprovedForAll
- [Ext] safeTransferFrom #
+ [Int] IERC721Metadata (IERC721)
- [Ext] name
- [Ext] symbol
- [Ext] tokenURI
+ [Int] IERC721Enumerable (IERC721)
- [Ext] totalSupply
- [Ext] tokenOfOwnerByIndex
- [Ext] tokenByIndex
+ [Int] IAlchemyToysToken (IERC721, IERC721Metadata, IERC721Enumerable)
- [Ext] contractURI
- [Ext] getLevelsConfig
- [Ext] tokenInfo
- [Ext] tokenPairID
- [Ext] isSpecialToken
- [Ext] getCurrentNumber
- [Ext] tokenOfOwnerByIndexRange
- [Ext] give #
- [Ext] giveSpecial #
- [Ext] giveAll #
- [Ext] burn #
+ [Int] IGameAceVault
- [Ext] ($)
- [Ext] grant ($)
- [Ext] lock #
- [Ext] unlock #
- [Ext] payout #
- [Ext] updateEpochData #
- [Ext] getLock
- [Ext] getLock
- [Ext] isEligible
- [Ext] isEligible
- [Ext] getTotalEligible
- [Ext] getTotalEligible
- [Ext] getEpoch
- [Ext] getEpochVault
- [Ext] getEpochVault
+ [Int] IGameTreasury
- [Ext] getPctShamans
- [Ext] getPctWinners
- [Ext] getPctProphet
- [Ext] getTurnFee
- [Ext] getTreasuryDistributions
- [Ext] ensureFees ($)
- [Ext] updateTurnFee #
- [Ext] pay #
+ Context
- [Int] _msgSender
- [Int] _msgData
+ Ownable (Context)
- [Pub] #
- [Pub] owner
- [Pub] renounceOwnership #
- modifiers: onlyOwner
- [Pub] transferOwnership #
- modifiers: onlyOwner
+ [Int] ITimer
- [Ext] changeCycle #
- [Ext] changeEpoch #
- [Ext] getCycle
- [Ext] getEpoch
- [Ext] getCycleLength
- [Ext] getLastCycleStart
- [Ext] getTurnsLeft
- [Ext] getTurnLimit
- [Ext] makeTurn #
- [Ext] makeTurns #
+ AlchemyToysGame (IAlchemyToysGame)
- [Pub] #
- [Ext] ($)
- modifiers: ensureFee
- [Ext] pray ($)
- modifiers: ensureCycle,ensureFee,makeTurn
- [Ext] melt ($)
- modifiers: ensureCycle,ensureFee,makeTurn
- [Ext] sacrifice #
- modifiers: ensureCycle,makeTurn
- [Ext] proclaim #
- modifiers: ensureCycle
- [Ext] getSacrificeProof
- [Ext] getSacrifices
- [Pub] getSacrificeIndex
- [Pub] enlightenedCount
- [Pub] enlightenedAt
- [Ext] getEnlightenmentBreakdown
- [Pub] getRecipe
- [Prv] _epochRecipeID
- [Prv] _giveRandomLevelCard #
- [Int] _getRandomNumber
Function Graph

Inheritence Chart

Functions Overview
($) = payable function
# = non-constant function
Int = Internal
Ext = External
Pub = Public
+ [Int] IERC20
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] transfer #
- [Ext] allowance
- [Ext] approve #
- [Ext] transferFrom #
+ ReentrancyGuard
- [Pub] #
+ [Int] IGameAceVault
- [Ext] ($)
- [Ext] grant ($)
- [Ext] lock #
- [Ext] unlock #
- [Ext] payout #
- [Ext] updateEpochData #
- [Ext] getLock
- [Ext] getLock
- [Ext] isEligible
- [Ext] isEligible
- [Ext] getTotalEligible
- [Ext] getTotalEligible
- [Ext] getEpoch
- [Ext] getEpochVault
- [Ext] getEpochVault
+ Context
- [Int] _msgSender
- [Int] _msgData
+ Ownable (Context)
- [Pub] #
- [Pub] owner
- [Pub] renounceOwnership #
- modifiers: onlyOwner
- [Pub] transferOwnership #
- modifiers: onlyOwner
+ [Int] ITimer
- [Ext] changeCycle #
- [Ext] changeEpoch #
- [Ext] getCycle
- [Ext] getEpoch
- [Ext] getCycleLength
- [Ext] getLastCycleStart
- [Ext] getTurnsLeft
- [Ext] getTurnLimit
- [Ext] makeTurn #
- [Ext] makeTurns #
+ AlchemyToysVault (IGameAceVault, ReentrancyGuard)
- [Pub] #
- [Ext] ($)
- [Pub] grant ($)
- [Ext] lock #
- modifiers: rolloverEpoch
- [Ext] unlock #
- modifiers: rolloverEpoch
- [Ext] payout #
- modifiers: rolloverEpoch
- [Ext] updateEpochData #
- modifiers: rolloverEpoch
- [Ext] getLock
- [Pub] getLock
- [Ext] isEligible
- [Pub] isEligible
- [Ext] getTotalEligible
- [Pub] getTotalEligible
- [Ext] getEpoch
- [Ext] getEpochVault
- [Pub] getEpochVault
- [Prv] _remove #
- [Prv] _payout #
- modifiers: nonReentrant
Function Graph

Inheritence Chart

Functions Overview
($) = payable function
# = non-constant function
Int = Internal
Ext = External
Pub = Public
+ ReentrancyGuard
- [Pub] #
+ Context
- [Int] _msgSender
- [Int] _msgData
+ Ownable (Context)
- [Pub] #
- [Pub] owner
- [Pub] renounceOwnership #
- modifiers: onlyOwner
- [Pub] transferOwnership #
- modifiers: onlyOwner
+ [Int] IGameTreasury
- [Ext] getPctShamans
- [Ext] getPctWinners
- [Ext] getPctProphet
- [Ext] getTurnFee
- [Ext] getTreasuryDistributions
- [Ext] ensureFees ($)
- [Ext] updateTurnFee #
- [Ext] pay #
+ GameTreasury (Ownable, IGameTreasury, ReentrancyGuard)
- [Pub] #
- [Ext] ($)
- [Ext] getPctShamans
- [Ext] getPctWinners
- [Ext] getPctProphet
- [Ext] getTurnFee
- [Ext] getTreasuryDistributions
- [Ext] ensureFees ($)
- modifiers: onlyOwner
- [Ext] updateTurnFee #
- modifiers: onlyOwner
- [Ext] pay #
- modifiers: onlyOwner,nonReentrant
Function Graph

Inheritence Chart

Functions Overview
($) = payable function
# = non-constant function
Int = Internal
Ext = External
Pub = Public
+ Context
- [Int] _msgSender
- [Int] _msgData
+ Ownable (Context)
- [Pub] #
- [Pub] owner
- [Pub] renounceOwnership #
- modifiers: onlyOwner
- [Pub] transferOwnership #
- modifiers: onlyOwner
+ [Int] ITimer
- [Ext] changeCycle #
- [Ext] changeEpoch #
- [Ext] getCycle
- [Ext] getEpoch
- [Ext] getCycleLength
- [Ext] getLastCycleStart
- [Ext] getTurnsLeft
- [Ext] getTurnLimit
- [Ext] makeTurn #
- [Ext] makeTurns #
+ MultiOwnable
- [Pub] #
- [Pub] isOwner
- [Pub] renounceOwnership #
- modifiers: onlyOwners
- [Pub] addOwnership #
- modifiers: onlyOwners
- [Pub] removeOwnership #
- modifiers: onlyOwners
+ Timer (ITimer, MultiOwnable)
- [Pub] #
- modifiers: MultiOwnable
- [Ext] changeCycle #
- [Ext] changeEpoch #
- modifiers: onlyOwners
- [Ext] getCycle
- [Ext] getEpoch
- [Ext] getCycleLength
- [Ext] getLastCycleStart
- [Pub] getTurnsLeft
- [Ext] getTurnLimit
- [Ext] makeTurn #
- modifiers: onlyOwners
- [Ext] makeTurns #
- modifiers: onlyOwners
- [Int] _makeTurns #