Project

One World
NFTDeFi
15,000 USDC
View results
Submission Details
Severity: low
Invalid

State Variables Should Be Declared Immutable.

Summary

The variables are not declared as Immutable at https://github.com/Cyfrin/2024-11-one-world/blob/1e872c7ab393c380010a507398d4b4caca1ae32b/contracts/OWPIdentity.sol#L16-L17

and https://github.com/Cyfrin/2024-11-one-world/blob/1e872c7ab393c380010a507398d4b4caca1ae32b/contracts/OWPIdentity.sol#L17-L18

which could result to high gas to the contract.

Impact

This could cause high gas to the contract.

Tools Used

manual review

Recommendations

Using immutable will save the gas since the state of the variables are not changing. use it like this:

- string public name = "One World Project";
- string public symbol = "OWP";
+ string public immutable name = "One World Project";
+ string public immutable symbol = "OWP";
Updates

Lead Judging Commences

0xbrivan2 Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
0xbrivan2 Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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