The contract currently uses require() statements with string error messages to validate conditions such as access control. While this approach consumes more gas due to string storage and does not leverage solidity's more efficient custom error mechanism
In the setGameContract() function, the contract uses:
This is can be replaced with more gas-efficient method using custom errors:
Gas Optimization
Improved Clarity
Best Practice Alignment
Manual code review
Solidity recommendation on custom errors
Replace all require('condtion', 'error messages')
pattern with if(!condition) {revert CustomError();}
Strategy to save gas and minimize transaction costs
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.