Last Man Standing

First Flight #45
Beginner FriendlyFoundrySolidity
100 EXP
View results
Submission Details
Impact: low
Likelihood: low
Invalid

[L-1] Unlocked Pragma.

Root + Impact

[L-1] Unlocked Pragma, unexpected behavior

Description

Every Solidity file specifies in the header a version number of the format pragma solidity (^)0.8.*. The caret (^) before the version number implies an unlocked pragma, meaning that the compiler will use the specified version and above, hence the term "unlocked".

Risk

Likelihood: Low

  • Reason 1 : Breaking changes in future solidity versions might lead to unexpected behavior in the future.

Impact: Low

  • Impact 1: Unexpected behavior.

Proof of Concept

In contract Game.sol, the following version is used:

pragma solidity ^0.8.20;

Recommended Mitigation

For consistency and to prevent unexpected behavior in the future, it is recommended to remove the caret to lock the file onto a specific Solidity version.

- pragma solidity ^0.8.20;
+ pragma solidity 0.8.20;
Updates

Appeal created

inallhonesty Lead Judge 10 days ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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