Beginner FriendlyFoundryGameFi
100 EXP
View results
Submission Details
Severity: low
Invalid

[I-1] The state variables that are not changing should be declared as `immutable` or `constant```

Summary

The contract MartenitsaEvent implements an event management system on top of the MartenitsaToken ERC721 token contract. It allows participants to join events and become temporary producers during the event duration.

Vulnerability Details

Informational

In lines 11, 12, and 13 of the contract code, the variables eventStartTime, eventDuration, and eventEndTime are assigned values during the execution of the startEvent function. Since these values are set once during the contract's deployment and never change afterward, it would be beneficial to declare them as constant or immutable.

Impact

Declaring the variables eventStartTime, eventDuration, and eventEndTime as constant or immutable would not impact the functionality of the contract but would enhance readability and clarity. It would also prevent accidental modification of these values within the contract, reducing the risk of unintended behavior or vulnerabilities.

Tools Used

No specific tools were used for this finding, as it was identified through manual code review and analysis.

Recommendations

It is recommended to update the declarations of eventStartTime, eventDuration, and eventEndTime as immutable or constant if their values are intended to remain constant throughout the contract's lifecycle. This would improve code quality and reduce the potential for errors or vulnerabilities related to unintended modification of these values.

Updates

Lead Judging Commences

bube Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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