Open code423n4 opened 2 years ago
++i
change to:
for (uint256 i = from; i < to; ++i) {
// gas cost 34271
Tools used: Remix
========================================================================
require
Change to:
require( from < to ); require( to - from <= 10 ); require( to < schainHash,"Range is incorrect");
// gas cost 34305
Only marginal gas improvements.
Saves 3 gas per instance
Saves the gas from the && 3 gas
6 gas total
++i
can save gas https://github.com/skalenetwork/ima-c4-audit/blob/main/contracts/MessageProxy.sol#L221 // gas cost 34321change to:
// gas cost 34271
Tools used: Remix
========================================================================
require
can save gas https://github.com/skalenetwork/ima-c4-audit/blob/main/contracts/MessageProxy.sol#L216 // gas cost 34324Change to:
// gas cost 34305
========================================================================