The occurrence of overflow in any of the variables below is unrealistic, so it is possible to use smaller size variables to reduce gas and memory or storage consumption.
_l1Token is always zero by default. So there is no reason to give it as an argument to the function and also check if it is zero. Because it is not used in any other line in the body of this function, so it can be deleted, or it can be placed as a fixed number in the emit command at the end of the function.
The overflow does not actually happen there, so the calculations can be done using the uncheck method
The defined constants have small values and there is no need to consider 256 bits to store them.
https://github.com/code-423n4/2022-10-zksync/blob/456078b53a6d09636b84522ac8f3e8049e4e3af5/ethereum/contracts/zksync/Config.sol#L15 https://github.com/code-423n4/2022-10-zksync/blob/456078b53a6d09636b84522ac8f3e8049e4e3af5/ethereum/contracts/zksync/Config.sol#L9 https://github.com/code-423n4/2022-10-zksync/blob/456078b53a6d09636b84522ac8f3e8049e4e3af5/ethereum/contracts/zksync/Config.sol#L12 https://github.com/code-423n4/2022-10-zksync/blob/456078b53a6d09636b84522ac8f3e8049e4e3af5/ethereum/contracts/zksync/Config.sol#L44 https://github.com/code-423n4/2022-10-zksync/blob/456078b53a6d09636b84522ac8f3e8049e4e3af5/ethereum/contracts/zksync/Config.sol#L47 https://github.com/code-423n4/2022-10-zksync/blob/456078b53a6d09636b84522ac8f3e8049e4e3af5/ethereum/contracts/zksync/Config.sol#L51