Closed jacque006 closed 3 years ago
When a user calls DepositManager.depositFor with a zero (0) l1Amount, a ERC20 check and then transfer are called (https://github.com/thehubbleproject/hubble-contracts/blob/master/contracts/DepositManager.sol#L155-L159). This is unnecessary and leads to a higher gas cost.
DepositManager.depositFor
0
l1Amount
require
depositFor
Problem
When a user calls
DepositManager.depositFor
with a zero (0
) l1Amount, a ERC20 check and then transfer are called (https://github.com/thehubbleproject/hubble-contracts/blob/master/contracts/DepositManager.sol#L155-L159). This is unnecessary and leads to a higher gas cost.Solution
l1Amount
is0
.require
failures indepositFor
.