In Solidity 0.8+, there’s a default overflow check on unsigned integers. It’s possible to uncheck this in for-loops and save some gas at each iteration, but at the cost of some code readability, as this uncheck cannot be made inline.
The code would go from:
for (uint256 i; i < numIterations; i++) { // ... }
to:
for (uint256 i; i < numIterations;) { // ... unchecked { ++i; } }
Instances:
protocol/contracts/testing/MockFeeBurner.sol:27: for (uint256 i; i < tokens.length; i++) {
For-Loops: Increments can be unchecked
In Solidity 0.8+, there’s a default overflow check on unsigned integers. It’s possible to uncheck this in for-loops and save some gas at each iteration, but at the cost of some code readability, as this uncheck cannot be made inline.
The code would go from:
to:
Instances:
protocol/contracts/testing/MockFeeBurner.sol:27: for (uint256 i; i < tokens.length; i++) {