40,000 USDC
View results
Submission Details
Severity: gas
Valid

[I-01] Add comment for the initial state of the variable `s_state`

Summary

The declared variable s_state has no information about the initial state and in the constructor it is not initialized.

Vulnerability Details

When the contract is implemented, the initial value for the s_state is 0 for default, but it's not very clear to know that.
Only the knowledgeable developer would know that when it is a uint256 value type and is not initialized, the default value is 0.

Impact

Users or developers will not see as clearly the value of s_state

Tools Used

Manual code review

Recommendations

Add this comment:

+/// @dev The initial value for s_state is 0 which corresponds to the `Created` state.
State private s_state;

Support

FAQs

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