From 1327942a30c39638bdd7a5154d9080666ae8ecd9 Mon Sep 17 00:00:00 2001 From: Vitaly Drogan Date: Wed, 28 Apr 2021 12:27:10 +0300 Subject: [PATCH] all storage variables are internal --- contracts/contracts/Storage.sol | 42 ++++++++++++++++----------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/contracts/contracts/Storage.sol b/contracts/contracts/Storage.sol index 3e868b93d6..2fc2995057 100644 --- a/contracts/contracts/Storage.sol +++ b/contracts/contracts/Storage.sol @@ -24,10 +24,10 @@ contract Storage { uint256 internal upgradePreparationActivationTime; /// @dev Verifier contract. Used to verify block proof and exit proof - Verifier public verifier; + Verifier internal verifier; /// @dev Governance contract. Contains the governor (the owner) of whole system, validators list, possible tokens list - Governance public governance; + Governance internal governance; uint8 internal constant FILLED_GAS_RESERVE_VALUE = 0xff; // we use it to set gas revert value so slot will not be emptied with 0 balance struct PendingBalance { @@ -47,11 +47,11 @@ contract Storage { uint32 internal firstPendingWithdrawalIndexDEPRECATED; uint32 internal numberOfPendingWithdrawalsDEPRECATED; - /// @notice Total number of executed blocks i.e. blocks[totalBlocksExecuted] points at the latest executed block (block 0 is genesis) - uint32 public totalBlocksExecuted; + /// @dev Total number of executed blocks i.e. blocks[totalBlocksExecuted] points at the latest executed block (block 0 is genesis) + uint32 internal totalBlocksExecuted; - /// @notice Total number of committed blocks i.e. blocks[totalBlocksCommitted] points at the latest committed block - uint32 public totalBlocksCommitted; + /// @dev Total number of committed blocks i.e. blocks[totalBlocksCommitted] points at the latest committed block + uint32 internal totalBlocksCommitted; /// @Old rollup block stored data - not used in current version /// @member validator Block producer @@ -72,15 +72,15 @@ contract Storage { } mapping(uint32 => BlockDEPRECATED) internal blocksDEPRECATED; - /// @notice Flag indicates that a user has exited in the exodus mode certain token balance (per account id and tokenId) - mapping(uint32 => mapping(uint16 => bool)) public performedExodus; + /// @dev Flag indicates that a user has exited in the exodus mode certain token balance (per account id and tokenId) + mapping(uint32 => mapping(uint16 => bool)) internal performedExodus; - /// @notice Flag indicates that exodus (mass exit) mode is triggered - /// @notice Once it was raised, it can not be cleared again, and all users must exit - bool public exodusMode; + /// @dev Flag indicates that exodus (mass exit) mode is triggered + /// @dev Once it was raised, it can not be cleared again, and all users must exit + bool internal exodusMode; - /// @notice User authenticated fact hashes for some nonce. - mapping(address => mapping(uint32 => bytes32)) public authFacts; + /// @dev User authenticated fact hashes for some nonce. + mapping(address => mapping(uint32 => bytes32)) internal authFacts; /// @notice Old Priority Operation container /// @member opType Priority operation type @@ -97,15 +97,15 @@ contract Storage { /// @dev Numbers are in order of requests receiving mapping(uint64 => PriorityOperationDEPRECATED) internal priorityRequestsDEPRECATED; - /// @notice First open priority request id - uint64 public firstPriorityRequestId; + /// @dev First open priority request id + uint64 internal firstPriorityRequestId; - /// @notice Total number of requests - uint64 public totalOpenPriorityRequests; + /// @dev Total number of requests + uint64 internal totalOpenPriorityRequests; - /// @notice Total number of committed requests. + /// @dev Total number of committed requests. /// @dev Used in checks: if the request matches the operation on Rollup contract and if provided number of requests is not too big - uint64 public totalCommittedPriorityRequests; + uint64 internal totalCommittedPriorityRequests; /// @notice Packs address and token id into single word to use as a key in balances mapping function packAddressAndTokenId(address _address, uint16 _tokenId) internal pure returns (bytes22) { @@ -136,8 +136,8 @@ contract Storage { /// @dev Stored hashed StoredBlockInfo for some block number mapping(uint32 => bytes32) internal storedBlockHashes; - /// @notice Total blocks proven. - uint32 public totalBlocksProven; + /// @dev Total blocks proven. + uint32 internal totalBlocksProven; /// @notice Priority Operation container /// @member hashedPubData Hashed priority operation public data