Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing docstrings #157

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ethereum/contracts/upgrades/BaseZkSyncUpgrade.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions zksync/contracts/bridge/L2ERC20Bridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
9 changes: 8 additions & 1 deletion zksync/contracts/bridge/L2StandardERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading