diff --git a/ethereum/contracts/zksync/interfaces/IAdmin.sol b/ethereum/contracts/zksync/interfaces/IAdmin.sol index e4e6fd709..4ef552f9b 100644 --- a/ethereum/contracts/zksync/interfaces/IAdmin.sol +++ b/ethereum/contracts/zksync/interfaces/IAdmin.sol @@ -5,6 +5,9 @@ pragma solidity 0.8.20; import {IBase} from "./IBase.sol"; import {Diamond} from "../libraries/Diamond.sol"; +/// @title The interface of the Admin Contract that controls access rights for contract management. +/// @author Matter Labs +/// @custom:security-contact security@matterlabs.dev interface IAdmin is IBase { /// @notice Starts the transfer of governor rights. Only the current governor can propose a new pending one. /// @notice New governor can accept governor rights by calling `acceptGovernor` function. diff --git a/ethereum/contracts/zksync/interfaces/IBase.sol b/ethereum/contracts/zksync/interfaces/IBase.sol index 3076ae2d1..bbe7af652 100644 --- a/ethereum/contracts/zksync/interfaces/IBase.sol +++ b/ethereum/contracts/zksync/interfaces/IBase.sol @@ -1,6 +1,9 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.20; +/// @title The interface of the zkSync contract, responsible for the main zkSync logic. +/// @author Matter Labs +/// @custom:security-contact security@matterlabs.dev interface IBase { /// @return Returns facet name. function getName() external view returns (string memory); diff --git a/ethereum/contracts/zksync/interfaces/IExecutor.sol b/ethereum/contracts/zksync/interfaces/IExecutor.sol index ec0e8507b..379907b0f 100644 --- a/ethereum/contracts/zksync/interfaces/IExecutor.sol +++ b/ethereum/contracts/zksync/interfaces/IExecutor.sol @@ -25,6 +25,9 @@ uint256 constant L2_LOG_KEY_OFFSET = 24; /// @dev Offset used to pull Value From Log. Equal to 4 (bytes for isService) + 20 (bytes for address) + 32 (bytes for key) uint256 constant L2_LOG_VALUE_OFFSET = 56; +/// @title The interface of the zkSync Executor contract capable of processing events emitted in the zkSync protocol. +/// @author Matter Labs +/// @custom:security-contact security@matterlabs.dev interface IExecutor is IBase { /// @notice Rollup batch stored data /// @param batchNumber Rollup batch number diff --git a/ethereum/contracts/zksync/interfaces/IGetters.sol b/ethereum/contracts/zksync/interfaces/IGetters.sol index 2efd3aafe..3bfa21d7d 100644 --- a/ethereum/contracts/zksync/interfaces/IGetters.sol +++ b/ethereum/contracts/zksync/interfaces/IGetters.sol @@ -6,6 +6,9 @@ import {PriorityOperation} from "../libraries/PriorityQueue.sol"; import {VerifierParams, UpgradeState} from "../Storage.sol"; import "./IBase.sol"; +/// @title The interface of the Getters Contract that implements functions for getting contract state from outside the blockchain. +/// @author Matter Labs +/// @custom:security-contact security@matterlabs.dev interface IGetters is IBase { /*////////////////////////////////////////////////////////////// CUSTOM GETTERS diff --git a/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol b/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol index db47a1148..2ecc9dde8 100644 --- a/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol +++ b/ethereum/contracts/zksync/interfaces/ILegacyGetters.sol @@ -7,6 +7,7 @@ import {IBase} from "./IBase.sol"; /// @author Matter Labs /// @dev This interface contains getters for the zkSync contract that should not be used, /// but still are kept for backward compatibility. +/// @custom:security-contact security@matterlabs.dev interface ILegacyGetters is IBase { /// @return The total number of batches that were committed /// @dev It is a *deprecated* method, please use `getTotalBatchesCommitted` instead diff --git a/ethereum/contracts/zksync/interfaces/IMailbox.sol b/ethereum/contracts/zksync/interfaces/IMailbox.sol index 77d816799..6fbe09c86 100644 --- a/ethereum/contracts/zksync/interfaces/IMailbox.sol +++ b/ethereum/contracts/zksync/interfaces/IMailbox.sol @@ -13,6 +13,9 @@ enum TxStatus { Success } +/// @title The interface of the zkSync Mailbox contract that provides interfaces for L1 <-> L2 interaction. +/// @author Matter Labs +/// @custom:security-contact security@matterlabs.dev interface IMailbox is IBase { /// @dev Structure that includes all fields of the L2 transaction /// @dev The hash of this structure is the "canonical L2 transaction hash" and can be used as a unique identifier of a tx diff --git a/ethereum/contracts/zksync/interfaces/IVerifier.sol b/ethereum/contracts/zksync/interfaces/IVerifier.sol index 7638a577c..1fbac964c 100644 --- a/ethereum/contracts/zksync/interfaces/IVerifier.sol +++ b/ethereum/contracts/zksync/interfaces/IVerifier.sol @@ -2,6 +2,9 @@ pragma solidity 0.8.20; +/// @title The interface of the Verifier contract, responsible for the zero knowledge proof verification. +/// @author Matter Labs +/// @custom:security-contact security@matterlabs.dev interface IVerifier { /// @dev Verifies a zk-SNARK proof. /// @return A boolean value indicating whether the zk-SNARK proof is valid. diff --git a/ethereum/contracts/zksync/interfaces/IZkSync.sol b/ethereum/contracts/zksync/interfaces/IZkSync.sol index 9f58e16b6..12f6eb6ca 100644 --- a/ethereum/contracts/zksync/interfaces/IZkSync.sol +++ b/ethereum/contracts/zksync/interfaces/IZkSync.sol @@ -7,4 +7,10 @@ import {IAdmin} from "./IAdmin.sol"; import {IExecutor} from "./IExecutor.sol"; import {IGetters} from "./IGetters.sol"; -interface IZkSync is IMailbox, IAdmin, IExecutor, IGetters {} +/// @title The interface of the zkSync contract, responsible for the main zkSync logic. +/// @author Matter Labs +/// @dev This interface combines the interfaces of all the facets of the zkSync contract. +/// @custom:security-contact security@matterlabs +interface IZkSync is IMailbox, IAdmin, IExecutor, IGetters { + +}