There are compatibility issues between the library and smart contracts using version 0.8.3
of Solidity.
Custom errors were introduced in Solidity version 0.8.4
. This prevents smart contracts using version 0.8.3
from using this library.
References: Solidity 0.8.4 Release Announcement
Smart contracts using version 0.8.3
of Solidity cannot use this library.
If we attempt to compile a smart contract that uses version 0.8.3
of Solidity and includes the library, a compilation error will occur.
Let's create a new smart contract in src/MathMastersExposed.sol
with a version0.8.3
of Solidity that will include the library:
If we attempt to compile this smart contract using forge build
, we will encounter a compilation error:
Manual review
Foundry
The library's pragma should not include version 0.8.3
.
Recommended changes to the MathMasters.sol
library:
If we change the pragma from 0.8.3
to 0.8.4
in our previously created smart contract, we can now compile it successfully.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.