The EggstravaganzaNFT
contract’s gameContract
address is not initialized during deployment, risking a total failure of NFT minting functionality.
Location: EggstravaganzaNFT.sol
Code Snippet:
Issue:
Missing Constructor Initialization: The gameContract
address is not set during deployment.
Critical Dependency: The EggHuntGame
contract cannot mint NFTs unless the owner manually calls setGameContract()
.
Attack Scenario:
Owner deploys EggstravaganzaNFT
but forgets to call setGameContract()
.
Players attempt to mint NFTs via EggHuntGame
, but all calls to mintEgg()
revert.
The game becomes non-functional, and NFTs cannot be distributed.
Game Deadlock: The entire egg hunt game cannot proceed without NFT minting.
User Frustration: Players cannot participate, leading to loss of engagement.
Manual Code Review
1. Initialize gameContract
in Constructor (Recommended):
2. Add Redundant Check in mintEgg()
(Defense-in-Depth):
Changing the NFT contract address doesn't update the storedEggs and eggDepositors mappings
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.