from solidity 0.8.4, we can use custom errors instead of long strings in require statements as custom errors takes less gas than the long strings in require statements.
Proof of code to show the difference in gas cost is as follows:
Place below code in ChoosingRam.sol
Place below code in Dussehra.t.sol
and run the command - forge test --mt test__GasCostIsLowForCustomErrors -vvv
Increase in Gas cost
Foundry
Make below code changes in ChoosingRam.sol
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.