Skip to content

Commit 9bf1e0c

Browse files
committed
doc comment fixes
1 parent 6240860 commit 9bf1e0c

File tree

7 files changed

+12
-11
lines changed

7 files changed

+12
-11
lines changed

l1-contracts/contracts/bridge/L1ERC20Bridge.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ contract L1ERC20Bridge is IL1ERC20Bridge, ReentrancyGuard {
134134
if (isWithdrawalFinalized[_l2BatchNumber][_l2MessageIndex]) {
135135
revert WithdrawalAlreadyFinalized();
136136
}
137-
// We don't need to set finalizeWithdrawal here, as we set it in the shared bridge
137+
// We don't need to set finalizeWithdrawal here, as we set it in the L1 Nullifier
138138

139139
FinalizeL1DepositParams memory finalizeWithdrawalParams = FinalizeL1DepositParams({
140140
chainId: ERA_CHAIN_ID,
@@ -221,7 +221,7 @@ contract L1ERC20Bridge is IL1ERC20Bridge, ReentrancyGuard {
221221
ERA LEGACY FUNCTIONS
222222
//////////////////////////////////////////////////////////////*/
223223

224-
/// @dev Transfers tokens from the depositor address to the native token vault address.
224+
/// @dev Transfers tokens from the depositor address to the asset router address.
225225
/// @return The difference between the contract balance before and after the transferring of funds.
226226
function _approveFundsToAssetRouter(address _from, IERC20 _token, uint256 _amount) internal returns (uint256) {
227227
uint256 balanceBefore = _token.balanceOf(address(this));

l1-contracts/contracts/bridge/ntv/NativeTokenVault.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ abstract contract NativeTokenVault is
122122
//////////////////////////////////////////////////////////////*/
123123

124124
/// @inheritdoc IAssetHandler
125-
/// @notice Used when the chain receives a transfer from L1 Shared Bridge and correspondingly mints the asset.
125+
/// @notice Used when the chain receives a transfer from another chain's Asset Router and correspondingly mints the asset.
126126
/// @param _chainId The chainId that the message is from.
127127
/// @param _assetId The assetId of the asset being bridged.
128128
/// @param _data The abi.encoded transfer data.

l1-contracts/contracts/common/libraries/DataEncoding.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ library DataEncoding {
131131
/// @param _originalCaller The address of the entity that initiated the deposit.
132132
/// @param _assetId The unique identifier of the deposited L1 token.
133133
/// @param _nativeTokenVault The address of the token, only used if the encoding version is legacy.
134-
/// @param _transferData The encoded transfer data, which includes both the deposit amount and the address of the L2 receiver.
134+
/// @param _transferData The encoded transfer data, which includes the deposit amount, the address of the L2 receiver, and potentially the token address.
135135
/// @return txDataHash The resulting encoded transaction data hash.
136136
function encodeTxDataHash(
137137
bytes1 _encodingVersion,

l1-contracts/contracts/common/libraries/L2ContractHelper.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ library L2ContractHelper {
184184
for (uint256 i = 0; i < factoryDepsLen; i = i.uncheckedInc()) {
185185
bytes32 hashedBytecode = hashL2Bytecode(_factoryDeps[i]);
186186

187-
// Store the resulting hash sequentially in bytes.
187+
// Store the resulting hash sequentially in words.
188188
assembly {
189189
mstore(add(hashedFactoryDeps, mul(add(i, 1), 32)), hashedBytecode)
190190
}

l1-contracts/contracts/common/libraries/Merkle.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ library Merkle {
3737
}
3838

3939
/// @dev Calculate Merkle root by the provided Merkle proof.
40-
/// NOTE: When using this function, check that the _path length is equal to the tree height to prevent shorter/longer paths attack
40+
/// @dev NOTE: When using this function, check that the _path length is appropriate to prevent shorter/longer paths attack
4141
/// @param _path Merkle path from the leaf to the root
42-
/// @param _index Leaf index in the tree
42+
/// @param _index Leaf index in the tree.
43+
/// @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.
4344
/// @param _itemHash Hash of leaf content
4445
/// @return The Merkle root
4546
function calculateRootMemory(

l1-contracts/contracts/state-transition/ChainTypeManager.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {IBridgehub} from "../bridgehub/IBridgehub.sol";
2222

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

25-
/// @title State Transition Manager contract
25+
/// @title Chain Type Manager contract
2626
/// @author Matter Labs
2727
/// @custom:security-contact [email protected]
2828
contract ChainTypeManager is IChainTypeManager, ReentrancyGuard, Ownable2StepUpgradeable {

system-contracts/contracts/MsgValueSimulator.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ import {InvalidCall} from "./SystemContractErrors.sol";
2020
contract MsgValueSimulator is SystemContractBase {
2121
/// @notice Extract value, isSystemCall and to from the extraAbi params.
2222
/// @dev The contract accepts value, the callee and whether the call should be a system one via its ABI params.
23-
/// @dev The first ABI param contains the value. The second one contains
24-
/// the address to call, while the third one contains whether the `systemCall` flag should
25-
/// be used (this can be helpful when e.g. calling `ContractDeployer`).
23+
/// @dev The first ABI param contains the value. The second one contains whether the `systemCall` flag should
24+
/// be used (this can be helpful when e.g. calling `ContractDeployer`),
25+
/// while the third one contains the address to call.
2626
function _getAbiParams() internal view returns (uint256 value, bool isSystemCall, address to) {
2727
value = SystemContractHelper.getExtraAbiData(0);
2828
uint256 addressAsUint = SystemContractHelper.getExtraAbiData(1);

0 commit comments

Comments
 (0)