Eggstravaganza

First Flight #37
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: low
Invalid

Unspecified Solidity Pragma

Contracts Affected:

  • EggstravaganzaNFT.sol

  • EggVault.sol

  • EggHuntGame.sol

Description:
The contracts use an unspecific Solidity pragma (pragma solidity ^0.8.23;), which allows the code to compile with any version of Solidity from 0.8.23 onwards. This can lead to unexpected behavior if the code is compiled with a newer version of Solidity that introduces breaking changes or different behavior.

Impact:
Using an unspecific pragma increases the risk of compatibility issues and unexpected behavior when the code is compiled with a newer version of Solidity.

Proof of Concept:

pragma solidity ^0.8.23; // Unspecific pragma

Recommended Mitigation:
Specify a fixed Solidity version to ensure consistent behavior and compatibility. For example:

pragma solidity 0.8.23; // Specific pragma

This ensures that the code is compiled with the intended version of Solidity, reducing the risk of unexpected behavior.

Updates

Lead Judging Commences

m3dython Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Floating Pragma

Floating pragma usage could lead to compilation inconsistencies

Support

FAQs

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

Give us feedback!