Skip to content

Commit

Permalink
remove unused logic in L1GatewayRouter
Browse files Browse the repository at this point in the history
  • Loading branch information
zimpha committed Jan 28, 2024
1 parent bab1841 commit c06f705
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 6 additions & 2 deletions contracts/src/L1/gateways/L1GatewayRouter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,11 @@ contract L1GatewayRouter is OwnableUpgradeable, IL1GatewayRouter {
///
/// @dev The parameters `_ethGateway` is no longer used.
///
/// @param _ethGateway The address of L1ETHGateway contract.
/// @param _defaultERC20Gateway The address of default ERC20 Gateway contract.
function initialize(address _ethGateway, address _defaultERC20Gateway) external initializer {
function initialize(
address, /*_ethGateway*/
address _defaultERC20Gateway
) external initializer {
OwnableUpgradeable.__Ownable_init();

// it can be zero during initialization
Expand All @@ -92,11 +94,13 @@ contract L1GatewayRouter is OwnableUpgradeable, IL1GatewayRouter {
emit SetDefaultERC20Gateway(address(0), _defaultERC20Gateway);
}

/* comment out since it is no longer used.
// it can be zero during initialization
if (_ethGateway != address(0)) {
ethGateway = _ethGateway;
emit SetETHGateway(address(0), _ethGateway);
}
*/
}

/*************************
Expand Down
1 change: 0 additions & 1 deletion contracts/src/test/L1GatewayRouter.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ contract L1GatewayRouterTest is L1GatewayTestBase {
}

function testInitialized() public {
assertEq(address(l1ETHGateway), router.ethGateway());
assertEq(address(l1StandardERC20Gateway), router.defaultERC20Gateway());
assertEq(
factory.computeL2TokenAddress(address(l2StandardERC20Gateway), address(l1Token)),
Expand Down

0 comments on commit c06f705

Please sign in to comment.