Skip to content

Fix typos and improve clarity in comments #920

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
10 changes: 5 additions & 5 deletions contracts/HubPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/Address.sol";

/**
* @notice Contract deployed on Ethereum that houses L1 token liquidity for all SpokePools. A dataworker can interact
* @notice Contract deployed on Ethereum that houses L1 token liquidity for all SpokePools. A data worker can interact
* with merkle roots stored in this contract via inclusion proofs to instruct this contract to send tokens to L2
* SpokePools via "pool rebalances" that can be used to pay out relayers on those networks. This contract is also
* responsible for publishing relayer refund and slow relay merkle roots to SpokePools.
Expand Down Expand Up @@ -222,7 +222,7 @@ contract HubPool is HubPoolInterface, Testable, Lockable, MultiCaller, Ownable {

/**
* @notice This allows for the deletion of the active proposal in case of emergency.
* @dev This is primarily intended to rectify situations where an unexecutable bundle gets through liveness in the
* @dev This is primarily intended to rectify situations where an inexecutable bundle gets through liveness in the
* case of a non-malicious bug in the proposal/dispute code. Without this function, the contract would be
* indefinitely blocked, migration would be required, and in-progress transfers would never be repaid.
*/
Expand Down Expand Up @@ -485,7 +485,7 @@ contract HubPool is HubPoolInterface, Testable, Lockable, MultiCaller, Ownable {
uint256 lpTokenAmount,
bool sendEth
) public override nonReentrant unpaused {
require(address(weth) == l1Token || !sendEth, "Cant send eth");
require(address(weth) == l1Token || !sendEth, "Can't send eth");
uint256 l1TokensToReturn = (lpTokenAmount * _exchangeRateCurrent(l1Token)) / 1e18;

ExpandedIERC20(pooledTokens[l1Token].lpToken).burnFrom(msg.sender, lpTokenAmount);
Expand Down Expand Up @@ -536,7 +536,7 @@ contract HubPool is HubPoolInterface, Testable, Lockable, MultiCaller, Ownable {
}

/**
* @notice Synchronize any balance changes in this contract with the utilized & liquid reserves. This should be done
* @notice Synchronizess any balance changes in this contract with the utilized & liquid reserves. This should be done
* at the conclusion of a L2->L1 token transfer via the canonical token bridge, when this contract's reserves do not
* reflect its true balance due to new tokens being dropped onto the contract at the conclusion of a bridging action.
*/
Expand Down Expand Up @@ -1058,7 +1058,7 @@ contract HubPool is HubPoolInterface, Testable, Lockable, MultiCaller, Ownable {
return rootBundleProposal.unclaimedPoolRebalanceLeafCount != 0;
}

// If functionCallStackOriginatesFromOutsideThisContract is true then this was called by the callback function
// If functionCallStackOriginatesFromOutsideThisContract is true then this was called by the external call
// by dropping ETH onto the contract. In this case, deposit the ETH into WETH. This would happen if ETH was sent
// over the optimism bridge, for example. If false then this was set as a result of unwinding LP tokens, with the
// intention of sending ETH to the LP. In this case, do nothing as we intend on sending the ETH to the LP.
Expand Down
12 changes: 6 additions & 6 deletions programs/svm-spoke/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ pub mod svm_spoke {
/// - state (Writable): The Spoke state PDA. Seed: ["state",state.seed], where `seed` is 0 on mainnet.
///
/// ### Parameters:
/// - pause: `true` to pause the system, `false` to unpause it.
/// - pause: `true` to pause the system, `false` to resume it.
pub fn pause_deposits(ctx: Context<PauseDeposits>, pause: bool) -> Result<()> {
instructions::pause_deposits(ctx, pause)
}
Expand All @@ -106,7 +106,7 @@ pub mod svm_spoke {
/// - state (Writable): The Spoke state PDA. Seed: ["state",state.seed], where `seed` is 0 on mainnet.
///
/// ### Parameters:
/// - pause: `true` to pause the system, `false` to unpause it.
/// - pause: `true` to pause the system, `false` to resume it.
pub fn pause_fills(ctx: Context<PauseFills>, pause: bool) -> Result<()> {
instructions::pause_fills(ctx, pause)
}
Expand Down Expand Up @@ -509,7 +509,7 @@ pub mod svm_spoke {
/// refund. In the happy path, (a) should be used. (b) should only be used if there is a relayer within the bundle
/// who can't receive the transfer for some reason, such as failed token transfers due to blacklisting. Executing
/// relayer refunds requires the caller to create a LUT and load the execution params into it. This is needed to
/// fit the data in a single instruction. The exact structure and validation of the leaf is defined in the Accross
/// fit the data in a single instruction. The exact structure and validation of the leaf is defined in the Across
/// UMIP: https://github.com/UMAprotocol/UMIPs/blob/master/UMIPs/umip-179.md
///
/// instruction_params Parameters:
Expand Down Expand Up @@ -643,7 +643,7 @@ pub mod svm_spoke {
/// Initializes a claim account for a relayer refund.
///
/// This function sets up a claim account for a relayer to claim their refund at a later time and should only be
/// used in the un-happy path where a bundle cant not be executed due to a recipient in the bundle having a blocked
/// used in the un-happy path where a bundle cannot be executed due to a recipient in the bundle having a blocked
/// or uninitialized claim ATA. The refund address becomes the "owner" of the claim_account.
///
/// ### Required Accounts:
Expand Down Expand Up @@ -682,8 +682,8 @@ pub mod svm_spoke {
/// token via PoolRebalanceRoutes. Slow fills are created by inserting slow fill objects into a Merkle tree that is
/// included in the next HubPool "root bundle". Once the optimistic challenge window has passed, the HubPool will
/// relay the slow root to this chain via relayRootBundle(). Once the slow root is relayed, the slow fill can be
/// executed by anyone who calls executeSlowRelayLeaf(). Cant request a slow fill if the fill deadline has
/// passed. Cant request a slow fill if the relay has already been filled or a slow fill has already been requested.
/// executed by anyone who calls executeSlowRelayLeaf(). Can't request a slow fill if the fill deadline has
/// passed. Can't request a slow fill if the relay has already been filled or a slow fill has already been requested.
///
/// ### Required Accounts:
/// - signer (Signer): The account that authorizes the slow fill request.
Expand Down