@@ -104,7 +104,7 @@ contract HubPool is HubPoolInterface, Testable, Lockable, MultiCaller, Ownable {
104104 // Mapping of L1 token addresses to the associated pool information.
105105 mapping (address => PooledToken) public pooledTokens;
106106
107- // Heler contracts to facilitate cross chain actions between HubPool and SpokePool for a specific network.
107+ // Helper contracts to facilitate cross chain actions between HubPool and SpokePool for a specific network.
108108 struct CrossChainContract {
109109 address adapter;
110110 address spokePool;
@@ -222,7 +222,7 @@ contract HubPool is HubPoolInterface, Testable, Lockable, MultiCaller, Ownable {
222222 event RootBundleCanceled (address indexed disputer , uint256 requestTime , bytes disputedAncillaryData );
223223
224224 modifier noActiveRequests () {
225- require (! _activeRequest (), "proposal has unclaimed leafs " );
225+ require (! _activeRequest (), "Proposal has unclaimed leaves " );
226226 _;
227227 }
228228
@@ -289,8 +289,8 @@ contract HubPool is HubPoolInterface, Testable, Lockable, MultiCaller, Ownable {
289289
290290 /**
291291 * @notice Sends message to SpokePool from this contract. Callable only by owner.
292- * @dev This function has permission to call onlyAdmin functions on the SpokePool, so its imperative
293- * that this contract only allows the owner to call this method directly or indirectly.
292+ * @dev This function has permission to call onlyAdmin functions on the SpokePool, so it's imperative that this
293+ * contract only allows the owner to call this method directly or indirectly.
294294 * @param chainId Chain with SpokePool to send message to.
295295 * @param functionData ABI encoded function call to send to SpokePool, but can be any arbitrary data technically.
296296 */
@@ -361,7 +361,7 @@ contract HubPool is HubPoolInterface, Testable, Lockable, MultiCaller, Ownable {
361361 }
362362
363363 /**
364- * @notice Sets identifier for root bundle disputes.. Callable only by owner.
364+ * @notice Sets identifier for root bundle disputes. Callable only by owner.
365365 * @param newIdentifier New identifier.
366366 */
367367 function setIdentifier (bytes32 newIdentifier ) public override onlyOwner noActiveRequests nonReentrant {
@@ -477,7 +477,7 @@ contract HubPool is HubPoolInterface, Testable, Lockable, MultiCaller, Ownable {
477477 * @notice Deposit liquidity into this contract to earn LP fees in exchange for funding relays on SpokePools.
478478 * Caller is essentially loaning their funds to be sent from this contract to the SpokePool, where it will be used
479479 * to repay a relayer, and ultimately receives their loan back after the tokens are bridged back to this contract
480- * via the canonical token bridge. Then, the caller's loans are used for again. This loan cycle repeats continuously
480+ * via the canonical token bridge. Then, the caller's loans are used again. This loan cycle repeats continuously
481481 * and the caller, or "liquidity provider" earns a continuous fee for their credit that they are extending relayers.
482482 * @notice Caller will receive an LP token representing their share of this pool. The LP token's redemption value
483483 * increments from the time that they enter the pool to reflect their accrued fees.
@@ -581,12 +581,12 @@ contract HubPool is HubPoolInterface, Testable, Lockable, MultiCaller, Ownable {
581581 *************************************************/
582582
583583 /**
584- * @notice Publish a new root bundle to along with all of the block numbers that the merkle roots are relevant for.
584+ * @notice Publish a new root bundle along with all of the block numbers that the merkle roots are relevant for.
585585 * This is used to aid off-chain validators in evaluating the correctness of this bundle. Caller stakes a bond that
586586 * can be slashed if the root bundle proposal is invalid, and they will receive it back if accepted.
587587 * @notice After proposeRootBundle is called, if the any props are wrong then this proposal can be challenged.
588588 * Once the challenge period passes, then the roots are no longer disputable, and only executeRootBundle can be
589- * called; moreover, this method can't be called again until all leafs are executed.
589+ * called; moreover, this method can't be called again until all leaves are executed.
590590 * @param bundleEvaluationBlockNumbers should contain the latest block number for all chains, even if there are no
591591 * relays contained on some of them. The usage of this variable should be defined in an off chain UMIP.
592592 * @notice The caller of this function must approve this contract to spend bondAmount of bondToken.
@@ -641,7 +641,7 @@ contract HubPool is HubPoolInterface, Testable, Lockable, MultiCaller, Ownable {
641641 * @notice Deletes the published root bundle if this is the last leaf to be executed in the root bundle.
642642 * @param chainId ChainId number of the target spoke pool on which the bundle is executed.
643643 * @param groupIndex If set to 0, then relay roots to SpokePool via cross chain bridge. Used by off-chain validator
644- * to organize leafs with the same chain ID and also set which leaves should result in relayed messages.
644+ * to organize leaves with the same chain ID and also set which leaves should result in relayed messages.
645645 * @param bundleLpFees Array representing the total LP fee amount per token in this bundle for all bundled relays.
646646 * @param netSendAmounts Array representing the amount of tokens to send to the SpokePool on the target chainId.
647647 * @param runningBalances Array used to track any unsent tokens that are not included in the netSendAmounts.
@@ -694,6 +694,7 @@ contract HubPool is HubPoolInterface, Testable, Lockable, MultiCaller, Ownable {
694694 rootBundleProposal.unclaimedPoolRebalanceLeafCount-- ;
695695
696696 // Relay each L1 token to destination chain.
697+
697698 // Note: if any of the keccak256(l1Tokens, chainId) combinations are not mapped to a destination token address,
698699 // then this internal method will revert. In this case the admin will have to associate a destination token
699700 // with each l1 token. If the destination token mapping was missing at the time of the proposal, we assume
@@ -726,8 +727,8 @@ contract HubPool is HubPoolInterface, Testable, Lockable, MultiCaller, Ownable {
726727 require (success, "delegatecall failed " );
727728 }
728729
729- // Transfer the bondAmount to back to the proposer, if this the last executed leaf. Only sending this once all
730- // leafs have been executed acts to force the data worker to execute all bundles or they wont receive their bond.
730+ // Transfer the bondAmount back to the proposer, if this the last executed leaf. Only sending this once all
731+ // leaves have been executed acts to force the data worker to execute all bundles or they won't receive their bond.
731732 if (rootBundleProposal.unclaimedPoolRebalanceLeafCount == 0 )
732733 bondToken.safeTransfer (rootBundleProposal.proposer, bondAmount);
733734
@@ -780,8 +781,7 @@ contract HubPool is HubPoolInterface, Testable, Lockable, MultiCaller, Ownable {
780781 // Set reward to 0, since we'll settle proposer reward payouts directly from this contract after a root
781782 // proposal has passed the challenge period.
782783 0 ,
783- // Set the Optimistic oracle proposer bond for the price request. We can assume that
784- // bondAmount > finalFee.
784+ // Set the Optimistic oracle proposer bond for the request. We can assume that bondAmount > finalFee.
785785 bondAmount - finalFee,
786786 // Set the Optimistic oracle liveness for the price request.
787787 liveness,
@@ -984,7 +984,7 @@ contract HubPool is HubPoolInterface, Testable, Lockable, MultiCaller, Ownable {
984984 // Calculate the unallocated accumulatedFees from the last time the contract was called.
985985 function _getAccumulatedFees (uint256 undistributedLpFees , uint256 lastLpFeeUpdate ) internal view returns (uint256 ) {
986986 // accumulatedFees := min(undistributedLpFees * lpFeeRatePerSecond * timeFromLastInteraction, undistributedLpFees)
987- // The min acts to pay out all fees in the case the equation returns more than the remaining a fees.
987+ // The min acts to pay out all fees in the case the equation returns more than the remaining fees.
988988 uint256 timeFromLastInteraction = getCurrentTime () - lastLpFeeUpdate;
989989 uint256 maxUndistributedLpFees = (undistributedLpFees * lpFeeRatePerSecond * timeFromLastInteraction) / (1e18 );
990990 return maxUndistributedLpFees < undistributedLpFees ? maxUndistributedLpFees : undistributedLpFees;
@@ -1031,7 +1031,7 @@ contract HubPool is HubPoolInterface, Testable, Lockable, MultiCaller, Ownable {
10311031 uint256 lpFeesCaptured = bundleLpFees - protocolFeesCaptured;
10321032
10331033 // Assign any LP fees included into the bundle to the pooled token. These LP fees are tracked in the
1034- // undistributedLpFees and within the utilizedReserves. undistributedLpFees is gradually decrease
1034+ // undistributedLpFees and within the utilizedReserves. undistributedLpFees is gradually decreased
10351035 // over the smear duration to give the LPs their rewards over a period of time. Adding to utilizedReserves
10361036 // acts to track these rewards after the smear duration. See _exchangeRateCurrent for more details.
10371037 if (lpFeesCaptured > 0 ) {
@@ -1086,7 +1086,7 @@ contract HubPool is HubPoolInterface, Testable, Lockable, MultiCaller, Ownable {
10861086 }
10871087
10881088 // Added to enable the HubPool to receive ETH. This will occur both when the HubPool unwraps WETH to send to LPs and
1089- // when ETH is send over the canonical Optimism bridge, which sends ETH.
1089+ // when ETH is sent over the canonical Optimism bridge, which sends ETH.
10901090 fallback () external payable {
10911091 _depositEthToWeth ();
10921092 }
0 commit comments