diff --git a/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol b/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol index 71e57badc..4dc7bd579 100644 --- a/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol +++ b/ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol @@ -59,6 +59,9 @@ abstract contract BaseZkSyncUpgrade is Base { event UpgradeComplete(uint256 indexed newProtocolVersion, bytes32 indexed l2UpgradeTxHash, ProposedUpgrade upgrade); /// @notice The main function that will be provided by the upgrade proxy + /// @dev This is a virtual function and should be overridden by custom upgrade implementations. + /// @param _proposedUpgrade The upgrade to be executed. + /// @return The hash of the L2 system contract upgrade transaction. function upgrade(ProposedUpgrade calldata _proposedUpgrade) public virtual returns (bytes32) { // Note that due to commitment delay, the timestamp of the L2 upgrade batch may be earlier than the timestamp // of the L1 block at which the upgrade occured. This means that using timestamp as a signifier of "upgraded" diff --git a/zksync/contracts/bridge/L2ERC20Bridge.sol b/zksync/contracts/bridge/L2ERC20Bridge.sol index b044160fb..1b3589f33 100644 --- a/zksync/contracts/bridge/L2ERC20Bridge.sol +++ b/zksync/contracts/bridge/L2ERC20Bridge.sol @@ -37,6 +37,10 @@ contract L2ERC20Bridge is IL2Bridge, Initializable { _disableInitializers(); } + /// @notice Initializes the bridge contract for later use. Expected to be used in the proxy. + /// @param _l1Bridge The address of the L1 Bridge contract. + /// @param _l2TokenProxyBytecodeHash The bytecode hash of the proxy for tokens deployed by the bridge. + /// @param _governor The address of the governor contract. function initialize(address _l1Bridge, bytes32 _l2TokenProxyBytecodeHash, address _governor) external initializer { require(_l1Bridge != address(0), "bf"); require(_l2TokenProxyBytecodeHash != bytes32(0), "df"); diff --git a/zksync/contracts/bridge/L2StandardERC20.sol b/zksync/contracts/bridge/L2StandardERC20.sol index d95f397f3..9c5b59a14 100644 --- a/zksync/contracts/bridge/L2StandardERC20.sol +++ b/zksync/contracts/bridge/L2StandardERC20.sol @@ -100,7 +100,14 @@ contract L2StandardERC20 is ERC20PermitUpgradeable, IL2StandardToken, ERC1967Upg emit BridgeInitialize(_l1Address, decodedName, decodedSymbol, decimals_); } - // Method which is to be used by bridge if a token needs to change its name, symbol or decimals. + /// @notice Method which is to be used by the governor if a token needs to change its name, symbol or decimals. + /// @param _availableGetters The set of getters that the token has. + /// @param _newName The new name of the token. + /// @param _newSymbol The new symbol of the token. + /// @param _newDecimals The new decimals of the token. + /// @param _version The version of the token that is to be initialized. The version is the number of times + /// the token was reinitialized. The first version is 1. + /// @dev The versions must be strictly incrementally increasing, i.e. it is not possible to "jump" between two versions. function reinitializeToken( ERC20Getters calldata _availableGetters, string memory _newName,