In muldWad(), the function selector used for the custom error MathMasters__MulWadFailed()
is not correct. The function selector for a custom error is the same as the function selector for a function. That means the function selector should be bytes4(keccak256("MathMasters__MulWadFailed()") - that gives you 0xa56044f7. But the function selector for the MathMasters__MulWadFailed() error used in mulWad()
is 0xbac65e5b.
Here is the mulWad()
function which stores a function selector for a custom error MathMasters__MulWadFailed() of 0xbac65e5b:
Users will not get the proper custom errors which may confuse them with regard to what is going wrong. In this case, no custom errors in the contract have this function selector, so it provides no information about what caused the reversion.
Manual review
The correct function selector is 0xa56044f7, so the code should be (also with the storage slot corrected):
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.