code-423n4 / 2022-07-axelar-findings

0 stars 0 forks source link

Gas Optimizations #190

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago
  1. use pre-increment instead of post increment to save gas. https://github.com/code-423n4/2022-07-axelar/blob/9c4c44b94cddbd48b9baae30051a4e13cbe39539/contracts/gas-service/AxelarGasService.sol#L123 for (uint256 i; i < tokens.length; i++) use ++i

2.Remove unused state variable in following line. https://github.com/code-423n4/2022-07-axelar/blob/9c4c44b94cddbd48b9baae30051a4e13cbe39539/contracts/auth/AxelarAuthWeighted.sol#L10

this variable is not used . uint256 public currentEpoch;

GalloDaSballo commented 2 years ago

5 gas saved

GalloDaSballo commented 2 years ago

Will penalize this report vs others that list all instances and "at least tried"