Skip to content

Commit

Permalink
Merge pull request #146 from matter-labs/sb-clear-visibility
Browse files Browse the repository at this point in the history
Use more clear visibility for variables and constants
  • Loading branch information
StanislavBreadless authored Jan 16, 2024
2 parents 6351179 + 93c019d commit fa3344b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ethereum/contracts/common/libraries/L2ContractHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pragma solidity 0.8.20;
*/
library L2ContractHelper {
/// @dev The prefix used to create CREATE2 addresses.
bytes32 constant CREATE2_PREFIX = keccak256("zksyncCreate2");
bytes32 private constant CREATE2_PREFIX = keccak256("zksyncCreate2");

/// @notice Validate the bytecode format and calculate its hash.
/// @param _bytecode The bytecode to hash.
Expand Down
4 changes: 2 additions & 2 deletions ethereum/contracts/zksync/libraries/Diamond.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ library Diamond {

/// @dev Magic value that should be returned by diamond cut initialize contracts.
/// @dev Used to distinguish calls to contracts that were supposed to be used as diamond initializer from other contracts.
bytes32 constant DIAMOND_INIT_SUCCESS_RETURN_VALUE =
bytes32 internal constant DIAMOND_INIT_SUCCESS_RETURN_VALUE =
0x33774e659306e47509050e97cb651e731180a42d458212294d30751925c551a2; // keccak256("diamond.zksync.init") - 1

/// @dev Storage position of `DiamondStorage` structure.
bytes32 constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b; // keccak256("diamond.standard.diamond.storage") - 1;
bytes32 private constant DIAMOND_STORAGE_POSITION = 0xc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131b; // keccak256("diamond.standard.diamond.storage") - 1;

event DiamondCut(FacetCut[] facetCuts, address initAddress, bytes initCalldata);

Expand Down
2 changes: 1 addition & 1 deletion zksync/contracts/L2ContractHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ IEthToken constant L2_ETH_ADDRESS = IEthToken(address(SYSTEM_CONTRACTS_OFFSET +
*/
library L2ContractHelper {
/// @dev The prefix used to create CREATE2 addresses.
bytes32 constant CREATE2_PREFIX = keccak256("zksyncCreate2");
bytes32 private constant CREATE2_PREFIX = keccak256("zksyncCreate2");

/// @notice Sends L2 -> L1 arbitrary-long message through the system contract messenger.
/// @param _message Data to be sent to L1.
Expand Down
2 changes: 1 addition & 1 deletion zksync/contracts/bridge/L2StandardERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ contract L2StandardERC20 is ERC20PermitUpgradeable, IL2StandardToken, ERC1967Upg
bool ignoreDecimals;
}

ERC20Getters availableGetters;
ERC20Getters private availableGetters;

/// @dev The decimals of the token, that are used as a value for `decimals` getter function.
/// @notice A private variable is used only for decimals, but not for `name` and `symbol`, because standard
Expand Down

0 comments on commit fa3344b

Please sign in to comment.