Open code423n4 opened 2 years ago
1.
Contract: AxelarGateway.sol
Line 207
unnecessary to initialize i in for loops i++ costs more gas than ++i in for loops result: for (uint256 i; i < symbols.length; ++i)
2.
Contract: AxelarGasService.sol
Line 123
i++ costs more gas than ++i in for loops result: for (uint256 i; i < tokens.length; ++i)
3.
Contract: AxelarDepositService.sol
Line 168 Line 204
i++ costs more gas than ++i in for loops Result: for (uint256 i; i < refundTokens.length; ++i) for (uint256 i; i < refundTokens.length; ++i)
4.
Contract: AxelarAuthWeighted.sol
Line 69 Line 98
unnecessary to initialize i in for loops Result: for (uint256 i; i < weightsLength; ++i) for (uint256 i; i < signatures.length; ++i)
This will also provide consistency across the rest of the code given that all other for loops are stated as such
50 gas at most
1.
Contract: AxelarGateway.sol
Line 207
2.
Contract: AxelarGasService.sol
Line 123
3.
Contract: AxelarDepositService.sol
Line 168 Line 204
4.
Contract: AxelarAuthWeighted.sol
Line 69 Line 98
This will also provide consistency across the rest of the code given that all other for loops are stated as such