From 090c1a83ccd697640499f533889eae89b9f7a786 Mon Sep 17 00:00:00 2001 From: Santiago Pittella Date: Thu, 21 Dec 2023 15:45:56 -0300 Subject: [PATCH] update names --- ethereum/contracts/zksync/facets/Mailbox.sol | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ethereum/contracts/zksync/facets/Mailbox.sol b/ethereum/contracts/zksync/facets/Mailbox.sol index 815f39c70..79553f275 100644 --- a/ethereum/contracts/zksync/facets/Mailbox.sol +++ b/ethereum/contracts/zksync/facets/Mailbox.sol @@ -330,13 +330,14 @@ contract MailboxFacet is Base, IMailbox { refundRecipient = AddressAliasHelper.applyL1ToL2Alias(refundRecipient); } - address l1TokenAddress = address($(L1_NATIVE_TOKEN_ADDRESS)); + // The address of the token that is used in the L2 as native. + address nativeTokenAddress = address($(L1_NATIVE_TOKEN_ADDRESS)); // Check balance and allowance. - require(IERC20(l1TokenAddress).balanceOf(msg.sender) >= _amount, "Not enough balance"); - require(IERC20(l1TokenAddress).allowance(msg.sender, address(this)) >= _amount, "Not enough allowance"); + require(IERC20(nativeTokenAddress).balanceOf(msg.sender) >= _amount, "Not enough balance"); + require(IERC20(nativeTokenAddress).allowance(msg.sender, address(this)) >= _amount, "Not enough allowance"); // Transfer tokens to the contract. - IERC20(l1TokenAddress).safeTransferFrom(msg.sender, address(this), _amount); + IERC20(nativeTokenAddress).safeTransferFrom(msg.sender, address(this), _amount); params.sender = _sender; params.txId = s.priorityQueue.getTotalPriorityTxs();