From 7ff1cf34fad1271d1315cc1f5ad76c7a9b74e4be Mon Sep 17 00:00:00 2001 From: gzeon Date: Tue, 19 Dec 2023 17:28:22 +0800 Subject: [PATCH] refactor: move alasing to retryable sender to reduce stack size --- contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol | 2 +- .../tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol b/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol index fedffe6494..9376f8ac29 100644 --- a/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol +++ b/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol @@ -373,7 +373,7 @@ contract L1AtomicTokenBridgeCreator is Initializable, OwnableUpgradeable { l2Deployment.standardGateway, l2RollupOwner, msg.sender, - AddressAliasHelper.applyL1ToL2Alias(upgradeExecutor), + upgradeExecutor, isUsingFeeToken ); diff --git a/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol b/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol index 1cba253ffc..06411905e7 100644 --- a/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol +++ b/contracts/tokenbridge/ethereum/L1TokenBridgeRetryableSender.sol @@ -7,6 +7,7 @@ import { L2RuntimeCode, ProxyAdmin } from "../arbitrum/L2AtomicTokenBridgeFactory.sol"; +import {AddressAliasHelper} from "../libraries/AddressAliasHelper.sol"; import { Initializable, OwnableUpgradeable @@ -46,9 +47,10 @@ contract L1TokenBridgeRetryableSender is Initializable, OwnableUpgradeable { address l2StandardGatewayAddress, address rollupOwner, address deployer, - address aliasedL1UpgradeExecutor, + address l1UpgradeExecutor, bool isUsingFeeToken ) external payable onlyOwner { + address aliasedL1UpgradeExecutor = AddressAliasHelper.applyL1ToL2Alias(l1UpgradeExecutor); if (!isUsingFeeToken) { _sendRetryableUsingEth( retryableParams,