rabbitholegg/quest-protocol

for loop format to save gas

shafu0x opened this issue · 1 comments

use

for (uint i = 0; i < X; ) {
   unchecked { ++i; }
}

instead of

for (uint i = 0; i < X; i++) {
}

to save some gas

Thanks we are doing this in most places, and hopefully soon this won't be needed: ethereum/solidity#13308