Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Valid

Solidity version 0.8.3 doesn't support custom errors defined by `error` keyword.

Summary

The library MathMasters uses pragma version ^0.8.3, which means that it should be usable by all versions 0.8.3 and above but custom errors are not supported in version 0.8.3 and it will not be usable by contracts of version 0.8.3.

Vulnerability Details

The vulnerability occurs due to the use of custom errors with ^0.8.3 because if contract with version 0.8.3 are used then custom errors cannot be used as they are not supported by version 0.8.3.

Impact

Any contract of version 0.8.3 will not be able to use the library as custom errors are not supported.

Tools Used

Manual Review

Recommendations

Custom errors are supported from 0.8.4, thus update the pragma version to ^0.8.4

-pragma solidity ^0.8.3;
+pragma solidity ^0.8.4;
Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
shikhar229169 Submitter
over 1 year ago
inallhonesty Lead Judge
over 1 year ago
inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Project that use pragma=0.8.3 won't be able to use the library due to custom errors not being supported in that Solidity version.

Support

FAQs

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