Current implementation on L1StandardBridge and L1CrossDomainMessenger
function nativeTokenAddress() public view returns (address) {
return systemConfig.nativeTokenAddress();
}
Improvement:
function nativeTokenAddress() public view returns (address) {
return _nativeToken();
}
function _nativeToken() internal view returns (address) {
return systemConfig.nativeTokenAddress();
}
Using internal function instead of nativeTokenAddress() in the same contract helps us saving gas because there is no more sub-context created calling to itself
Current implementation on L1StandardBridge and L1CrossDomainMessenger
Improvement:
Using internal function instead of nativeTokenAddress() in the same contract helps us saving gas because there is no more sub-context created calling to itself