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.
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
.
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.
No specific tools were used for this finding, as it was identified through manual code review and analysis.
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.
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.