code-423n4 / 2022-05-cudos-findings

1 stars 0 forks source link

Gas Optimizations #117

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago
  1. no need to initialize variables with default values Gravity.sol#L54 Gravity.sol#L128 Gravity.sol#L231 Gravity.sol#L233 Gravity.sol#L263 Gravity.sol#L453 Gravity.sol#L568 Gravity.sol#L579 Gravity.sol#L659 Gravity.sol#L660

  2. use ++i instead of i++, i+=1 Gravity.sol#L128 Gravity.sol#L233 Gravity.sol#L263 Gravity.sol#L453 Gravity.sol#L568 Gravity.sol#L579 Gravity.sol#L660