Gas: Bitmasks creation can be simplified #21
Labels
bug
Warden finding
G (Gas Optimization)
resolved
Finding has been patched by sponsor (sponsor pls link to PR containing fix)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
cmichel
Vulnerability details
In
DrawCalculator._createBitMasks
, the bit masks can just be created by shifting the previous (potentially already shifted) masks by the bit range.It saves on multiplications and, for me, this is also more intuitive than the current algorithm.
Some pseudocode:
The text was updated successfully, but these errors were encountered: