diff --git a/contracts/contracts/AdditionalZkSync.sol b/contracts/contracts/AdditionalZkSync.sol index b2738b2a35..6b8c61edaa 100644 --- a/contracts/contracts/AdditionalZkSync.sol +++ b/contracts/contracts/AdditionalZkSync.sol @@ -47,7 +47,7 @@ contract AdditionalZkSync is Storage, Config, Events, ReentrancyGuard { address _nftCreatorAddress, uint32 _nftSerialId, bytes32 _nftContentHash, - uint256[] memory _proof + uint256[] calldata _proof ) external { require(_accountId <= MAX_ACCOUNT_ID, "e"); require(_accountId != SPECIAL_ACCOUNT_ID, "v"); @@ -91,7 +91,7 @@ contract AdditionalZkSync is Storage, Config, Events, ReentrancyGuard { performedExodus[_accountId][_tokenId] = true; } - function cancelOutstandingDepositsForExodusMode(uint64 _n, bytes[] memory _depositsPubdata) external { + function cancelOutstandingDepositsForExodusMode(uint64 _n, bytes[] calldata _depositsPubdata) external { require(exodusMode, "8"); // exodus mode not active uint64 toProcess = Utils.minU64(totalOpenPriorityRequests, _n); require(toProcess > 0, "9"); // no deposits to process @@ -114,6 +114,9 @@ contract AdditionalZkSync is Storage, Config, Events, ReentrancyGuard { uint256 internal constant SECURITY_COUNCIL_THRESHOLD = $$(SECURITY_COUNCIL_THRESHOLD); + /// @notice processing new approval of decrease upgrade notice period time to zero + /// @param addr address of the account that approved the reduction of the upgrade notice period to zero + /// NOTE: does NOT revert if the address is not a security council member or number of approvals is already sufficient function approveCutUpgradeNoticePeriod(address addr) internal { address payable[SECURITY_COUNCIL_MEMBERS_NUMBER] memory SECURITY_COUNCIL_MEMBERS = [ $(SECURITY_COUNCIL_MEMBERS) @@ -124,7 +127,7 @@ contract AdditionalZkSync is Storage, Config, Events, ReentrancyGuard { numberOfApprovalsFromSecurityCouncil += 1; emit ApproveCutUpgradeNoticePeriod(addr); - if (numberOfApprovalsFromSecurityCouncil == SECURITY_COUNCIL_THRESHOLD) { + if (numberOfApprovalsFromSecurityCouncil >= SECURITY_COUNCIL_THRESHOLD) { if (approvedUpgradeNoticePeriod > 0) { approvedUpgradeNoticePeriod = 0; emit NoticePeriodChange(approvedUpgradeNoticePeriod); @@ -209,7 +212,7 @@ contract AdditionalZkSync is Storage, Config, Events, ReentrancyGuard { } /// @notice Reverts unverified blocks - function revertBlocks(StoredBlockInfo[] memory _blocksToRevert) external { + function revertBlocks(StoredBlockInfo[] calldata _blocksToRevert) external { requireActive(); governance.requireActiveValidator(msg.sender); diff --git a/contracts/contracts/IERC20.sol b/contracts/contracts/IERC20.sol index 6501389ea1..a9bda5c8d5 100644 --- a/contracts/contracts/IERC20.sol +++ b/contracts/contracts/IERC20.sol @@ -77,7 +77,7 @@ interface IERC20 { /// @dev Interface of the ERC20 standard as defined in the EIP. /// 1. Implements only `transfer` and `transferFrom` methods -/// 2. These methods return a boolean which indicates success of the transaction +/// 2. These methods return a boolean value which indicates success of the transaction /// Note: It is assumed that the interface applies to those `ERC20` tokens whose code exactly matches the standard. /// Note: Used to perform transfers for tokens that explicitly return a boolean value /// (if the token returns any other data or does not return at all, then the function call will reverted) diff --git a/contracts/contracts/Verifier.sol b/contracts/contracts/Verifier.sol index 8b65726f13..c6f82d222b 100644 --- a/contracts/contracts/Verifier.sol +++ b/contracts/contracts/Verifier.sol @@ -18,7 +18,7 @@ contract Verifier is KeysWithPlonkVerifier, KeysWithPlonkVerifierOld, Config { function verifyAggregatedBlockProof( uint256[] memory _recursiveInput, - uint256[] memory _proof, + uint256[] calldata _proof, uint8[] memory _vkIndexes, uint256[] memory _individualVksInputs, uint256[16] memory _subproofsLimbs diff --git a/contracts/contracts/ZkSync.sol b/contracts/contracts/ZkSync.sol index 3e423ee955..ab397e6f32 100644 --- a/contracts/contracts/ZkSync.sol +++ b/contracts/contracts/ZkSync.sol @@ -201,7 +201,7 @@ contract ZkSync is UpgradeableMaster, Storage, Config, Events, ReentrancyGuard { /// @dev WARNING: Only for Exodus mode /// @dev Canceling may take several separate transactions to be completed /// @param _n number of requests to process - function cancelOutstandingDepositsForExodusMode(uint64 _n, bytes[] memory _depositsPubdata) external { + function cancelOutstandingDepositsForExodusMode(uint64 _n, bytes[] calldata _depositsPubdata) external { // All functions delegated to additional contract should NOT be nonReentrant delegateAdditional(); } @@ -603,7 +603,7 @@ contract ZkSync is UpgradeableMaster, Storage, Config, Events, ReentrancyGuard { } /// @notice Reverts unverified blocks - function revertBlocks(StoredBlockInfo[] memory _blocksToRevert) external { + function revertBlocks(StoredBlockInfo[] calldata _blocksToRevert) external { // All functions delegated to additional contract should NOT be nonReentrant delegateAdditional(); } @@ -645,7 +645,7 @@ contract ZkSync is UpgradeableMaster, Storage, Config, Events, ReentrancyGuard { address _nftCreatorAddress, uint32 _nftSerialId, bytes32 _nftContentHash, - uint256[] memory _proof + uint256[] calldata _proof ) external { // All functions delegated to additional should NOT be nonReentrant delegateAdditional();