Eggstravaganza

First Flight #37
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: medium
Invalid

gameContract contract address is not initialized in the EggstravaganzaNFT constructor

[M-2] gameContract contract address is not initialized in the EggstravaganzaNFT constructor

Description: If EggstravaganzaNFT:setGameContract is not called the gameContract remains unintialized which causes all calls to EggstravaganzaNFT:mintEgg to revert.

Impact: Any call trying to mint eggs will revert.

Recommended Mitigation: Pass in the gameContract contract address to the EggstravaganzaNFT contructor to ensure it is initialized.

+ constructor(string memory _name, string memory _symbol, address _gameContract)
ERC721(_name, _symbol) Ownable(msg.sender);
+ gameContract = _gameContract;
- constructor(string memory _name, string memory _symbol)
ERC721(_name, _symbol) Ownable(msg.sender)
Updates

Lead Judging Commences

m3dython Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!