From 1e368aafb25cd50ce11235c2de52553d75237607 Mon Sep 17 00:00:00 2001 From: Jmunoz Date: Thu, 25 Jan 2024 15:10:01 -0300 Subject: [PATCH] Add allowList and totalDepositedAmountPerUser mappings --- l1-contracts/contracts/bridge/L1ERC20Bridge.sol | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/l1-contracts/contracts/bridge/L1ERC20Bridge.sol b/l1-contracts/contracts/bridge/L1ERC20Bridge.sol index 6de805ae2..77f6c26db 100644 --- a/l1-contracts/contracts/bridge/L1ERC20Bridge.sol +++ b/l1-contracts/contracts/bridge/L1ERC20Bridge.sol @@ -30,6 +30,9 @@ import {AddressAliasHelper} from "../vendor/AddressAliasHelper.sol"; contract L1ERC20Bridge is IL1Bridge, IL1BridgeLegacy, ReentrancyGuard { using SafeERC20 for IERC20; + /// @dev The smart contract that manages the list with permission to call contract functions + IAllowList internal immutable allowList; + /// @dev zkSync smart contract that is used to operate with L2 via asynchronous L2 <-> L1 communication IZkSync internal immutable zkSync; @@ -61,6 +64,10 @@ contract L1ERC20Bridge is IL1Bridge, IL1BridgeLegacy, ReentrancyGuard { /// @dev A mapping L1 token address => user address => the total deposited amount by the user mapping(address => mapping(address => uint256)) private __DEPRECATED_totalDepositedAmountPerUser; + /// @dev The accumulated deposited amount per user. + /// @dev A mapping L1 token address => user address => the total deposited amount by the user + mapping(address => mapping(address => uint256)) public totalDepositedAmountPerUser; + /// @dev Contract is expected to be used as proxy implementation. /// @dev Initialize the implementation to prevent Parity hack. constructor(IZkSync _zkSync) reentrancyGuardInitializer {