Skip to content

Commit

Permalink
doc comment fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kelemeno committed Feb 6, 2025
1 parent 6240860 commit 9bf1e0c
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions l1-contracts/contracts/bridge/L1ERC20Bridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ contract L1ERC20Bridge is IL1ERC20Bridge, ReentrancyGuard {
if (isWithdrawalFinalized[_l2BatchNumber][_l2MessageIndex]) {
revert WithdrawalAlreadyFinalized();
}
// We don't need to set finalizeWithdrawal here, as we set it in the shared bridge
// We don't need to set finalizeWithdrawal here, as we set it in the L1 Nullifier

FinalizeL1DepositParams memory finalizeWithdrawalParams = FinalizeL1DepositParams({
chainId: ERA_CHAIN_ID,
Expand Down Expand Up @@ -221,7 +221,7 @@ contract L1ERC20Bridge is IL1ERC20Bridge, ReentrancyGuard {
ERA LEGACY FUNCTIONS
//////////////////////////////////////////////////////////////*/

/// @dev Transfers tokens from the depositor address to the native token vault address.
/// @dev Transfers tokens from the depositor address to the asset router address.
/// @return The difference between the contract balance before and after the transferring of funds.
function _approveFundsToAssetRouter(address _from, IERC20 _token, uint256 _amount) internal returns (uint256) {
uint256 balanceBefore = _token.balanceOf(address(this));
Expand Down
2 changes: 1 addition & 1 deletion l1-contracts/contracts/bridge/ntv/NativeTokenVault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ abstract contract NativeTokenVault is
//////////////////////////////////////////////////////////////*/

/// @inheritdoc IAssetHandler
/// @notice Used when the chain receives a transfer from L1 Shared Bridge and correspondingly mints the asset.
/// @notice Used when the chain receives a transfer from another chain's Asset Router and correspondingly mints the asset.
/// @param _chainId The chainId that the message is from.
/// @param _assetId The assetId of the asset being bridged.
/// @param _data The abi.encoded transfer data.
Expand Down
2 changes: 1 addition & 1 deletion l1-contracts/contracts/common/libraries/DataEncoding.sol
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ library DataEncoding {
/// @param _originalCaller The address of the entity that initiated the deposit.
/// @param _assetId The unique identifier of the deposited L1 token.
/// @param _nativeTokenVault The address of the token, only used if the encoding version is legacy.
/// @param _transferData The encoded transfer data, which includes both the deposit amount and the address of the L2 receiver.
/// @param _transferData The encoded transfer data, which includes the deposit amount, the address of the L2 receiver, and potentially the token address.
/// @return txDataHash The resulting encoded transaction data hash.
function encodeTxDataHash(
bytes1 _encodingVersion,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ library L2ContractHelper {
for (uint256 i = 0; i < factoryDepsLen; i = i.uncheckedInc()) {
bytes32 hashedBytecode = hashL2Bytecode(_factoryDeps[i]);

// Store the resulting hash sequentially in bytes.
// Store the resulting hash sequentially in words.
assembly {
mstore(add(hashedFactoryDeps, mul(add(i, 1), 32)), hashedBytecode)
}
Expand Down
5 changes: 3 additions & 2 deletions l1-contracts/contracts/common/libraries/Merkle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ library Merkle {
}

/// @dev Calculate Merkle root by the provided Merkle proof.
/// NOTE: When using this function, check that the _path length is equal to the tree height to prevent shorter/longer paths attack
/// @dev NOTE: When using this function, check that the _path length is appropriate to prevent shorter/longer paths attack
/// @param _path Merkle path from the leaf to the root
/// @param _index Leaf index in the tree
/// @param _index Leaf index in the tree.
/// @dev NOTE the tree can be joined. In this case the second tree's leaves indexes increase by the number of leaves in the first tree.
/// @param _itemHash Hash of leaf content
/// @return The Merkle root
function calculateRootMemory(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {IBridgehub} from "../bridgehub/IBridgehub.sol";

import {ReentrancyGuard} from "../common/ReentrancyGuard.sol";

/// @title State Transition Manager contract
/// @title Chain Type Manager contract
/// @author Matter Labs
/// @custom:security-contact [email protected]
contract ChainTypeManager is IChainTypeManager, ReentrancyGuard, Ownable2StepUpgradeable {
Expand Down
6 changes: 3 additions & 3 deletions system-contracts/contracts/MsgValueSimulator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import {InvalidCall} from "./SystemContractErrors.sol";
contract MsgValueSimulator is SystemContractBase {
/// @notice Extract value, isSystemCall and to from the extraAbi params.
/// @dev The contract accepts value, the callee and whether the call should be a system one via its ABI params.
/// @dev The first ABI param contains the value. The second one contains
/// the address to call, while the third one contains whether the `systemCall` flag should
/// be used (this can be helpful when e.g. calling `ContractDeployer`).
/// @dev The first ABI param contains the value. The second one contains whether the `systemCall` flag should
/// be used (this can be helpful when e.g. calling `ContractDeployer`),
/// while the third one contains the address to call.
function _getAbiParams() internal view returns (uint256 value, bool isSystemCall, address to) {
value = SystemContractHelper.getExtraAbiData(0);
uint256 addressAsUint = SystemContractHelper.getExtraAbiData(1);
Expand Down

0 comments on commit 9bf1e0c

Please sign in to comment.