Eggstravaganza

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

Missing Critical Events

Description:
Several critical administrative functions in the contracts do not emit events when executed. This lack of transparency makes it difficult to track and audit changes to important contract parameters, which could lead to reduced trust and accountability.

Impact:
Informational - Missing events for critical actions reduce transparency and make it harder to monitor and audit administrative changes.

Proof of Concept:
The following functions are missing event emissions:

  • EggstravaganzaNFT.setGameContract(address newContract)

  • EggVault.setEggNFT(address newNFT)

  • EggHuntGame.setEggFindThreshold(uint256 newValue)

Recommended Mitigation:
Add event declarations and emit the corresponding events in the affected functions. For example:

// EggstravaganzaNFT
event GameContractUpdated(address indexed newContract);
function setGameContract(address newContract) external onlyOwner {
require(newContract != address(0), "Invalid address");
gameContract = newContract;
emit GameContractUpdated(newContract);
}
// EggVault
event NFTContractUpdated(address indexed newNFT);
function setEggNFT(address newNFT) external onlyOwner {
require(newNFT != address(0), "Invalid address");
eggNFT = newNFT;
emit NFTContractUpdated(newNFT);
}
// EggHuntGame
event ThresholdUpdated(uint256 indexed newValue);
function setEggFindThreshold(uint256 newValue) external onlyOwner {
require(newValue > 0, "Threshold must be positive");
eggFindThreshold = newValue;
emit ThresholdUpdated(newValue);
}

Adding these events ensures that critical administrative actions are logged and can be monitored on-chain, improving transparency and accountability.

Updates

Lead Judging Commences

m3dython Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Event Emission

Standard practice for clarifying important contract behaviors

Support

FAQs

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

Give us feedback!