Gas: Inefficient modulo computation #22
Labels
bug
Warden finding
G (Gas Optimization)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
cmichel
Vulnerability details
PoolFactory.uint2str
computesi % 10
asuint8(_i - (_i / 10) * 10)
.This intuitively seems more gas-expensive than doing
i % 10
.Consider using
i % 10
instead which also makes the code simpler to read.The text was updated successfully, but these errors were encountered: