Custom errors were introduced in Solidity version 0.8.4. However, the specified Solidity version in the pragma statement is 0.8.3, leading to a compilation error.
The MathMasters defines custom errors using the error
keyword, a feature introduced in Solidity version 0.8.4. However, the specified pragma statement at the beginning of the contract (pragma solidity ^0.8.3;
) indicates an older Solidity version that does not support custom errors. As a result, attempting to compile the contract with the specified version will lead to a compilation error.
The contract uses features introduced in Solidity version 0.8.4, while being constrained by the version specified in the pragma statement. This discrepancy may hinder the intended functionality of the contract and prevent successful deployment on a version 0.8.3 compiler.
Consider upgrading the Solidity version specified in the pragma statement to 0.8.4
or a later version that supports custom errors. This can be achieved by updating the pragma statement at the beginning of the contract:
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.